math: Fix some C++ test errors on Solaris 8.
[pspp] / lib / math.in.h
index dd7a6344985a2cffe4c7c61db54ec06c40180459..001d59a1dfd42ede445908d561331a8da0cf1cdf 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _GL_MATH_H
+
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
-#ifndef _GL_MATH_H
-
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
 
@@ -186,7 +186,10 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (ceilf, float, (float x));
 _GL_CXXALIAS_RPL (ceilf, float, (float x));
-#else
+# else
+#  if !@HAVE_DECL_CEILF@
+_GL_FUNCDECL_SYS (ceilf, float, (float x));
+#  endif
 _GL_CXXALIAS_SYS (ceilf, float, (float x));
 # endif
 _GL_CXXALIASWARN (ceilf);
@@ -206,6 +209,9 @@ _GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
 _GL_FUNCDECL_RPL (ceill, long double, (long double x));
 _GL_CXXALIAS_RPL (ceill, long double, (long double x));
 # else
+#  if !@HAVE_DECL_CEILL@
+_GL_FUNCDECL_SYS (ceill, long double, (long double x));
+#  endif
 _GL_CXXALIAS_SYS (ceill, long double, (long double x));
 # endif
 _GL_CXXALIASWARN (ceill);
@@ -265,6 +271,9 @@ _GL_WARN_ON_USE (expl, "expl is unportable - "
 _GL_FUNCDECL_RPL (floorf, float, (float x));
 _GL_CXXALIAS_RPL (floorf, float, (float x));
 #else
+#  if !@HAVE_DECL_FLOORF@
+_GL_FUNCDECL_SYS (floorf, float, (float x));
+#  endif
 _GL_CXXALIAS_SYS (floorf, float, (float x));
 # endif
 _GL_CXXALIASWARN (floorf);
@@ -284,6 +293,9 @@ _GL_WARN_ON_USE (floorf, "floorf is unportable - "
 _GL_FUNCDECL_RPL (floorl, long double, (long double x));
 _GL_CXXALIAS_RPL (floorl, long double, (long double x));
 # else
+#  if !@HAVE_DECL_FLOORL@
+_GL_FUNCDECL_SYS (floorl, long double, (long double x));
+#  endif
 _GL_CXXALIAS_SYS (floorl, long double, (long double x));
 # endif
 _GL_CXXALIASWARN (floorl);
@@ -391,6 +403,9 @@ _GL_WARN_ON_USE (logl, "logl is unportable - "
 _GL_FUNCDECL_RPL (roundf, float, (float x));
 _GL_CXXALIAS_RPL (roundf, float, (float x));
 # else
+#  if !@HAVE_DECL_ROUNDF@
+_GL_FUNCDECL_SYS (roundf, float, (float x));
+#  endif
 _GL_CXXALIAS_SYS (roundf, float, (float x));
 # endif
 _GL_CXXALIASWARN (roundf);
@@ -411,6 +426,9 @@ _GL_WARN_ON_USE (roundf, "roundf is unportable - "
 _GL_FUNCDECL_RPL (round, double, (double x));
 _GL_CXXALIAS_RPL (round, double, (double x));
 # else
+#  if !@HAVE_DECL_ROUND@
+_GL_FUNCDECL_SYS (round, double, (double x));
+#  endif
 _GL_CXXALIAS_SYS (round, double, (double x));
 # endif
 _GL_CXXALIASWARN (round);
@@ -431,6 +449,9 @@ _GL_WARN_ON_USE (round, "round is unportable - "
 _GL_FUNCDECL_RPL (roundl, long double, (long double x));
 _GL_CXXALIAS_RPL (roundl, long double, (long double x));
 # else
+#  if !@HAVE_DECL_ROUNDL@
+_GL_FUNCDECL_SYS (roundl, long double, (long double x));
+#  endif
 _GL_CXXALIAS_SYS (roundl, long double, (long double x));
 # endif
 _GL_CXXALIASWARN (roundl);
@@ -499,14 +520,9 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - "
 
 #if @GNULIB_TRUNCF@
 # if !@HAVE_DECL_TRUNCF@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define truncf rpl_truncf
-#  endif
-_GL_FUNCDECL_RPL (truncf, float, (float x));
-_GL_CXXALIAS_RPL (truncf, float, (float x));
-# else
-_GL_CXXALIAS_SYS (truncf, float, (float x));
+_GL_FUNCDECL_SYS (truncf, float, (float x));
 # endif
+_GL_CXXALIAS_SYS (truncf, float, (float x));
 _GL_CXXALIASWARN (truncf);
 #elif defined GNULIB_POSIXCHECK
 # undef truncf
@@ -518,14 +534,9 @@ _GL_WARN_ON_USE (truncf, "truncf is unportable - "
 
 #if @GNULIB_TRUNC@
 # if !@HAVE_DECL_TRUNC@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define trunc rpl_trunc
-#  endif
-_GL_FUNCDECL_RPL (trunc, double, (double x));
-_GL_CXXALIAS_RPL (trunc, double, (double x));
-# else
-_GL_CXXALIAS_SYS (trunc, double, (double x));
+_GL_FUNCDECL_SYS (trunc, double, (double x));
 # endif
+_GL_CXXALIAS_SYS (trunc, double, (double x));
 _GL_CXXALIASWARN (trunc);
 #elif defined GNULIB_POSIXCHECK
 # undef trunc
@@ -544,6 +555,9 @@ _GL_WARN_ON_USE (trunc, "trunc is unportable - "
 _GL_FUNCDECL_RPL (truncl, long double, (long double x));
 _GL_CXXALIAS_RPL (truncl, long double, (long double x));
 # else
+#  if !@HAVE_DECL_TRUNCL@
+_GL_FUNCDECL_SYS (truncl, long double, (long double x));
+#  endif
 _GL_CXXALIAS_SYS (truncl, long double, (long double x));
 # endif
 _GL_CXXALIASWARN (truncl);