lib/math.in.h


Log

Author Commit Date CI Message
Pádraig Brady 7b089321 2025-01-01T09:24:36 maint: run 'make update-copyright'
Bruno Haible 0c5c7fcf 2024-12-06T20:48:06 signbit: Fix compilation error with g++ 5.5 on Solaris 10. Reported by G. Branden Robinson <g.branden.robinson@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00180.html>. * lib/math.in.h (signbit): In C++ 11 or newer, assume that <math.h> or <cmath> may define signbit through three inline functions.
Paul Eggert cf96562f 2024-09-16T09:45:36 Don’t port July [[...]] changes to C89 Yesterday’s changes to port to C17 and earlier were intrusive, since they twice replaced one macro with two. Revert the macro definitions to what they were before yesterday, and instead change callers so that they always have four arguments even if the last one is empty. Although this change requires C99 or later, that’s safe nowadays. Suggested by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2024-09/msg00079.html * lib/c++defs.h (_GL_FUNCDECL_RPL, _GL_FUNCDECL_SYS): Revert yesterday’s changes. All callers changed. Add comments explaining the required comma before missing attrs.
Paul Eggert 4531edcf 2024-09-15T21:20:15 Port July changes for [[...]] to C17 The July 30 changes to _GL_FUNCDECL_RPL etc. to support use of attributes in bracket syntax used a C23 preprocessor feature that is a common extension to C17 and earlier, but which doesn’t work when compiled with stricter C17-and-earlier compilers. The feature is using ‘#define f(a, ...) b’ and calling ‘f’ with only one arg. Port back to C17 and earlier. Problem discovered with IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) on cfarm111. * lib/c++defs.h (_GL_FUNCDECL_RPL): Turn this into two macros _GL_FUNCDECL_RPL and _GL_FUNCATTR_RPL. The first macro is for functions without attributes, the second one for functions with attributes. All uses changed. (_GL_FUNCDECL_SYS): Likewise, turn this into _GL_FUNCDECL_SYS and _GL_FUNCATTR_SYS.
Bruno Haible 12621744 2024-09-01T18:09:28 math: Remove workaround for an older Haiku bug. * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Don't override on Haiku. * doc/posix-headers/math.texi: Update.
Bruno Haible 32944e37 2024-08-08T03:21:34 math: Fix INFINITY and NAN on mingw. * doc/posix-headers/math.texi: Mention this mingw bug. * lib/math.in.h (INFINITY, NAN): Replace also on mingw.
Bruno Haible 017e80f8 2024-08-06T01:05:05 math: Fix HUGE_VAL and HUGE_VALL on AIX. * lib/math.in.h (HUGE_VAL, HUGE_VALL): Override on AIX. * doc/posix-headers/math.texi: Mention this AIX problem.
Bruno Haible 0f585472 2024-08-01T16:41:23 math: Fix INFINITY and NAN on FreeBSD and AIX. * doc/posix-headers/math.texi: Mention some FreeBSD and AIX bugs. * lib/math.in.h (INFINITY): New macro. (NAN): Replace also on FreeBSD < 8 and AIX. Use __builtin_nanf where available. (HUGE_VALF): Replace also on FreeBSD < 6. Use __builtin_inff where available. (HUGE_VAL): Replace also on FreeBSD < 6. Use __builtin_inf where available. (HUGE_VALL): Replace also on FreeBSD < 6. Use __builtin_infl where available. * tests/test-math.c: Check that INFINITY, NAN, HUGE_VALF, HUGE_VAL, HUGE_VALL are constant expressions. (main): Check the type of INFINITY and NAN.
Bruno Haible 513ef326 2024-07-30T19:22:40 Reenable use of attributes in bracket syntax [[...]] (regr. yesterday). * m4/gnulib-common.m4 (gl_COMMON_BODY): Add more comments. Don't define _GL_BRACKET_USABLE. * lib/c++defs.h (_GL_EXTERN_C_FUNC): New macro. (_GL_FUNCDECL_RPL, _GL_FUNCDECL_RPL_1, _GL_FUNCDECL_SYS): Expect the attributes in an optional 4th argument. Expand them before the return type. * lib/arpa_inet.in.h: Update all _GL_FUNCDECL_RPL and _GL_FUNCDECL_SYS invocations. * lib/dirent.in.h: Likewise. * lib/error.in.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/glob.in.h: Likewise. * lib/iconv.in.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/malloc.in.h: Likewise. * lib/math.in.h: Likewise. * lib/monetary.in.h: Likewise. * lib/netdb.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/search.in.h: Likewise. * lib/signal.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/string.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utime.in.h: Likewise. * lib/wchar.in.h: Likewise. * lib/wctype.in.h: Likewise. * lib/c-vasprintf.h (c_aszprintf, c_vaszprintf, c_asprintf, c_vasprintf): Move _GL_ATTRIBUTE_NODISCARD back to the beginning of the declaration.
Bruno Haible 3f8e0614 2024-07-29T13:38:46 logp1l: New module. * lib/math.in.h (logp1l): New declaration. * lib/logp1l.c: New file. * m4/logp1l.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logp1l is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LOGP1L. (gl_MATH_H_DEFAULTS): Initialize HAVE_LOGP1L. * modules/math (Makefile.am): Substitute GNULIB_LOGP1L, HAVE_LOGP1L. * modules/logp1l: New file. * doc/posix-functions/logp1l.texi: Mention the new module.
Bruno Haible 4fc589a2 2024-07-29T13:15:23 logp1f: New module. * lib/math.in.h (logp1f): New declaration. * lib/logp1f.c: New file. * m4/logp1f.m4: New file. * m4/log1p.m4 (gl_FUNC_LOG1P): Define through AC_DEFUN_ONCE. * m4/isnand.m4 (gl_FUNC_ISNAND): Define through AC_DEFUN_ONCE. * m4/math_h.m4 (gl_MATH_H): Test whether logp1f is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LOGP1F. (gl_MATH_H_DEFAULTS): Initialize HAVE_LOGP1F. * modules/math (Makefile.am): Substitute GNULIB_LOGP1F, HAVE_LOGP1F. * modules/logp1f: New file. * doc/posix-functions/logp1f.texi: Mention the new module.
Bruno Haible 4cab49fa 2024-07-29T03:24:51 logp1: New module. * lib/math.in.h (logp1): New declaration. * lib/logp1.c: New file. * m4/logp1.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logp1 is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LOGP1. (gl_MATH_H_DEFAULTS): Initialize HAVE_LOGP1. * modules/math (Makefile.am): Substitute GNULIB_LOGP1, HAVE_LOGP1. * modules/logp1: New file. * doc/posix-functions/logp1.texi: Mention the new module.
Bruno Haible 5196a8f0 2024-06-02T18:34:36 isnanf, isnand, isnanl: Fix link errors on AIX 7.1 with xlc. * lib/isnanf-nolibm.h (HAVE_ISNANF_NOLIBM): New macro. * lib/isnand-nolibm.h (HAVE_ISNAND_NOLIBM): New macro. * lib/isnanl-nolibm.h (HAVE_ISNANL_NOLIBM): New macro. * lib/math.h (isnanf): Don't define via isnan if HAVE_ISNANF_NOLIBM is defined. (isnand): Don't define via isnan if HAVE_ISNAND_NOLIBM is defined. (isnanl): Don't define via isnan if HAVE_ISNANL_NOLIBM is defined.
Bruno Haible a0e8c027 2024-04-19T02:22:16 totalordermagl: New module. * lib/math.in.h (totalordermagl): New declaration. * lib/totalordermagl.c: New file, based on lib/totalorderl.c. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagl is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGL. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGL, HAVE_TOTALORDERMAGL, REPLACE_TOTALORDERMAGL. * modules/totalordermagl: New file, based on modules/totalorderl. * doc/posix-functions/totalordermagl.texi: Mention the new module.
Bruno Haible 5960f765 2024-04-19T02:21:56 totalordermagf: New module. * lib/math.in.h (totalordermagf): New declaration. * lib/totalordermagf.c: New file, based on lib/totalorderf.c. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermagf is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAGF. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAGF, HAVE_TOTALORDERMAGF, REPLACE_TOTALORDERMAGF. * modules/totalordermagf: New file, based on modules/totalorderf. * doc/posix-functions/totalordermagf.texi: Mention the new module.
Bruno Haible 9b5f6e60 2024-04-19T02:21:21 totalordermag: New module. * lib/math.in.h (totalordermag): New declaration. * lib/totalordermag.c: New file, based on lib/totalorder.c. * m4/totalordermag.m4: New file, based on m4/totalorder.m4. * m4/math_h.m4 (gl_MATH_H): Test whether totalordermag is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAG. (gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG. * modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAG, HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG. * modules/totalordermag: New file, based on modules/totalorder. * doc/posix-functions/totalordermag.texi: Mention the new module.
Bruno Haible 63f3bcdc 2024-04-17T11:08:40 getpayloadl: New module. * lib/math.in.h (getpayloadl): New declaration. * lib/getpayloadl.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether getpayloadl is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADL. (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL. * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADL, HAVE_GETPAYLOADL, REPLACE_GETPAYLOADL. * modules/getpayloadl: New file. * doc/posix-functions/getpayloadl.texi: Mention the new module and the glibc bug.
Bruno Haible 282b03a5 2024-04-17T11:02:52 getpayloadf: New module. * lib/math.in.h (getpayloadf): New declaration. * lib/getpayloadf.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether getpayloadf is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOADF. (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF. * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOADF, HAVE_GETPAYLOADF, REPLACE_GETPAYLOADF. * modules/getpayloadf: New file. * doc/posix-functions/getpayloadf.texi: Mention the new module and the glibc bug.
Bruno Haible 20b8f23d 2024-04-17T10:57:05 getpayload: New module. * lib/math.in.h (getpayload): New declaration. * lib/getpayload.c: New file. * m4/getpayload.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether getpayload is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPAYLOAD. (gl_MATH_H_DEFAULTS): Initialize HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD. * modules/math (Makefile.am): Substitute GNULIB_GETPAYLOAD, HAVE_GETPAYLOAD, REPLACE_GETPAYLOAD. * modules/getpayload: New file. * doc/posix-functions/getpayload.texi: Mention the new module and the glibc bug.
Bruno Haible 7a4a7fd1 2024-04-16T21:28:42 setpayloadsigl: New module. * lib/math.in.h (setpayloadsigl): New declaration. * lib/setpayloadsigl.c: New file, based on lib/setpayloadl.c. * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsigl is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIGL. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIGL. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIGL, HAVE_SETPAYLOADSIGL. * modules/setpayloadsigl: New file. * doc/posix-functions/setpayloadsigl.texi: Mention the new module.
Bruno Haible 8cf6f8cd 2024-04-16T21:12:39 setpayloadsigf: New module. * lib/math.in.h (setpayloadsigf): New declaration. * lib/setpayloadsigf.c: New file, based on lib/setpayloadf.c. * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsigf is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIGF. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIGF. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIGF, HAVE_SETPAYLOADSIGF. * modules/setpayloadsigf: New file. * doc/posix-functions/setpayloadsigf.texi: Mention the new module.
Bruno Haible f9e62b06 2024-04-16T21:01:17 setpayloadsig: New module. * lib/math.in.h (setpayloadsig): New declaration. * lib/setpayloadsig.c: New file, based on lib/setpayload.c. * m4/setpayloadsig.m4: New file, based on m4/setpayload.m4. * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadsig is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADSIG. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADSIG. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADSIG, HAVE_SETPAYLOADSIG. * modules/setpayloadsig: New file. * doc/posix-functions/setpayloadsig.texi: Mention the new module.
Bruno Haible 9ee372d3 2024-04-16T14:57:25 setpayloadl: New module. * lib/math.in.h (setpayloadl): New declaration. * lib/setpayloadl.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadl is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADL. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADL. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADL, HAVE_SETPAYLOADL. * modules/setpayloadl: New file. * doc/posix-functions/setpayloadl.texi: Mention the new module.
Bruno Haible eaa0ca65 2024-04-16T14:39:16 setpayloadf: New module. * lib/math.in.h (setpayloadf): New declaration. * lib/setpayloadf.c: New file. * m4/math_h.m4 (gl_MATH_H): Test whether setpayloadf is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOADF. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOADF. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOADF, HAVE_SETPAYLOADF. * modules/setpayloadf: New file. * doc/posix-functions/setpayloadf.texi: Mention the new module.
Bruno Haible e53309da 2024-04-16T14:25:27 setpayload: New module. * lib/math.in.h (setpayload): New declaration. * lib/setpayload.c: New file. * m4/setpayload.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether setpayload is declared. (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SETPAYLOAD. (gl_MATH_H_DEFAULTS): Initialize HAVE_SETPAYLOAD. * modules/math (Makefile.am): Substitute GNULIB_SETPAYLOAD, HAVE_SETPAYLOAD. * modules/setpayload: New file. * doc/posix-functions/setpayload.texi: Mention the new module.
Bruno Haible 431d6a76 2024-02-28T00:33:49 isnan: Fix compilation error in C++ mode on OpenBSD 7.5-beta. Reported by Christian Weisgerber <naddy@mips.inka.de> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00261.html>. * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define on all platforms with clang ≥ 14.
Bruno Haible d4453c97 2024-02-14T20:08:15 isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2. Reported by Paul E Reimer <reimer@anl.gov> in <https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00002.html>. * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS with clang ≥ 14.
Simon Josefsson 5b92dd0a 2024-01-01T10:31:48 maint: run 'make update-copyright'
Bruno Haible 13017f5c 2023-10-13T12:05:29 isnanf, isnand: Fix conflict with Solaris <ieeefp.h>. * lib/math.in.h (isnanf, isnand): On Solaris and IRIX, declare this function, instead of defining it as a macro.
Paul Eggert 0eb46924 2023-10-01T21:46:01 totalorder, totalorderf, totalorderl: new modules * lib/math.in.h: Declare totalorderf, totalorder, totalorderl. * lib/totalorder.c, lib/totalorderf.c, lib/totalorderl.c: * m4/totalorder.m4, modules/totalorder, modules/totalorder-tests: * modules/totalorderf, modules/totalorderf-tests: * modules/totalorderl, modules/totalorderl-tests: * tests/test-totalorder.c, tests/test-totalorderf.c: * tests/test-totalorderl.c: New files. * m4/math_h.m4 (gl_MATH_H, gl_MATH_H_REQUIRE_DEFAULTS) (gl_MATH_H_DEFAULTS): * modules/math (math.h): Set up totalorder, totalorderf, totalorderl. * m4/mathfunc.m4 (gl_MATHFUNC): Also support pointer-to-const.
Bruno Haible 835209cf 2023-09-04T21:54:09 Use statement-expressions without warnings, even in strict ISO C mode. Suggested by Eric Blake <eblake@redhat.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00025.html>. * lib/error.in.h (__gl_error_call): Use the variant with obvious control flow also with clang. Use '__extension__' to avoid -Wpedantic warnings. * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Define as macros even when __STRICT_ANSI__ is defined. But use '__extension__' to avoid -Wpedantic warnings. * lib/setenv.c (KNOWN_VALUE): Use '__extension__' to avoid -Wpedantic warnings. * lib/xalloc-oversized.h (xalloc_oversized): Use optimized variant even when __STRICT_ANSI__ is defined. But use '__extension__' to avoid -Wpedantic warnings.
Bruno Haible d820198e 2023-08-20T15:01:25 ldexp: Fix compilation error in C++ mode. * lib/math.in.h (ldexp): Use _GL_CXXALIASWARN1, not _GL_CXXALIASWARN.
Bruno Haible fed956a8 2023-08-20T02:43:01 ldexp: Work around OpenBSD/mips64 bug. * lib/math.in.h (ldexp): New declaration. * lib/ldexp.c: New file, based on lib/ldexpl.c. * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include it. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP. (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP. * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider it when setting LDEXP_LIBM. (gl_FUNC_LDEXP_WORKS): New macro. * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP. * modules/ldexp (Files): Add lib/ldexp.c. (Depends-on): Add math, isnand. (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR. (Makefile.am): Conditionally compile ldexp.c. * modules/ldexpl (Files): Add lib/ldexp.c. * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
Bruno Haible 9f182146 2023-04-15T00:46:57 isnan: Fix compilation error in C++ mode on FreeBSD 13.2. * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan through _GL_MATH_CXX_REAL_FLOATING_DECL_2.
Bruno Haible dcba8542 2023-04-13T22:17:02 Adjust comments in <config.h> reminders. * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*. * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
Bruno Haible 8ad7bc67 2023-04-12T14:49:29 Add more reminders to include <config.h>. * m4/gnulib-common.m4 (gl_COMMON): In config.h, define _GL_CONFIG_H_INCLUDED. * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of _GL_INLINE_HEADER_BEGIN. * lib/alignalloc.h: Likewise. * lib/argp-fmtstream.h: Likewise. * lib/argp.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/c-ctype.h: Likewise. * lib/count-leading-zeros.h: Likewise. * lib/count-one-bits.h: Likewise. * lib/count-trailing-zeros.h: Likewise. * lib/eealloc.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/gethrxtime.h: Likewise. * lib/gl_list.h: Likewise. * lib/gl_map.h: Likewise. * lib/gl_omap.h: Likewise. * lib/gl_openssl.h: Likewise. * lib/gl_oset.h: Likewise. * lib/gl_set.h: Likewise. * lib/gl_xlist.h: Likewise. * lib/gl_xmap.h: Likewise. * lib/gl_xomap.h: Likewise. * lib/gl_xoset.h: Likewise. * lib/gl_xset.h: Likewise. * lib/gl_xsublist.h: Likewise. * lib/glthread/cond.h: Likewise. * lib/hamt.h: Likewise. * lib/ialloc.h: Likewise. * lib/math.in.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * lib/openat.h: Likewise. * lib/pipe-filter-aux.h: Likewise. * lib/priv-set.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/savewd.h: Likewise. * lib/se-context.in.h: Likewise. * lib/se-label.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sig-handler.h: Likewise. * lib/stat-time.h: Likewise. * lib/string-desc-quotearg.h: Likewise. * lib/string-desc.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/timespec.h: Likewise. * lib/u64.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utimens.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xsize.h: Likewise. * lib/xstring-desc.h: Likewise. * lib/xtime.h: Likewise. * lib/acl.h: Check that config.h was already included. * lib/alignof.h: Likewise. * lib/argmatch.h: Likewise. * lib/argv-iter.h: Likewise. * lib/arpa_inet.in.h: Likewise. * lib/attribute.h: Likewise. * lib/backupfile.h: Likewise. * lib/base32.h: Likewise. * lib/base64.h: Likewise. * lib/basename-lgpl.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-snprintf.h: Likewise. * lib/c-stack.h: Likewise. * lib/c-strcase.h: Likewise. * lib/c-vasnprintf.h: Likewise. * lib/c-vasprintf.h: Likewise. * lib/c-vsnprintf.h: Likewise. * lib/c-xvasprintf.h: Likewise. * lib/canon-host.h: Likewise. * lib/canonicalize.h: Likewise. * lib/clean-temp.h: Likewise. * lib/concat-filename.h: Likewise. * lib/ctype.in.h: Likewise. * lib/dfa.h: Likewise. * lib/di-set.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/dirent.in.h: Likewise. * lib/dirname.h: Likewise. * lib/eloop-threshold.h: Likewise. * lib/error.in.h: Likewise. * lib/exclude.h: Likewise. * lib/fatal-signal.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/flexmember.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/fpending.h: Likewise. * lib/freadable.h: Likewise. * lib/freadahead.h: Likewise. * lib/freading.h: Likewise. * lib/fts_.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * lib/gc.h: Likewise. * lib/get_progname_of.h: Likewise. * lib/glob.in.h: Likewise. * lib/glthread/thread.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hash.h: Likewise. * lib/i-ring.h: Likewise. * lib/iconv.in.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/javaversion.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/localename.h: Likewise. * lib/malloc.in.h: Likewise. * lib/malloca.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memchr2.h: Likewise. * lib/memcmp2.h: Likewise. * lib/modechange.h: Likewise. * lib/monetary.in.h: Likewise. * lib/mountlist.h: Likewise. * lib/netdb.in.h: Likewise. * lib/obstack.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/pipe-filter.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readutmp.h: Likewise. * lib/regex-quote.h: Likewise. * lib/relocatable.h: Likewise. * lib/savedir.h: Likewise. * lib/sched.in.h: Likewise. * lib/search.in.h: Likewise. * lib/sh-quote.h: Likewise. * lib/signal.in.h: Likewise. * lib/sigpipe-die.h: Likewise. * lib/sockets.h: Likewise. * lib/spawn.in.h: Likewise. * lib/ssfmalloc.h: Likewise. * lib/stack.h: Likewise. * lib/stdalign.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * lib/strerror-override.h: Likewise. * lib/striconv.h: Likewise. * lib/striconveh.h: Likewise. * lib/striconveha.h: Likewise. * lib/string-buffer.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strnlen1.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/system-quote.h: Likewise. * lib/term-style-control.h: Likewise. * lib/termios.in.h: Likewise. * lib/textstyle.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/trim.h: Likewise. * lib/utime.in.h: Likewise. * lib/utmp.in.h: Likewise. * lib/vasnprintf.h: Likewise. * lib/verror.h: Likewise. * lib/version-etc.h: Likewise. * lib/wchar.in.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/windows-thread.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmalloca.h: Likewise. * lib/xmemdup0.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xstriconv.h: Likewise. * lib/xstriconveh.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtol-error.h: Likewise. * lib/xvasprintf.h: Likewise. * Makefile (config_h_MACROS*): New variables. (sc_check_config_h_reminder): New rule.
Bruno Haible 8eb15296 2023-02-09T19:27:37 math: Fix compilation error in C++ mode on macOS 12.5. * lib/math.in.h (isnan): On macOS, treat clang version 14 again like clang versions < 12.
Bruno Haible 307c5c69 2023-01-22T02:25:19 Resolve conflicts for functions introduced in Android API level 18. * m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2. * m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F. * m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L. * lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on non-glibc systems.
Bruno Haible 4be3a1e8 2023-01-10T09:58:40 math: Fix compilation errors in C++ mode on Android. * lib/math.in.h: Declare nothing if this file gets included from /usr/include/c++/v1/math.h too early.
Simon Josefsson 32a72f45 2023-01-01T01:14:21 maint: run 'make update-copyright'
Bruno Haible 611341cd 2022-09-10T18:03:02 math: Fix compilation error in C++ mode on AIX 7.2 with xlclang. * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl, log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias warning only on glibc systems.
Bruno Haible 258e4688 2022-09-03T00:56:19 math C++ tests: Fix compilation error with clang on FreeBSD 13. * lib/math.in.h (isnan): For clang >= 11 on FreeBSD, declare 'isnan', not 'rpl_isnan'.
Bruno Haible 3308ca32 2022-04-13T23:43:05 math: Fix errors in C++ mode on glibc systems with clang. * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISFINITE, GNULIB_NAMESPACE_LACKS_ISINF, GNULIB_NAMESPACE_LACKS_ISNAN, GNULIB_NAMESPACE_LACKS_SIGNBIT): New macros. * tests/test-math-c++.cc (isfinite): Skip test if GNULIB_NAMESPACE_LACKS_ISFINITE is 1. (isinf): Skip test if GNULIB_NAMESPACE_LACKS_ISINF is 1. (isnan): Skip test if GNULIB_NAMESPACE_LACKS_ISNAN is 1. (signbit): Skip test if GNULIB_NAMESPACE_LACKS_SIGNBIT is 1.
Paul Eggert eec12c00 2022-01-01T09:43:19 maint: run 'make update-copyright'
Bruno Haible 354f27fe 2021-08-22T23:54:40 Make generated .in.h files as standalone as possible. Reported by Jan Engelhardt <jengelh@inai.de>. * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition. * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition. * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition. * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency with the other *.in.h files. * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definition. * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of _GL_UNUSED. (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definitions.
Bruno Haible 5ffa1440 2021-06-04T20:55:41 Put LGPLv2+ notices in source files where appropriate. * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
Bruno Haible cfe9452d 2021-03-20T22:34:16 math C++ tests: Fix compilation error on macOS 11.2. * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan', not 'isnan'.
Bruno Haible 9b8b302f 2021-01-06T11:59:57 ilogbl: Fix compilation error with xlclang on AIX 7.2. * lib/math.in.h (ilogbl): Undefine macro before declaration.
Paul Eggert 4b948321 2021-01-01T07:28:52 maint: run 'make update-copyright'
Bruno Haible 52c7413a 2020-12-25T13:48:17 Make it possible to turn off each of the Windows oldnames workarounds. * lib/fcntl.in.h (creat, open): Conditionalize each of the Windows oldnames workarounds through a GNULIB_MDA_<func> symbol. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these GNULIB_MDA_<func> symbols. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise. * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise. * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise. * modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func> symbols. * modules/math (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/sys_stat (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/utime-h (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise.
Bruno Haible 24ce2671 2020-12-09T18:08:18 math C++ tests: Fix compilation error in with clang >= 7 on FreeBSD. * lib/math.in.h (isnan): For clang >= 7 on FreeBSD, declare 'rpl_isnan', not 'isnan'.
Bruno Haible 5b6ea851 2020-12-06T16:43:36 Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE. Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>. * lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro. * lib/fcntl.in.h (creat, open): In C++ mode, when GNULIB_NAMESPACE is defined: 1. Define a symbol in this namespace. 2. Don't redirect using a preprocessor #define. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL. (gl_STDIO_H): Set HAVE_DECL_FCLOSEALL. * modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. (gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. * modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE. (gl_UNISTD_H): Set HAVE_DECL_EXECVPE. * modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP. (gl_WCHAR_H): Set HAVE_DECL_WCSDUP. * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
Bruno Haible e2b183be 2020-12-02T21:15:21 Fix compilation errors in test-math-c++.cc on FreeBSD 12.2/arm64. * lib/math.in.h (_GL_INCLUDING_MATH_H): New macro, to work around recursive self-include problem on FreeBSD 12.2 in C++ mode.
Bruno Haible 001a3984 2020-08-19T21:29:08 math C++ tests: Fix compilation error in with GCC 10. * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder, rint, round, trunc): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
Bruno Haible 1f13f457 2020-08-19T10:39:59 Fix compilation errors in C++ mode on OpenBSD. * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on OpenBSD with clang, use the approach without C preprocessor macro.
Bruno Haible ad3f6af5 2020-08-16T18:39:29 math: Optimize signbit also on clang. * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Optimize also on clang.
Bruno Haible 9b281978 2020-08-16T13:00:17 Fix "warning: attribute declaration must precede definition" with clang. * lib/math.in.h (acosl, asinl, atanl, ceill, cosl, expl, fabsf, fabsl, floorl, fmodl, frexpf, frexpl, hypotf, hypotl, ldexpf, ldexpl, logl, log10l, modfl, sinl, sqrtl, tanl): Disable _GL_CXXALIASWARN invocation on non-glibc systems. * lib/netdb.in.h (gai_strerror): Likewise. * lib/stdio.in.h (snprintf, vfscanf, vscanf, vsnprintf): Likewise. * lib/sys_stat.in.h (fstat): Likewise. * lib/utime.in.h (utime): Likewise.
Bruno Haible d4c637e5 2020-08-15T16:54:17 Support compiling without -loldnames on native Windows. * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros. * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES. (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/dup2.m4 (gl_FUNC_DUP2): Likewise. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise. * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise. * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE): Likewise. * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise. * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise. * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise. * m4/pread.m4 (gl_FUNC_PREAD): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/select.m4 (gl_FUNC_SELECT): Likewise. * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise. * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise. * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * m4/utimens.m4 (gl_UTIMENS): Likewise. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't test for getcwd. * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime. * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program with GL_MDA_DEFINES. * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro. * lib/fcntl.in.h (creat, open): On native Windows, use the underscore- prefixed symbol. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. (isfinite, isinf, isnan, signbit): On native Windows, don't define as an rpl_-prefixed macro. * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd. * lib/close.c (close_nothrow): On native Windows, use _close. * lib/creat.c (orig_creat): On native Windows, use _creat. * lib/dup.c (dup_nothrow): On native Windows, use _dup. * lib/dup2.c (dup2_nothrow): Use _dup2. * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen. * lib/getcwd-lgpl.c: On native Windows, use _getcwd. * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw. * lib/open.c (orig_open): On native Windows, use _open. * lib/read.c (read_nothrow): Use _read. * lib/rmdir.c: On native Windows, use _rmdir. * lib/unlink.c: On native Windows, use _unlink. * lib/write.c (write_nothrow): Use _write. * lib/sys_select.in.h (close): With clang, don't attach a warning on an undefined symbol. * lib/sys_socket.in.h (close): Likewise. * lib/sys_time.in.h (close): Likewise. * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
Bruno Haible d6dabe8e 2020-08-09T12:36:37 Use __builtin_signbit* with clang. * lib/math.in.h (signbit): Use __builtin_signbit{,f,l} also on clang. * m4/signbit.m4 (gl_SIGNBIT): Use __builtin_signbit{,f,l} also on clang. Set REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC. * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
Bruno Haible a3696e42 2020-08-09T12:09:17 Use __builtin_isnan with clang. * lib/isnanf-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan, not __builtin_isnanf. Also on clang. * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Use the GCC built-in __builtin_isnan, not __builtin_isnanf. Also on clang. * lib/isnand-nolibm.h (isnand): With clang, use the GCC built-in. * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): With clang, use the GCC built-in. * lib/isnanl-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang. * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_FUNC_ISNANL_WORKS): Use the GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang. * lib/math.in.h (__has_builtin): Remove macro. (isnanf, gl_isnan_f): Use the GCC built-in __builtin_isnan, not __builtin_isnanf. Also on clang. (isnand, gl_isnan_d): With clang, use the GCC built-in. (isnanl, gl_isnan_l): Use the GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang. (isnan): Use the GCC built-in __builtin_isnan in all three cases. Also on clang.
Bruno Haible 665e4118 2020-05-23T21:17:22 isnanf, isnanl, isnan: Don't use nonexistent builtins with clang. * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM, gl_ISNANF_WORKS): Don't use __builtin_isnanf on clang versions that don't have it. * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS): Don't use __builtin_isnanl on clang versions that don't have it. * lib/isnanf-nolibm.h (__has_builtin): New macro. (isnanf): Don't use __builtin_isnanf on clang versions that don't have it. * lib/isnanl-nolibm.h (__has_builtin): New macro. (isnanl): Don't use __builtin_isnanl on clang versions that don't have it. * lib/math.in.h (__has_builtin): New macro. (isnanf): Don't use __builtin_isnanf on clang versions that don't have it. (isnanl): Don't use __builtin_isnanl on clang versions that don't have it. (isnan): Don't use the builtins on clang versions that don't have __builtin_isnanf and __builtin_isnanl.
Paul Eggert 2cdc1baf 2020-01-01T00:00:18 maint: Run 'make update-copyright'
Bruno Haible 1554ca2f 2019-12-08T17:35:49 Fix compilation errors on HP-UX 11/ia64. * lib/math.in.h (copysignf, fmaf, fma): Undefine before _GL_FUNCDECL_SYS.
Bruno Haible 03cd507f 2019-12-08T12:58:13 Fix compilation errors in C++ mode on macOS and FreeBSD. * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS or FreeBSD with clang, use the approach without C preprocessor macro.
Bruno Haible 75da6fe3 2019-12-05T03:18:42 Fix compilation errors in C++ mode with xlclang++ on AIX. * lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in C++ mode on AIX. (isfinite, signbit): In C++ mode on AIX with clang, use the approach without C preprocessor macro. * lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. * lib/threads.in.h (thrd_exit): Likewise.
Bruno Haible 98d37180 2019-11-21T11:44:12 Disable many _GL_CXXALIASWARN on all platforms other than glibc systems. Reported by Christian Biesinger <cbiesinger@google.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00066.html>. * lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on non-glibc systems. * lib/locale.in.h (localeconv, setlocale): Likewise. * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod, frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder, rint, round, trunc): Likewise. * lib/monetary.in.h (strfmon_l): Likewise. * lib/pthread.in.h (pthread_mutexattr_getrobust, pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): Likewise. * lib/signal.in.h (raise, signal): Likewise. * lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc, fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar, perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf, tmpfile, vfprintf, vprintf, vsprintf): Likewise. * lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb): Likewise. * lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror): Likewise. * lib/time.in.h (mktime, localtime, ctime, strftime): Likewise. * lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs, wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll, wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok, wcsftime): Likewise. * lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
Bruno Haible 8e035788 2019-08-28T18:03:43 isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw. Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. (isfinite, isinf, isnan, signbit): On platforms that use C++ include files from GCC 6 or newer, use an override through '#define', because the inline definitions in the platform's <cmath> cannot be overridden in another way.
Bruno Haible 38ab8ed6 2019-08-28T10:34:40 isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw. Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. (isfinite, isinf, isnan, signbit): On mingw, use an override through '#define', because the inline definitions in the platform's <cmath> cannot be overridden in another way.
Bruno Haible c2b2754f 2019-04-13T00:17:58 signbit: Fix compilation error when gnulib's math.h exists twice. * lib/math.in.h (GNULIB_defined_signbit): New macro.
Bruno Haible 5b490ef0 2019-01-21T00:33:28 rintl: Override broken implementation on NetBSD. * lib/math.in.h (rintl): Test also REPLACE_RINTL. * m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set REPLACE_RINTL. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL. * modules/math (Makefile.in): Substitute REPLACE_RINTL. * modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL. * doc/posix-functions/rintl.texi: Mention the NetBSD bug.
Bruno Haible 67df3cff 2019-01-20T22:28:37 expm1l: Work around inaccurate implementation on NetBSD. * lib/math.in.h (expm1l): Test also REPLACE_EXPM1L. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Add test for a certain accuracy. Set REPLACE_EXPM1L. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1L. * modules/math (Makefile.in): Substitute REPLACE_EXPM1L. * modules/expm1l (Depends-on, configure.ac): Test REPLACE_EXPM1L. * doc/posix-functions/expm1l.texi: Mention the NetBSD bug.
Bruno Haible 0ac7b431 2019-01-20T22:04:01 expl: Work around inaccurate implementation on NetBSD. * lib/math.in.h (expl): Test also REPLACE_EXPL. * m4/expl.m4 (gl_FUNC_EXPL): Add test for a certain accuracy. Set REPLACE_EXPL. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPL. * modules/math (Makefile.in): Substitute REPLACE_EXPL. * modules/expl (Depends-on, configure.ac): Test REPLACE_EXPL. * doc/posix-functions/expl.texi: Mention the NetBSD bug.
Paul Eggert e6633650 2019-01-01T00:25:11 maint: Run 'make update-copyright'
Bruno Haible efb15adf 2018-08-05T14:06:08 Fix link error regarding 'rpl_environ' (regression from 2012-11-21). * m4/extern-inline.m4: Add more comments. * lib/warn-on-use.h (_GL_WARN_ON_USE_ATTRIBUTE): New macro. * lib/unistd.in.h (rpl_environ): Use it instead of _GL_WARN_ON_USE. * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL): Likewise.
Paul Eggert 281b825e 2018-01-01T00:57:25 maint: Run 'make update-copyright'
Bruno Haible 625f7aea 2017-10-29T12:57:35 ilogbl: Ensure replacement on Haiku. * m4/ilogbl.m4 (gl_FUNC_ILOGBL): Invoke gl_FUNC_ILOGBL_WORKS and set REPLACE_ILOGBL if ilogbl does not work. (gl_FUNC_ILOGBL_WORKS): New macro. * lib/math.in.h (ilogbl): Replace if REPLACE_ILOGBL is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ILOGBL. * modules/math (Makefile.am): Substitute REPLACE_ILOGBL. * modules/ilogbl (Depends-on, configure.ac): Consider REPLACE_ILOGBL. * doc/posix-functions/ilogbl.texi: Mention the Haiku problem.
Bruno Haible 5beeeb81 2017-10-29T10:49:55 math: Fix test failure on Haiku.
Paul Eggert ca35d468 2017-09-13T00:48:18 all: prefer https: URLs
John E. Malmberg 9d63a16e 2017-07-15T17:10:51 math: Add support for OpenVMS. * lib/math.in.h [__VMS]: Include <fp.h>. * doc/posix-headers/math.texi: Mention OpenVMS issues.
Paul Eggert a3fd683d 2017-01-01T02:59:23 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
Bruno Haible 51150279 2016-12-17T20:51:33 tanhf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANHF. * m4/tanhf.m4 (gl_FUNC_TANHF): Set REPLACE_TANHF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_TANHF. * lib/math.in.h (tanhf): Override if REPLACE_TANHF is 1.
Bruno Haible 9ef2e6d2 2016-12-17T20:48:34 tanf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANF. * m4/tanf.m4 (gl_FUNC_TANF): Set REPLACE_TANF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_TANF. * lib/math.in.h (tanf): Override if REPLACE_TANF is 1.
Bruno Haible c7a2c318 2016-12-17T20:44:37 sqrtf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SQRTF. * m4/sqrtf.m4 (gl_FUNC_SQRTF): Set REPLACE_SQRTF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_SQRTF. * lib/math.in.h (sqrtf): Override if REPLACE_SQRTF is 1.
Bruno Haible 0225ce36 2016-12-17T20:41:36 sinhf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINHF. * m4/sinhf.m4 (gl_FUNC_SINHF): Set REPLACE_SINHF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_SINHF. * lib/math.in.h (sinhf): Override if REPLACE_SINHF is 1.
Bruno Haible a8cff6cb 2016-12-17T20:38:33 sinf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINF. * m4/sinf.m4 (gl_FUNC_SINF): Set REPLACE_SINF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_SINF. * lib/math.in.h (sinf): Override if REPLACE_SINF is 1.
Bruno Haible 21ec014a 2016-12-17T19:41:12 expf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_EXPF. * m4/expf.m4 (gl_FUNC_EXPF): Set REPLACE_EXPF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_EXPF. * lib/math.in.h (expf): Override if REPLACE_EXPF is 1.
Bruno Haible c3c53687 2016-12-17T19:36:54 coshf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSHF. * m4/coshf.m4 (gl_FUNC_COSHF): Set REPLACE_COSHF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_COSHF. * lib/math.in.h (coshf): Override if REPLACE_COSHF is 1.
Bruno Haible 9113a6db 2016-12-17T19:31:58 cosf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSF. * m4/cosf.m4 (gl_FUNC_COSF): Set REPLACE_COSF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_COSF. * lib/math.in.h (cosf): Override if REPLACE_COSF is 1.
Bruno Haible cf308efd 2016-12-17T19:26:04 atan2f: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATAN2F. * m4/atan2f.m4 (gl_FUNC_ATAN2F): Set REPLACE_ATAN2F to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_ATAN2F. * lib/math.in.h (atan2f): Override if REPLACE_ATAN2F is 1.
Bruno Haible 4d3d2763 2016-12-17T19:21:51 atanf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF. * m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_ATANF. * lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.
Bruno Haible 6cd601d2 2016-12-17T19:15:56 asinf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ASINF. * m4/asinf.m4 (gl_FUNC_ASINF): Set REPLACE_ASINF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_ASINF. * lib/math.in.h (asinf): Override if REPLACE_ASINF is 1.
Bruno Haible c3cb8a26 2016-12-17T19:08:14 acosf: Avoid redefinition error on MSVC. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ACOSF. * m4/acosf.m4 (gl_FUNC_ACOSF): Set REPLACE_ACOSF to 1 if the function may be defined as an inline function. * modules/math (Makefile.am): Substitute REPLACE_ACOSF. * lib/math.in.h (acosf): Override if REPLACE_ACOSF is 1.
Pedro Alves c907efdb 2016-11-14T23:08:21 snippet/c++defs: fix real-floating arg functions in C++ mode Also, define isfinite, isinf, isnan, signbit in the gnulib namespace instead of in the global namespace. * build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE) (_GL_END_NAMESPACE): New. * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them. (isfinite, isinf, isnan, signbit) [__cplusplus && GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace instead of in the global namespace. * tests/test-math-c++.cc: Check that the isfinite, isinf, isnan, signbit overloads exist in the GNULIB_NAMESPACE namespace, instead of in the global namespace.
Pedro Alves e7ddcc62 2016-11-12T16:22:53 Fix gnulib C++ namespace support and std::frexp * lib/math.in.h (frexp): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
Daniel Richard G 74e641c2 2016-08-17T16:55:13 maint: preprocessor changes to support z/OS * lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c: * lib/glob.c, lib/math.in.h, lib/ptsname_r.c: * tests/infinity.h, tests/nan.h, tests/test-canonicalize-lgpl.c: * tests/test-nonblocking-pipe.h:
Paul Eggert a0bfcb8e 2016-02-20T07:52:53 signbit: port back to pre-C++11 GCC * lib/math.in.h (signbit): Do previous change only if __cplusplus < 201103. See Jonathan Wakely in: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UY3VX3W7XEXYTUKHG5BALU4ACUD7ZLGE/
Paul Eggert 516dc7d8 2016-02-19T17:07:48 signbit: port to C++ with GCC 6 * lib/math.in.h (signbit) [__cplusplus]: Do not replace with GCC builtin. Reported by Orion Poplawski in: http://lists.gnu.org/archive/html/bug-gnulib/2016-02/msg00005.html
Paul Eggert 71090a2a 2016-01-01T00:56:19 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
Paul Eggert b9bfe784 2015-01-01T01:38:23 version-etc: new year * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
Eric Blake 1276a2c5 2014-01-01T00:04:40 maint: update copyright I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>