unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* CVS-060720 compilation failure on Solaris 10, patch
@ 2006-07-20  3:48 Claes Wallin
  2006-07-20  7:52 ` Ludovic Courtès
  0 siblings, 1 reply; 18+ messages in thread
From: Claes Wallin @ 2006-07-20  3:48 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 675 bytes --]

Yes, this time I checked it against the CVS. :-)

guile-CVS-060720 doesn't compile on Solaris 10. Attaching patch.

Comments:
 - Compiles and passes standalone tests now. Gets stack overflows on
   elisp.test and when trying to start 'guile'.

 - The sethostname and PTHREAD_ONCE_INIT conditions should be tested for
   instead of just slapping a __sun__ on the workarounds. Please help.

 - Does any __GNUC__ platform _not_ want alloca.h?

 - The patch touches a few files, but only few rows in each. Splitting
   it up would simply mean splitting it into the individual files.
   The only interdependency is the pthread_getattr_np check and guard.

   /c

[-- Attachment #1.1.2: guile-core-sol10.ChangeLog --]
[-- Type: text/plain, Size: 861 bytes --]

2006-07-20  Claes Wallin  <clacke+guile@lysator.liu.se>

        * configure.in:
                demand C99 for math functions
                check for pthread_getattr_np

        * libguile/threads.c:
                include <string.h> (FD_ZERO evals to memset)
             (get_thread_stack_base):
                require pthread_getattr_np

        * libguile/eval.c:
        * libguile/filesys.c:
                __GNUC__ on __sun__ needs <alloca.h>

        * libguile/posix.c:
                declare sethostname on __sun__

        * libguile/pthreads-threads.h:
                add {} around PTHREAD_ONCE_INIT on __sun__

        * test-suite/standalone/*.c:
                scm_init_guile -> scm_boot_guile

        * test-suite/standalone/test-require-extension:
                "!" not understood by /bin/sh on Solaris 10

[-- Attachment #1.1.3: guile-core-sol10.diff --]
[-- Type: text/plain, Size: 8236 bytes --]

diff -ur ../guile-core/configure.in ./configure.in
--- ../guile-core/configure.in	2006-06-18 01:15:59.000000000 +0200
+++ ./configure.in	2006-07-20 03:40:51.000000000 +0200
@@ -59,6 +59,7 @@
 
 AC_PROG_INSTALL
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CPP
 AC_PROG_AWK
 
@@ -66,8 +67,6 @@
 AC_ISC_POSIX
 AC_MINIX
 
-AM_PROG_CC_STDC
-
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 AC_CHECK_LIB([ltdl], [lt_dlinit], ,
@@ -1006,7 +1005,7 @@
 
     old_CFLAGS="$CFLAGS"
     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
-    AC_CHECK_FUNCS(pthread_attr_getstack)
+    AC_CHECK_FUNCS([[pthread_attr_getstack pthread_getattr_np]])
     CFLAGS="$old_CFLAGS"
 
     # On Solaris, sched_yield lives in -lrt.
diff -ur ../guile-core/libguile/eval.c ./libguile/eval.c
--- ../guile-core/libguile/eval.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/eval.c	2006-07-20 04:59:57.000000000 +0200
@@ -40,19 +40,21 @@
 /* AIX requires this to be the first thing in the file.  The #pragma
    directive is indented so pre-ANSI compilers will ignore it, rather
    than choke on it.  */
-#ifndef __GNUC__
+
+#if !defined(__GNUC__) || defined(__sun__)
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
-# else
+# else /* !HAVE_ALLOCA_H */
 #  ifdef _AIX
 #   pragma alloca
-#  else
+#  else /* !_AIX */
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
+#   endif /* !alloca */
+#  endif /* !_AIX */
+# endif /* !HAVE_ALLOCA_H */
+#endif /* !__GNUC__ || __sun__ */
+
 #if HAVE_MALLOC_H
 #include <malloc.h> /* alloca on mingw */
 #endif
diff -ur ../guile-core/libguile/filesys.c ./libguile/filesys.c
--- ../guile-core/libguile/filesys.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/filesys.c	2006-07-20 05:00:48.000000000 +0200
@@ -32,19 +32,21 @@
 /* AIX requires this to be the first thing in the file.  The #pragma
    directive is indented so pre-ANSI compilers will ignore it, rather
    than choke on it.  */
-#ifndef __GNUC__
+
+#if !defined(__GNUC__) || defined(__sun__)
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
-# else
+# else /* !HAVE_ALLOCA_H */
 #  ifdef _AIX
 #   pragma alloca
-#  else
+#  else /* !_AIX */
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
+#   endif /* !alloca */
+#  endif /* !_AIX */
+# endif /* !HAVE_ALLOCA_H */
+#endif /* !__GNUC__ || __sun__ */
+
 #if HAVE_MALLOC_H
 #include <malloc.h> /* alloca on mingw, though its not used on that system */
 #endif
diff -ur ../guile-core/libguile/posix.c ./libguile/posix.c
--- ../guile-core/libguile/posix.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/posix.c	2006-07-20 05:23:30.000000000 +0200
@@ -65,6 +65,10 @@
 #endif
 #endif
 
+#ifdef __sun__
+int sethostname(char *name, int namelen);
+#endif
+
 #ifdef LIBC_H_WITH_UNISTD_H
 #include <libc.h>
 #endif
diff -ur ../guile-core/libguile/pthread-threads.h ./libguile/pthread-threads.h
--- ../guile-core/libguile/pthread-threads.h	2006-04-17 02:05:40.000000000 +0200
+++ ./libguile/pthread-threads.h	2006-07-20 05:20:11.000000000 +0200
@@ -66,9 +66,15 @@
 /* Onces
  */
 #define scm_i_pthread_once_t                pthread_once_t
-#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
 #define scm_i_pthread_once                  pthread_once
 
+#ifdef __sun__
+/* workaround for broken Solaris 10 headers */
+#define SCM_I_PTHREAD_ONCE_INIT             { PTHREAD_ONCE_INIT }
+#else /* !__sun__ */
+#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
+#endif /* !__sun__ */
+
 /* Thread specific storage
  */
 #define scm_i_pthread_key_t                 pthread_key_t
diff -ur ../guile-core/libguile/threads.c ./libguile/threads.c
--- ../guile-core/libguile/threads.c	2006-04-17 02:05:42.000000000 +0200
+++ ./libguile/threads.c	2006-07-20 03:53:36.000000000 +0200
@@ -30,6 +30,9 @@
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
+#if HAVE_STRING_H	/* On Solaris 10, FD_ZERO uses memset */
+#include <string.h>
+#endif
 
 #include "libguile/validate.h"
 #include "libguile/root.h"
@@ -567,6 +570,7 @@
 
 #if SCM_USE_PTHREAD_THREADS
 #ifdef HAVE_PTHREAD_ATTR_GETSTACK
+#ifdef HAVE_PTHREAD_GETATTR_NP
 
 #define HAVE_GET_THREAD_STACK_BASE
 
@@ -600,6 +604,7 @@
     }
 }
 
+#endif /* HAVE_PTHREAD_GETATTR_NP */
 #endif /* HAVE_PTHREAD_ATTR_GETSTACK */
 
 #else /* !SCM_USE_PTHREAD_THREADS */
diff -ur ../guile-core/test-suite/standalone/test-conversion.c ./test-suite/standalone/test-conversion.c
--- ../guile-core/test-suite/standalone/test-conversion.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-conversion.c	2006-07-20 04:38:09.000000000 +0200
@@ -1010,10 +1010,7 @@
   test_11 ("(string #\\f #\\nul)", NULL, 1, 0);
 }
 
-int
-main (int argc, char *argv[])
-{
-  scm_init_guile();
+static void f() {
   test_is_signed_integer ();
   test_is_unsigned_integer ();
   test_to_signed_integer ();
@@ -1024,5 +1021,11 @@
   test_from_double ();
   test_to_double ();
   test_locale_strings ();
+}
+
+int
+main (int argc, char *argv[])
+{
+  scm_boot_guile(argc, argv, f, NULL);
   return 0;
 }
diff -ur ../guile-core/test-suite/standalone/test-gh.c ./test-suite/standalone/test-gh.c
--- ../guile-core/test-suite/standalone/test-gh.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-gh.c	2006-07-20 04:34:28.000000000 +0200
@@ -70,8 +70,7 @@
 int 
 main (int argc, char *argv[])
 {
-  scm_init_guile ();
-  test_gh_set_substr ();
+  scm_boot_guile(argc, argv, test_gh_set_substr, NULL);
   return 0;
 }
 
diff -ur ../guile-core/test-suite/standalone/test-list.c ./test-suite/standalone/test-list.c
--- ../guile-core/test-suite/standalone/test-list.c	2006-02-04 00:34:48.000000000 +0100
+++ ./test-suite/standalone/test-list.c	2006-07-20 04:42:12.000000000 +0200
@@ -26,7 +26,7 @@
 /* pretty trivial, but ensure this entrypoint exists, since it was
    documented in Guile 1.6 and earlier */
 static void
-test_scm_list (void)
+test_scm_list ()
 {
   {
     if (! scm_is_eq (SCM_EOL, scm_list (SCM_EOL)))
@@ -49,7 +49,6 @@
 int
 main (int argc, char **argv)
 {
-  scm_init_guile();
-  test_scm_list ();
+  scm_boot_guile(argc, argv, test_scm_list, NULL);
   return 0;
 }
diff -ur ../guile-core/test-suite/standalone/test-num2integral.c ./test-suite/standalone/test-num2integral.c
--- ../guile-core/test-suite/standalone/test-num2integral.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-num2integral.c	2006-07-20 04:37:41.000000000 +0200
@@ -141,12 +141,15 @@
 #endif /* SCM_SIZEOF_LONG_LONG != 0 */
 }
 
+static void f() {
+  test_long_long ();
+  test_ulong_long ();
+}
+
 int
 main (int argc, char *argv[])
 {
-  scm_init_guile();
-  test_long_long ();
-  test_ulong_long ();
+  scm_boot_guile(argc, argv, f, NULL);
   return 0;
 }
 
diff -ur ../guile-core/test-suite/standalone/test-require-extension ./test-suite/standalone/test-require-extension
--- ../guile-core/test-suite/standalone/test-require-extension	2005-02-12 07:15:07.000000000 +0100
+++ ./test-suite/standalone/test-require-extension	2006-07-20 04:52:27.000000000 +0200
@@ -2,9 +2,9 @@
 
 set -e
 
-! guile -c '(require-extension 7)' 2> /dev/null
-! guile -c '(require-extension (blarg))' 2> /dev/null
-! guile -c '(require-extension (srfi "foo"))' 2> /dev/null
+guile -c '(require-extension 7)'  2> /dev/null && exit 2
+guile -c '(require-extension (blarg))' 2> /dev/null && exit 2
+guile -c '(require-extension (srfi "foo"))' 2> /dev/null && exit 2
 
 guile -c '(require-extension (srfi 1)) (exit (procedure? take-right))'
 guile -c '(require-extension (srfi))'
diff -ur ../guile-core/test-suite/standalone/test-round.c ./test-suite/standalone/test-round.c
--- ../guile-core/test-suite/standalone/test-round.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-round.c	2006-07-20 04:39:56.000000000 +0200
@@ -116,7 +116,6 @@
 int
 main (int argc, char *argv[])
 {
-  scm_init_guile();
-  test_scm_c_round ();
+  scm_boot_guile(argc, argv, test_scm_c_round, NULL);
   return 0;
 }

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20  3:48 CVS-060720 compilation failure on Solaris 10, patch Claes Wallin
@ 2006-07-20  7:52 ` Ludovic Courtès
  2006-07-20 12:07   ` Claes Wallin
  2006-07-21  0:31   ` Kevin Ryde
  0 siblings, 2 replies; 18+ messages in thread
From: Ludovic Courtès @ 2006-07-20  7:52 UTC (permalink / raw)
  Cc: bug-guile

Hi,

Claes Wallin <clawa570+gmane@student.liu.se> writes:

> guile-CVS-060720 doesn't compile on Solaris 10. Attaching patch.

I won't be able to test your patch so here are just a few remarks.

> Comments:
>  - Compiles and passes standalone tests now. Gets stack overflows on
>    elisp.test and when trying to start 'guile'.

Did you compile Guile with optimizations?  When using GCC, compiling
with `-O0' quickly yields stack overflows (to that point that one
doesn't even get to the REPL).

>  - The sethostname and PTHREAD_ONCE_INIT conditions should be tested for
>    instead of just slapping a __sun__ on the workarounds. Please help.

Sorry, I don't understand this.

>  - Does any __GNUC__ platform _not_ want alloca.h?

I don't known.  We should normally not have to touch the `#ifdef's
around `alloca ()' since they are the documented way to deal with
`alloca ()' [0].  OTOH, the `#ifdef's changed a bit in the Autoconf
manual (see [0]), so perhaps we should update them accordingly.  Would
this solve your problem?

Otherwise, you can provide specific details as to why this arrangement
fails on your platform and report it to the Autoconf maintainers.  :-)

In any case, I'd be surprised that it fails on Solaris 10 since this is
quite a widespread platform.

Also, when submitting a patch, please follow the GNU coding standard for
ChangeLog entries and code (see below).

> diff -ur ../guile-core/test-suite/standalone/test-list.c ./test-suite/standalone/test-list.c
> --- ../guile-core/test-suite/standalone/test-list.c	2006-02-04 00:34:48.000000000 +0100
> +++ ./test-suite/standalone/test-list.c	2006-07-20 04:42:12.000000000 +0200
> @@ -26,7 +26,7 @@
>  /* pretty trivial, but ensure this entrypoint exists, since it was
>     documented in Guile 1.6 and earlier */
>  static void
> -test_scm_list (void)
> +test_scm_list ()

Is there something wrong with the original form?

> diff -ur ../guile-core/test-suite/standalone/test-num2integral.c ./test-suite/standalone/test-num2integral.c
> --- ../guile-core/test-suite/standalone/test-num2integral.c	2006-04-17 01:27:13.000000000 +0200
> +++ ./test-suite/standalone/test-num2integral.c	2006-07-20 04:37:41.000000000 +0200
> @@ -141,12 +141,15 @@
>  #endif /* SCM_SIZEOF_LONG_LONG != 0 */
>  }
>  
> +static void f() {
> +  test_long_long ();
> +  test_ulong_long ();
> +}
> +

This should really be something like:

  static void
  startup ()
  {
    ...
  }

>  int
>  main (int argc, char *argv[])
>  {
> -  scm_init_guile();
> -  test_long_long ();
> -  test_ulong_long ();
> +  scm_boot_guile(argc, argv, f, NULL);

`scm_init_guile ()' is documented and perfectly legal in 1.8.0.  Is
there any reason why you removed it from test cases?

Thanks,
Ludovic.

[0] http://www.gnu.org/software/autoconf/manual/html_node/Particular-Functions.html#Particular-Functions


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20  7:52 ` Ludovic Courtès
@ 2006-07-20 12:07   ` Claes Wallin
  2006-07-20 12:29     ` Claes Wallin
  2006-07-21  0:31   ` Kevin Ryde
  1 sibling, 1 reply; 18+ messages in thread
From: Claes Wallin @ 2006-07-20 12:07 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 2866 bytes --]

Ludovic Courtès wrote:
> I won't be able to test your patch so here are just a few remarks.

Very helpful, thank you. Correcting my submission according to them.

>> - Compiles and passes standalone tests now. Gets stack overflows on
>>   elisp.test and when trying to start 'guile'.
>
> Did you compile Guile with optimizations?  When using GCC, compiling
> with `-O0' quickly yields stack overflows (to that point that one
> doesn't even get to the REPL).

Ah, of course. Testing now.

>> - The sethostname and PTHREAD_ONCE_INIT conditions should be tested
>>   for instead of just slapping a __sun__ on the workarounds. Please
>>   help.
> 
> Sorry, I don't understand this.

I simply mean that "#ifdef __sun__" is a pretty blunt instrument. There
may exist sun platforms without these problems, and there may exist
non-sun platforms with these problems. So someone well-versed in
autoconf should write tests for a missing sethostname declaration and a
faulty PTHREAD_ONCE_INIT declaration, respectively.

>> - Does any __GNUC__ platform _not_ want alloca.h?
> 
> I don't known.  We should normally not have to touch the `#ifdef's 
> around `alloca ()' since they are the documented way to deal with 
> `alloca ()' [0].  OTOH, the `#ifdef's changed a bit in the Autoconf
> manual (see [0]), so perhaps we should update them accordingly. Would
> this solve your problem?

Yes! Thank you, updated the section to latest autoconf standards.

> Also, when submitting a patch, please follow the GNU coding standard
> for ChangeLog entries and code (see below).

Yes, updating to conform.

>> diff -ur ../guile-core/test-suite/standalone/test-list.c
>>  ...
>>  static void
>> -test_scm_list (void)
>> +test_scm_list ()
>> 
> Is there something wrong with the original form?

scm_boot_guile takes a (void*)() parameter, which test_scm_list needs
to conform to. Documenting this.

>> +static void f() {
>> +  test_long_long ();
>> +  test_ulong_long ();
>> +}
>> +
> 
> This should really be something like:
> 
> static void
> startup ()
> {
>   ...
> }

Ah, yes. Updating.

>>  int
>>  main (int argc, char *argv[])
>>  {
>> -  scm_init_guile();
>> -  test_long_long ();
>> -  test_ulong_long ();
>> +  scm_boot_guile(argc, argv, f, NULL);
> 
> `scm_init_guile ()' is documented and perfectly legal in 1.8.0.  Is
>  there any reason why you removed it from test cases?

Yes, this enables the tests on platforms which not yet have a
scm_init_guile() implementation, like Solaris 10 and Mac OS X.
I have one implementation for Mac OS X coming up as soon as I've fixed
this patch, but haven't found any function similar to thread_get_attr_np
or pthread_get_stackaddress_np on Solaris 10.

> 
> Thanks, Ludovic.

Updated patch coming up. Thanks again for your guidance.

   /c




[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20 12:07   ` Claes Wallin
@ 2006-07-20 12:29     ` Claes Wallin
  2006-07-21  0:02       ` Kevin Ryde
                         ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Claes Wallin @ 2006-07-20 12:29 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 109 bytes --]

Claes Wallin wrote:
> Updated patch coming up. Thanks again for your guidance.

And here it is.

   /c

[-- Attachment #1.1.2: guile-core-sol10.ChangeLog --]
[-- Type: text/plain, Size: 1996 bytes --]

2006-07-20  Claes Wallin  <clacke+guile@lysator.liu.se>

        Make guile compile om Solaris 10.

        * configure.in:
          Demand C99 for math functions.
          Check for pthread_getattr_np, which only (?) exists on
          glibc platforms.

        * libguile/threads.c:
          include <string.h> (FD_ZERO on Solaris needs this)
          (get_thread_stack_base): Don't try to compile this function
          if pthread_getattr_np doesn't exist.

        * libguile/eval.c:
        * libguile/filesys.c:
          Updated alloca section to latest autoconf standards.

        * libguile/posix.c:
          Declare sethostname on __sun__.

        * libguile/pthreads-threads.h:
          Add missing brackets around PTHREAD_ONCE_INIT on __sun__.

        Some platforms (like Solaris 10) lack the pthread functions to
        get at stack attributes based on thread id. These platforms
        can't support scm_init_guile. Changing tests to using
        scm_boot_guile() to enable testing on these platforms.

        * test-suite/standalone/test-conversion.c:
        * test-suite/standalone/test-gh.c:
        * test-suite/standalone/test-list.c:
        * test-suite/standalone/test-num2integral.c:
        * test-suite/standalone/test-round.c:
          (main): Changed usage of scm_init_guile to scm_boot_guile.

        * test-suite/standalone/test-conversion.c:
        * test-suite/standalone/test-num2integral.c:
          (main): Moved tests to tests() for use with scm_boot_guile().
          (tests): New function

        * test-suite/standalone/test-list.c:
          Make test_scm_list() conform to scm_boot_guile() main_func
          parameter. scm_boot_guile() should really be taking
          void (*main_func)(void *closure, int argc, char **argv),
          but save that for another patch. 

        * test-suite/standalone/test-require-extension:
          "!" not understood by /bin/sh on Solaris 10

[-- Attachment #1.1.3: guile-core-sol10.diff --]
[-- Type: text/plain, Size: 8477 bytes --]

diff -ur ../guile-core/configure.in ./configure.in
--- ../guile-core/configure.in	2006-06-18 01:15:59.000000000 +0200
+++ ./configure.in	2006-07-20 06:16:34.000000000 +0200
@@ -59,6 +59,7 @@
 
 AC_PROG_INSTALL
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CPP
 AC_PROG_AWK
 
@@ -66,8 +67,6 @@
 AC_ISC_POSIX
 AC_MINIX
 
-AM_PROG_CC_STDC
-
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 AC_CHECK_LIB([ltdl], [lt_dlinit], ,
@@ -1006,7 +1006,7 @@
 
     old_CFLAGS="$CFLAGS"
     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
-    AC_CHECK_FUNCS(pthread_attr_getstack)
+    AC_CHECK_FUNCS([[pthread_attr_getstack pthread_getattr_np]])
     CFLAGS="$old_CFLAGS"
 
     # On Solaris, sched_yield lives in -lrt.
diff -ur ../guile-core/libguile/eval.c ./libguile/eval.c
--- ../guile-core/libguile/eval.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/eval.c	2006-07-20 12:49:17.000000000 +0200
@@ -40,19 +40,24 @@
 /* AIX requires this to be the first thing in the file.  The #pragma
    directive is indented so pre-ANSI compilers will ignore it, rather
    than choke on it.  */
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
-# else
-#  ifdef _AIX
-#   pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
+
+#if HAVE_ALLOCA_H
+# include <alloca.h>
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+#else
+# include <stddef.h>
+# ifdef  __cplusplus
+extern "C"
 # endif
+void *alloca (size_t);
 #endif
+
 #if HAVE_MALLOC_H
 #include <malloc.h> /* alloca on mingw */
 #endif
diff -ur ../guile-core/libguile/filesys.c ./libguile/filesys.c
--- ../guile-core/libguile/filesys.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/filesys.c	2006-07-20 12:50:00.000000000 +0200
@@ -32,19 +32,24 @@
 /* AIX requires this to be the first thing in the file.  The #pragma
    directive is indented so pre-ANSI compilers will ignore it, rather
    than choke on it.  */
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
-# else
-#  ifdef _AIX
-#   pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
+
+#if HAVE_ALLOCA_H
+# include <alloca.h>
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+#else
+# include <stddef.h>
+# ifdef  __cplusplus
+extern "C"
 # endif
+void *alloca (size_t);
 #endif
+
 #if HAVE_MALLOC_H
 #include <malloc.h> /* alloca on mingw, though its not used on that system */
 #endif
diff -ur ../guile-core/libguile/posix.c ./libguile/posix.c
--- ../guile-core/libguile/posix.c	2006-06-18 01:05:03.000000000 +0200
+++ ./libguile/posix.c	2006-07-20 05:23:30.000000000 +0200
@@ -65,6 +65,10 @@
 #endif
 #endif
 
+#ifdef __sun__
+int sethostname(char *name, int namelen);
+#endif
+
 #ifdef LIBC_H_WITH_UNISTD_H
 #include <libc.h>
 #endif
diff -ur ../guile-core/libguile/pthread-threads.h ./libguile/pthread-threads.h
--- ../guile-core/libguile/pthread-threads.h	2006-04-17 02:05:40.000000000 +0200
+++ ./libguile/pthread-threads.h	2006-07-20 05:20:11.000000000 +0200
@@ -66,9 +66,15 @@
 /* Onces
  */
 #define scm_i_pthread_once_t                pthread_once_t
-#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
 #define scm_i_pthread_once                  pthread_once
 
+#ifdef __sun__
+/* workaround for broken Solaris 10 headers */
+#define SCM_I_PTHREAD_ONCE_INIT             { PTHREAD_ONCE_INIT }
+#else /* !__sun__ */
+#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
+#endif /* !__sun__ */
+
 /* Thread specific storage
  */
 #define scm_i_pthread_key_t                 pthread_key_t
diff -ur ../guile-core/libguile/threads.c ./libguile/threads.c
--- ../guile-core/libguile/threads.c	2006-04-17 02:05:42.000000000 +0200
+++ ./libguile/threads.c	2006-07-20 14:15:59.000000000 +0200
@@ -30,6 +30,9 @@
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
+#if HAVE_STRING_H && defined(__sun__)	/* On Solaris 10, FD_ZERO uses memset */
+#include <string.h>
+#endif
 
 #include "libguile/validate.h"
 #include "libguile/root.h"
@@ -567,6 +570,7 @@
 
 #if SCM_USE_PTHREAD_THREADS
 #ifdef HAVE_PTHREAD_ATTR_GETSTACK
+#ifdef HAVE_PTHREAD_GETATTR_NP
 
 #define HAVE_GET_THREAD_STACK_BASE
 
@@ -600,6 +604,7 @@
     }
 }
 
+#endif /* HAVE_PTHREAD_GETATTR_NP */
 #endif /* HAVE_PTHREAD_ATTR_GETSTACK */
 
 #else /* !SCM_USE_PTHREAD_THREADS */
diff -ur ../guile-core/test-suite/standalone/test-conversion.c ./test-suite/standalone/test-conversion.c
--- ../guile-core/test-suite/standalone/test-conversion.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-conversion.c	2006-07-20 13:50:21.000000000 +0200
@@ -1010,10 +1010,9 @@
   test_11 ("(string #\\f #\\nul)", NULL, 1, 0);
 }
 
-int
-main (int argc, char *argv[])
+static void
+tests ()
 {
-  scm_init_guile();
   test_is_signed_integer ();
   test_is_unsigned_integer ();
   test_to_signed_integer ();
@@ -1024,5 +1023,11 @@
   test_from_double ();
   test_to_double ();
   test_locale_strings ();
+}
+
+int
+main (int argc, char *argv[])
+{
+  scm_boot_guile(argc, argv, tests, NULL);
   return 0;
 }
diff -ur ../guile-core/test-suite/standalone/test-gh.c ./test-suite/standalone/test-gh.c
--- ../guile-core/test-suite/standalone/test-gh.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-gh.c	2006-07-20 04:34:28.000000000 +0200
@@ -70,8 +70,7 @@
 int 
 main (int argc, char *argv[])
 {
-  scm_init_guile ();
-  test_gh_set_substr ();
+  scm_boot_guile(argc, argv, test_gh_set_substr, NULL);
   return 0;
 }
 
diff -ur ../guile-core/test-suite/standalone/test-list.c ./test-suite/standalone/test-list.c
--- ../guile-core/test-suite/standalone/test-list.c	2006-02-04 00:34:48.000000000 +0100
+++ ./test-suite/standalone/test-list.c	2006-07-20 04:42:12.000000000 +0200
@@ -26,7 +26,7 @@
 /* pretty trivial, but ensure this entrypoint exists, since it was
    documented in Guile 1.6 and earlier */
 static void
-test_scm_list (void)
+test_scm_list ()
 {
   {
     if (! scm_is_eq (SCM_EOL, scm_list (SCM_EOL)))
@@ -49,7 +49,6 @@
 int
 main (int argc, char **argv)
 {
-  scm_init_guile();
-  test_scm_list ();
+  scm_boot_guile(argc, argv, test_scm_list, NULL);
   return 0;
 }
diff -ur ../guile-core/test-suite/standalone/test-num2integral.c ./test-suite/standalone/test-num2integral.c
--- ../guile-core/test-suite/standalone/test-num2integral.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-num2integral.c	2006-07-20 13:36:51.000000000 +0200
@@ -141,12 +141,17 @@
 #endif /* SCM_SIZEOF_LONG_LONG != 0 */
 }
 
-int
-main (int argc, char *argv[])
+static void
+tests ()
 {
-  scm_init_guile();
   test_long_long ();
   test_ulong_long ();
+}
+
+int
+main (int argc, char *argv[])
+{
+  scm_boot_guile(argc, argv, tests, NULL);
   return 0;
 }
 
diff -ur ../guile-core/test-suite/standalone/test-require-extension ./test-suite/standalone/test-require-extension
--- ../guile-core/test-suite/standalone/test-require-extension	2005-02-12 07:15:07.000000000 +0100
+++ ./test-suite/standalone/test-require-extension	2006-07-20 04:52:27.000000000 +0200
@@ -2,9 +2,9 @@
 
 set -e
 
-! guile -c '(require-extension 7)' 2> /dev/null
-! guile -c '(require-extension (blarg))' 2> /dev/null
-! guile -c '(require-extension (srfi "foo"))' 2> /dev/null
+guile -c '(require-extension 7)'  2> /dev/null && exit 2
+guile -c '(require-extension (blarg))' 2> /dev/null && exit 2
+guile -c '(require-extension (srfi "foo"))' 2> /dev/null && exit 2
 
 guile -c '(require-extension (srfi 1)) (exit (procedure? take-right))'
 guile -c '(require-extension (srfi))'
diff -ur ../guile-core/test-suite/standalone/test-round.c ./test-suite/standalone/test-round.c
--- ../guile-core/test-suite/standalone/test-round.c	2006-04-17 01:27:13.000000000 +0200
+++ ./test-suite/standalone/test-round.c	2006-07-20 04:39:56.000000000 +0200
@@ -116,7 +116,6 @@
 int
 main (int argc, char *argv[])
 {
-  scm_init_guile();
-  test_scm_c_round ();
+  scm_boot_guile(argc, argv, test_scm_c_round, NULL);
   return 0;
 }

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20 12:29     ` Claes Wallin
@ 2006-07-21  0:02       ` Kevin Ryde
  2006-07-21  6:32         ` Claes Wallin
  2006-07-21  0:04       ` Kevin Ryde
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Kevin Ryde @ 2006-07-21  0:02 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
>           Declare sethostname on __sun__.
>
> +#ifdef __sun__
> +int sethostname(char *name, int namelen);
> +#endif

Thanks, but I don't really want to hard-code __sun__.  Is that
prototype in some other header?  If not AC_CHECK_DECL will be the way
to go.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20 12:29     ` Claes Wallin
  2006-07-21  0:02       ` Kevin Ryde
@ 2006-07-21  0:04       ` Kevin Ryde
  2006-07-21  6:30         ` Claes Wallin
  2006-07-21  0:08       ` Kevin Ryde
  2006-07-25  0:42       ` Kevin Ryde
  3 siblings, 1 reply; 18+ messages in thread
From: Kevin Ryde @ 2006-07-21  0:04 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
>           Demand C99 for math functions.

Which ones are missed otherwise?

> +AC_PROG_CC_C99

I'm worried that will turn off good things in gcc.  I'd much rather
leave the compiler in the default mode, or whatever mode the user has
asked for with CFLAGS.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20 12:29     ` Claes Wallin
  2006-07-21  0:02       ` Kevin Ryde
  2006-07-21  0:04       ` Kevin Ryde
@ 2006-07-21  0:08       ` Kevin Ryde
  2006-07-25  0:42       ` Kevin Ryde
  3 siblings, 0 replies; 18+ messages in thread
From: Kevin Ryde @ 2006-07-21  0:08 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
>         * libguile/threads.c:
>           include <string.h> (FD_ZERO on Solaris needs this)

Thanks, I made that change.

> +#if HAVE_STRING_H && defined(__sun__)	/* On Solaris 10, FD_ZERO uses memset */

... but without __sun__.  That header is friendly, no need to restrict
its use.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20  7:52 ` Ludovic Courtès
  2006-07-20 12:07   ` Claes Wallin
@ 2006-07-21  0:31   ` Kevin Ryde
  1 sibling, 0 replies; 18+ messages in thread
From: Kevin Ryde @ 2006-07-21  0:31 UTC (permalink / raw)
  Cc: bug-guile

ludovic.courtes@laas.fr (Ludovic Courtès) writes:
>
> the `#ifdef's changed a bit in the Autoconf
> manual (see [0]), so perhaps we should update them accordingly.

Sounds good, done.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-21  0:04       ` Kevin Ryde
@ 2006-07-21  6:30         ` Claes Wallin
  2006-07-24  1:45           ` Kevin Ryde
  0 siblings, 1 reply; 18+ messages in thread
From: Claes Wallin @ 2006-07-21  6:30 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 639 bytes --]

Kevin Ryde wrote:
> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>>           Demand C99 for math functions.
> 
> Which ones are missed otherwise?

From /usr/include/iso/math_c99.h:

#if defined(_STDC_C99) ...
...
#define isinf(x) ...

> 
>> +AC_PROG_CC_C99
> 
> I'm worried that will turn off good things in gcc.  I'd much rather
> leave the compiler in the default mode, or whatever mode the user has
> asked for with CFLAGS.

It seems that isinf is c99, and that earlier gcc:s supported it in isoc
as a GNU extension. If we're using c99, why not specify it? What good
things will be turned off?

   /c


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-21  0:02       ` Kevin Ryde
@ 2006-07-21  6:32         ` Claes Wallin
  2006-07-24  0:46           ` Kevin Ryde
  0 siblings, 1 reply; 18+ messages in thread
From: Claes Wallin @ 2006-07-21  6:32 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 524 bytes --]

Kevin Ryde wrote:
> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>>           Declare sethostname on __sun__.
>>
>> +#ifdef __sun__
>> +int sethostname(char *name, int namelen);
>> +#endif
> 
> Thanks, but I don't really want to hard-code __sun__.  Is that
> prototype in some other header?

Nope, 'grep -r sethostname /usr/include' yields two hits, both are comments.

> If not AC_CHECK_DECL will be the way
> to go.

Thanks, I knew I could trust someone to do this in a better way. ;-)

   /c


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-21  6:32         ` Claes Wallin
@ 2006-07-24  0:46           ` Kevin Ryde
  2006-07-24  9:35             ` Claes Wallin
  2006-07-24  9:53             ` Claes Wallin
  0 siblings, 2 replies; 18+ messages in thread
From: Kevin Ryde @ 2006-07-24  0:46 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
> Nope, 'grep -r sethostname /usr/include' yields two hits, both are comments.

Beaut, I made the change.  You might check if the man page says a
header, sometimes sub-includes are buried in bizarre places
(ie. outside /usr/include).


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-21  6:30         ` Claes Wallin
@ 2006-07-24  1:45           ` Kevin Ryde
  2006-07-24  9:53             ` Claes Wallin
  0 siblings, 1 reply; 18+ messages in thread
From: Kevin Ryde @ 2006-07-24  1:45 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
> It seems that isinf is c99, and that earlier gcc:s supported it in isoc
> as a GNU extension. If we're using c99, why not specify it? What good
> things will be turned off?

Every time I've had the misfortune to experiment with standards-modes
on headers or whatever it's been painful.  I think _POSIX_SOURCE
losing all GNU extras was the most recent bad bit in guile.

Is isinf missed on solaris?  Is there another way to ask for it?


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-24  0:46           ` Kevin Ryde
@ 2006-07-24  9:35             ` Claes Wallin
  2006-07-24  9:53             ` Claes Wallin
  1 sibling, 0 replies; 18+ messages in thread
From: Claes Wallin @ 2006-07-24  9:35 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]

Kevin Ryde wrote:
> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>> Nope, 'grep -r sethostname /usr/include' yields two hits, both are comments.
> 
> Beaut, I made the change.  You might check if the man page says a
> header, sometimes sub-includes are buried in bizarre places
> (ie. outside /usr/include).

Man page says <unistd.h> for gethostname/sethostname. gethostname is
included there, but not sethostname. Can't test your change right now,
but tested with AC_CHECK_DECLS_ONCE last weekend, and it worked well.

    /c


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-24  1:45           ` Kevin Ryde
@ 2006-07-24  9:53             ` Claes Wallin
  2006-07-25  0:46               ` Kevin Ryde
  0 siblings, 1 reply; 18+ messages in thread
From: Claes Wallin @ 2006-07-24  9:53 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1543 bytes --]

Kevin Ryde wrote:
> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>> It seems that isinf is c99, and that earlier gcc:s supported it in isoc
>> as a GNU extension. If we're using c99, why not specify it? What good
>> things will be turned off?
> 
> Every time I've had the misfortune to experiment with standards-modes
> on headers or whatever it's been painful.  I think _POSIX_SOURCE
> losing all GNU extras was the most recent bad bit in guile.

Yes. Turned out that -std=c99 turned asm() off. I will hit myself over
the head if I try drawing conclusions without a clean tree ever again..

-std=gnu99 worked, or changing those asm() to __asm().

> Is isinf missed on solaris?  Is there another way to ask for it?

isinf is contained in an '#ifdef _STD_C99' section.


Status this weekend:

Solaris 10 with 'CFLAGS=-O2 -std=gnu99' passed all tests including
regexp.test with following changes:

* Updated HAVE_ALLOCA_H blocks in libguile/eval.c libguile/filesys.c
* Check for HAVE_PTHREAD_GETATTR_NP in libguile/threads.c
* Tests using scm_boot_guile instead of scm_init_guile
* <string.h> in libguile/threads.c
* Addition of version.texi in doc/ref/ and doc/tutorial/
* { PTHREAD_ONCE_INIT } in libguile/threads-pthreads.h
* Check for HAVE_DECL_SETHOSTNAME libguile/posix.c

Mac OS X with 'CFLAGS=-O2' passed all tests except regexp test with:

* HAVE_PTHREAD_GETATTR_NP
* init -> boot
* version.texi

Mac OS X also accepted the Solaris 10 patches without any additional
problems.

   /c


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-24  0:46           ` Kevin Ryde
  2006-07-24  9:35             ` Claes Wallin
@ 2006-07-24  9:53             ` Claes Wallin
  1 sibling, 0 replies; 18+ messages in thread
From: Claes Wallin @ 2006-07-24  9:53 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]

Kevin Ryde wrote:
> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>> Nope, 'grep -r sethostname /usr/include' yields two hits, both are comments.
> 
> Beaut, I made the change.  You might check if the man page says a
> header, sometimes sub-includes are buried in bizarre places
> (ie. outside /usr/include).

Man page says <unistd.h> for gethostname/sethostname. gethostname is
included there, but not sethostname. Can't test your change right now,
but tested with AC_CHECK_DECLS_ONCE last weekend, and it worked well.

    /c


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

[-- Attachment #2: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-20 12:29     ` Claes Wallin
                         ` (2 preceding siblings ...)
  2006-07-21  0:08       ` Kevin Ryde
@ 2006-07-25  0:42       ` Kevin Ryde
  2006-07-25  7:33         ` Ludovic Courtès
  3 siblings, 1 reply; 18+ messages in thread
From: Kevin Ryde @ 2006-07-25  0:42 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
> +#ifdef __sun__
> +/* workaround for broken Solaris 10 headers */
> +#define SCM_I_PTHREAD_ONCE_INIT             { PTHREAD_ONCE_INIT }
> +#else /* !__sun__ */
> +#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
> +#endif /* !__sun__ */

Grr.  Contrary to what posix says I think :-(.

  http://www.opengroup.org/onlinepubs/000095399/functions/pthread_once.html

I might make a configure test to see which style should be used, you'd
imagine sun will fix their bugs eventually.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-24  9:53             ` Claes Wallin
@ 2006-07-25  0:46               ` Kevin Ryde
  0 siblings, 0 replies; 18+ messages in thread
From: Kevin Ryde @ 2006-07-25  0:46 UTC (permalink / raw)
  Cc: bug-guile

Claes Wallin <clawa570+gmane@student.liu.se> writes:
>
> -std=gnu99 worked, or changing those asm() to __asm().

__asm__ would be fine if it helped.  There's a mixture of asm and
__asm__ at the moment.

> isinf is contained in an '#ifdef _STD_C99' section.

Hmm ...

> * Updated HAVE_ALLOCA_H blocks in libguile/eval.c libguile/filesys.c
> * Check for HAVE_PTHREAD_GETATTR_NP in libguile/threads.c
> * Tests using scm_boot_guile instead of scm_init_guile
> * <string.h> in libguile/threads.c
> * { PTHREAD_ONCE_INIT } in libguile/threads-pthreads.h
> * Check for HAVE_DECL_SETHOSTNAME libguile/posix.c

Thanks, all applied, except ONCE_INIT which is in progress ...

> * Addition of version.texi in doc/ref/ and doc/tutorial/

Don't know what you mean there.  If you're building from the cvs you
may need "./configure --enable-maintainer-mode".


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: CVS-060720 compilation failure on Solaris 10, patch
  2006-07-25  0:42       ` Kevin Ryde
@ 2006-07-25  7:33         ` Ludovic Courtès
  0 siblings, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2006-07-25  7:33 UTC (permalink / raw)
  Cc: bug-guile, Claes Wallin

Kevin Ryde <user42@zip.com.au> writes:

> Claes Wallin <clawa570+gmane@student.liu.se> writes:
>>
>> +#ifdef __sun__
>> +/* workaround for broken Solaris 10 headers */
>> +#define SCM_I_PTHREAD_ONCE_INIT             { PTHREAD_ONCE_INIT }
>> +#else /* !__sun__ */
>> +#define SCM_I_PTHREAD_ONCE_INIT             PTHREAD_ONCE_INIT
>> +#endif /* !__sun__ */
>
> Grr.  Contrary to what posix says I think :-(.
>
>   http://www.opengroup.org/onlinepubs/000095399/functions/pthread_once.html
>
> I might make a configure test to see which style should be used, you'd
> imagine sun will fix their bugs eventually.

I guess defining `_POSIX_SOURCE' doesn't make any difference here, does
it?

Thanks,
Ludovic.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2006-07-25  7:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20  3:48 CVS-060720 compilation failure on Solaris 10, patch Claes Wallin
2006-07-20  7:52 ` Ludovic Courtès
2006-07-20 12:07   ` Claes Wallin
2006-07-20 12:29     ` Claes Wallin
2006-07-21  0:02       ` Kevin Ryde
2006-07-21  6:32         ` Claes Wallin
2006-07-24  0:46           ` Kevin Ryde
2006-07-24  9:35             ` Claes Wallin
2006-07-24  9:53             ` Claes Wallin
2006-07-21  0:04       ` Kevin Ryde
2006-07-21  6:30         ` Claes Wallin
2006-07-24  1:45           ` Kevin Ryde
2006-07-24  9:53             ` Claes Wallin
2006-07-25  0:46               ` Kevin Ryde
2006-07-21  0:08       ` Kevin Ryde
2006-07-25  0:42       ` Kevin Ryde
2006-07-25  7:33         ` Ludovic Courtès
2006-07-21  0:31   ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).