diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 24e38999f..84da6bfa8 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -283,7 +283,9 @@ case "${host_os}" in ECL_LDRPATH='-Wl,-R,~A' TCPLIBS='-lsocket -lnsl -lintl' clibs='-ldl' - CFLAGS="${CFLAGS} -std=gnu99" + # We should use C99 and _XOPEN_SOURCE=600, but Solaris 10 + # ships with GCC 3.4.3 which does not support C99 + # CFLAGS="${CFLAGS} -std=gnu99" enable_slow_config=yes ;; cygwin*) diff --git a/src/c/package.d b/src/c/package.d index 9c2d632ee..6eb387622 100644 --- a/src/c/package.d +++ b/src/c/package.d @@ -15,7 +15,9 @@ See file '../Copyright' for full details. */ +#ifndef __sun__ /* See unixint.d for the reason of this */ #define _XOPEN_SOURCE 600 /* For pthread mutex attributes */ +#endif #include #include #include diff --git a/src/c/unixint.d b/src/c/unixint.d index d8d66a06f..6b654c242 100644 --- a/src/c/unixint.d +++ b/src/c/unixint.d @@ -15,7 +15,12 @@ See file '../Copyright' for full details. */ -#define _XOPEN_SOURCE 600 /* For SA_SIGINFO in Solaris */ +#ifdef __sun__ +/* For SA_SIGINFO in Solaris. We could have used _XOPEN_SOURCE=600, but + * this requires C99 and the default GCC for Solaris (3.4.3) does not + * support this C standard. */ +#define __EXTENSIONS__ +#endif #include #include #include diff --git a/src/configure b/src/configure index 9e1b118e3..472312ef7 100755 --- a/src/configure +++ b/src/configure @@ -4432,7 +4432,9 @@ case "${host_os}" in ECL_LDRPATH='-Wl,-R,~A' TCPLIBS='-lsocket -lnsl -lintl' clibs='-ldl' - CFLAGS="${CFLAGS} -std=gnu99" + # We should use C99 and _XOPEN_SOURCE=600, but Solaris 10 + # ships with GCC 3.4.3 which does not support C99 + # CFLAGS="${CFLAGS} -std=gnu99" enable_slow_config=yes ;; cygwin*)