Fix link errors with Sun C 5.0 on Solaris 10.
[pspp] / lib / math.in.h
index c5d98f0091b4bf37f940b3256019f2a893d73d60..c40ae9c59221237eb2704801d6e02d15010246c9 100644 (file)
@@ -90,7 +90,7 @@ extern long double atanl (long double x);
 
 
 #if @GNULIB_CEILF@
-# if !@HAVE_DECL_CEILF@
+# if @REPLACE_CEILF@
 #  define ceilf rpl_ceilf
 extern float ceilf (float x);
 # endif
@@ -103,7 +103,7 @@ extern float ceilf (float x);
 #endif
 
 #if @GNULIB_CEILL@
-# if !@HAVE_DECL_CEILL@
+# if @REPLACE_CEILL@
 #  define ceill rpl_ceill
 extern long double ceill (long double x);
 # endif
@@ -141,7 +141,7 @@ extern long double expl (long double x);
 
 
 #if @GNULIB_FLOORF@
-# if !@HAVE_DECL_FLOORF@
+# if @REPLACE_FLOORF@
 #  define floorf rpl_floorf
 extern float floorf (float x);
 # endif
@@ -154,7 +154,7 @@ extern float floorf (float x);
 #endif
 
 #if @GNULIB_FLOORL@
-# if !@HAVE_DECL_FLOORL@
+# if @REPLACE_FLOORL@
 #  define floorl rpl_floorl
 extern long double floorl (long double x);
 # endif
@@ -219,6 +219,7 @@ extern long double logl (long double x);
 
 #if @GNULIB_ROUNDF@
 # if !@HAVE_DECL_ROUNDF@
+#  undef roundf
 #  define roundf rpl_roundf
 extern float roundf (float x);
 # endif
@@ -230,9 +231,9 @@ extern float roundf (float x);
      roundf (x))
 #endif
 
-
 #if @GNULIB_ROUND@
 # if !@HAVE_DECL_ROUND@
+#  undef round
 #  define round rpl_round
 extern double round (double x);
 # endif
@@ -244,9 +245,9 @@ extern double round (double x);
      round (x))
 #endif
 
-
 #if @GNULIB_ROUNDL@
 # if !@HAVE_DECL_ROUNDL@
+#  undef roundl
 #  define roundl rpl_roundl
 extern long double roundl (long double x);
 # endif
@@ -335,6 +336,22 @@ extern long double truncl (long double x);
 #endif
 
 
+#if @GNULIB_ISFINITE@
+# if !@HAVE_DECL_ISFINITE@
+extern int gl_isfinitef (float x);
+extern int gl_isfinited (double x);
+extern int gl_isfinitel (long double x);
+#  undef isfinite
+#  define isfinite(x) \
+   (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
+    sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
+    gl_isfinitef (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+  /* How to override a macro?  */
+#endif
+
+
 #if @GNULIB_SIGNBIT@
 # if @REPLACE_SIGNBIT@
 #  undef signbit