From c66068c40844a73dd5ea60fa76854d70d79d07ed Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Mon, 31 Aug 2009 17:21:20 +0200 Subject: [PATCH] Fixes for building ECL with gcc 3.4.3 in Solaris 10 --- src/aclocal.m4 | 4 +++- src/c/package.d | 2 ++ src/c/unixint.d | 7 ++++++- src/configure | 4 +++- 4 files changed, 14 insertions(+), 3 deletions(-) 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*)