comparison lib/math.in.h @ 16631:45443deebb7d

log: Work around OSF/1 5.1 bug. * lib/math.in.h (log): New declaration. * lib/log.c: New file. * m4/log.m4 (gl_FUNC_LOG_WORKS): New macro. (gl_FUNC_LOG): Invoke it. Set REPLACE_LOG. * m4/math_h.m4 (gl_MATH_H): Test whether log is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG. * modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG. * modules/log (Files): Add lib/log.c. (Depends-on): Add math. (configure.ac): If REPLACE_LOG is 1, compile an override. * tests/test-math-c++.cc: Check the declaration of log. * doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.
author Bruno Haible <bruno@clisp.org>
date Fri, 09 Mar 2012 23:55:13 +0100
parents d19d163c1519
children 2450f24b2cbc
comparison
equal deleted inserted replaced
16630:1ac24dbbff5a 16631:45443deebb7d
1131 #elif defined GNULIB_POSIXCHECK 1131 #elif defined GNULIB_POSIXCHECK
1132 # undef logf 1132 # undef logf
1133 # if HAVE_RAW_DECL_LOGF 1133 # if HAVE_RAW_DECL_LOGF
1134 _GL_WARN_ON_USE (logf, "logf is unportable - " 1134 _GL_WARN_ON_USE (logf, "logf is unportable - "
1135 "use gnulib module logf for portability"); 1135 "use gnulib module logf for portability");
1136 # endif
1137 #endif
1138
1139 #if @GNULIB_LOG@
1140 # if @REPLACE_LOG@
1141 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1142 # undef log
1143 # define log rpl_log
1144 # endif
1145 _GL_FUNCDECL_RPL (log, double, (double x));
1146 _GL_CXXALIAS_RPL (log, double, (double x));
1147 # else
1148 _GL_CXXALIAS_SYS (log, double, (double x));
1149 # endif
1150 _GL_CXXALIASWARN (log);
1151 #elif defined GNULIB_POSIXCHECK
1152 # undef log
1153 # if HAVE_RAW_DECL_LOG
1154 _GL_WARN_ON_USE (log, "log has portability problems - "
1155 "use gnulib module log for portability");
1136 # endif 1156 # endif
1137 #endif 1157 #endif
1138 1158
1139 #if @GNULIB_LOGL@ 1159 #if @GNULIB_LOGL@
1140 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ 1160 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@