From c8c4c792555d261d65ebf5bf54f153be2e219844 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 19 Dec 2010 17:15:53 +0100 Subject: [PATCH] In Solaris, do not define isfinite = finite if we are using long doubles, because the later only works for doubles. Instead force gcc to used gnu99 mode. --- src/aclocal.m4 | 2 +- src/configure | 2 +- src/h/config.h.in | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 97b05a73e..f22f30f98 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -330,7 +330,7 @@ case "${host_os}" in clibs='-ldl' # 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" + CFLAGS="${CFLAGS} -std=gnu99" enable_slow_config=yes ;; cygwin*) diff --git a/src/configure b/src/configure index cc7d7bf22..d3ae7c841 100755 --- a/src/configure +++ b/src/configure @@ -4837,7 +4837,7 @@ case "${host_os}" in clibs='-ldl' # 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" + CFLAGS="${CFLAGS} -std=gnu99" enable_slow_config=yes ;; cygwin*) diff --git a/src/h/config.h.in b/src/h/config.h.in index b74bb3242..333470448 100644 --- a/src/h/config.h.in +++ b/src/h/config.h.in @@ -486,9 +486,15 @@ typedef unsigned @CL_FIXNUM_TYPE@ cl_hashkey; # endif # ifndef isfinite # ifdef __sun -# include +# ifndef ECL_LONG_FLOAT +# include +# define isfinite(x) finite(x) +# else +# error "Function isfinite() is missing" +# endif +# else +# define isfinite(x) finite(x) # endif -# define isfinite(x) finite(x) # endif # ifndef signbit # ifndef ECL_SIGNED_ZERO