From 8cccde76fe64c4752f036f51cfb0fd26c1ffae9f Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Mon, 13 Jun 2016 21:44:10 +0200 Subject: [PATCH] Ecore: detect ieeefp.h existence instead of including it with compiler's macro On Solaris, this header is necessary for finite(). Instead of including it if the sun compiler is used, include it if it exists. This fixes a warning if gcc is used on Solaris --- configure.ac | 1 + src/lib/ecore/ecore_main.c | 10 +++++----- src/lib/ecore/ecore_pipe.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index fc715e50d9..1a748879c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1750,6 +1750,7 @@ sys/prctl.h \ sys/resource.h \ sys/timerfd.h \ sys/un.h \ +ieeefp.h \ ],[],[], [ #ifdef HAVE_SYS_SOCKET_H diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 5a011a43c6..0ee0eb69ad 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -11,13 +11,9 @@ # endif #endif -#ifdef __SUNPRO_C -# include -# include -#endif - #include #include +#include #include #include #include @@ -29,6 +25,10 @@ # include #endif +#ifdef HAVE_IEEEFP_H +# include /* for Solaris */ +#endif + #ifdef _MSC_VER # include #endif diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c index 94319b62e2..7ac69640a8 100644 --- a/src/lib/ecore/ecore_pipe.c +++ b/src/lib/ecore/ecore_pipe.c @@ -7,8 +7,8 @@ #include #include -#ifdef __SUNPRO_C -# include +#ifdef HAVE_IEEEFP_H +# include /* for Solaris */ #endif #ifdef HAVE_ISFINITE