lib/math.in.h


Log

Author Commit Date CI Message
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>
Paul Eggert ece81a73 2013-08-28T18:49:38 headers: check that _GL_INLINE_HEADER_BEGIN is defined Suggested by Bruce Korb in: http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00070.html * doc/extern-inline.texi (extern inline): Suggest checking that _GL_INLINE_HEADER_BEGIN is defined. * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h: * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h: * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h: * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h: * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h: * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h: * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h: * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h: * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h: * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h: * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h: * lib/xtime.h: Check that _GL_INLINE_HEADER_BEGIN is defined.
Eric Blake 9fc81090 2013-01-01T00:50:58 maint: update all copyright year number ranges Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert 62dbbbd1 2012-11-20T22:25:06 math: better 'inline' * lib/math.c: New file. * lib/math.in.h (_GL_MATH_INLINE): New macro. Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/math_h.m4 (gl_MATH_H): Do not require AC_C_INLINE. * modules/math (Files, lib_SOURCES): Add lib/math.c. (Depends-on): Add extern-inline.
Bruno Haible 811b6ef0 2012-04-03T21:58:52 New module 'ilogbl'. * lib/math.in.h (ilogbl): New declaration. * lib/ilogbl.c: New file. * m4/ilogbl.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL. * modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL. Split sed invocation, to avoid the limit of 100 substitutions of HP-UX 'sed'. * modules/ilogbl: New file. * tests/test-math-c++.cc: Check the declaration of ilogbl. * doc/posix-functions/ilogbl.texi: Mention the new module.
Bruno Haible d6d7a9dc 2012-04-03T21:13:26 New module 'ilogbf'. * lib/math.in.h (ilogbf): New declaration. * lib/ilogbf.c: New file. * m4/ilogbf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF, REPLACE_ILOGBF. * modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF, REPLACE_ILOGBF. * modules/ilogbf: New file. * tests/test-math-c++.cc: Check the declaration of ilogbf. * doc/posix-functions/ilogbf.texi: Mention the new module.
Bruno Haible 1ab17d9f 2012-04-03T18:59:33 New module 'ilogb'. * lib/math.in.h (ilogb): New declaration. * lib/ilogb.c: New file. * m4/ilogb.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB, REPLACE_ILOGB. * modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB, REPLACE_ILOGB. * modules/ilogb: New file. * tests/test-math-c++.cc: Check the declaration of ilogb. * doc/posix-functions/ilogb.texi: Mention the new module.
Bruno Haible 9e7a6e90 2012-04-03T17:04:46 math: Provide FP_ILOGB0 and FP_ILOGBNAN. * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback. * tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined. (main): Check their values. * doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN problem.
Bruno Haible 032debd6 2012-04-03T12:53:31 New module 'logbl'. * lib/math.in.h (logbl): New declaration. * lib/logbl.c: New file. * m4/logbl.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL, REPLACE_LOGBL. * modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL, REPLACE_LOGBL. * modules/logbl: New file. * tests/test-math-c++.cc: Check the declaration of logbl. * doc/posix-functions/logbl.texi: Mention the new module.
Bruno Haible 6c8149d7 2012-04-03T04:44:59 New module 'logbf'. * lib/math.in.h (logbf): New declaration. * lib/logbf.c: New file. * m4/logbf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF, REPLACE_LOGBF. * modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF, REPLACE_LOGBF. * modules/logbf: New file. * tests/test-math-c++.cc: Check the declaration of logbf. * doc/posix-functions/logbf.texi: Mention the new module.
Bruno Haible 77e40838 2012-04-03T02:51:42 logb: Provide replacement and workarounds. * lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB is 1. * lib/logb.c: New file. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro. (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB. * modules/math (Makefile.am): Substitute REPLACE_LOGB. * modules/logb (Files): Add lib/logb.c. (Depends-on): Add isfinite, frexp, isnand. (configure.ac): Compile the replacement code logb.c if needed. * tests/test-math-c++.cc: Check the declaration of logb. * doc/posix-functions/logb.texi: Mention the replacement and the bug with subnormal numbers.
Bruno Haible f068ad78 2012-04-01T14:41:57 log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug. * lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1. * lib/log10l.c (log10l): If log10l exists, use it and provide just the workaround. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro. (gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L. * modules/math (Makefile.am): Substitute REPLACE_LOG10L. * modules/log10l (configure.ac): Consider REPLACE_LOG10L. (Depends-on): Update conditions. * doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1, IRIX 6.5, OSF/1 5.1 problems.
Bruno Haible ac05a13b 2012-04-01T14:29:37 log10f: Work around OSF/1 5.1 bug. * lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1. * lib/log10f.c (log10f): If logf exists, use it and provide just the workaround. * m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro. (gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F. * modules/math (Makefile.am): Substitute REPLACE_LOG10F. * modules/log10f (configure.ac): Consider REPLACE_LOG10F. (Depends-on): Update conditions. * doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
Bruno Haible 54be6af6 2012-04-01T13:19:41 log10: Work around OSF/1 5.1 bug. * lib/math.in.h (log10): New declaration. * lib/log10.c: New file. * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro. (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10. * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10. * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10. * modules/log10 (Files): Add lib/log10.c. (Depends-on): Add math. (configure.ac): If REPLACE_LOG10 is 1, compile an override. * tests/test-math-c++.cc: Check the declaration of log10. * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
Bruno Haible 7fd1d131 2012-03-14T01:51:10 sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC. * lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1. * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro. (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces too big rounding errors. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL. * modules/math (Makefile.am): Substitute REPLACE_SQRTL. * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL. (Depends-on): Update conditions. * tests/test-sqrtl.c (my_ldexpl): New function. (main): Add test of a particular value. * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
Bruno Haible 0cb00e53 2012-03-14T00:02:12 remainderl: Avoid compilation error on AIX >= 5.2. * lib/math.in.h (remainderl): Undefine macro from the system header.
Bruno Haible 181e39ab 2012-03-11T20:50:08 New module 'log2l'. * lib/math.in.h (log2l): New declaration. * lib/log2l.c: New file. * m4/log2l.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L, REPLACE_LOG2L. * modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L, REPLACE_LOG2L. * modules/log2l: New file. * tests/test-math-c++.cc: Check the declaration of log2l. * doc/posix-functions/log2l.texi: Mention the new module and the IRIX and OSF/1 problems.
Bruno Haible 6e3a819d 2012-03-11T17:57:12 New module 'log2f'. * lib/math.in.h (log2f): New declaration. * lib/log2f.c: New file. * m4/log2f.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F, REPLACE_LOG2F. * modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F, REPLACE_LOG2F. * modules/log2f: New file. * tests/test-math-c++.cc: Check the declaration of log2f. * doc/posix-functions/log2f.texi: Mention the new module and the IRIX and OSF/1 and Cygwin problems.
Bruno Haible 6d131d20 2012-03-11T14:42:17 New module 'log2'. * lib/math.in.h (log2): New declaration. * lib/log2.c: New file. * m4/log2.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log2 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2, HAVE_DECL_LOG2, REPLACE_LOG2. * modules/math (Makefile.am): Substitute GNULIB_LOG2, HAVE_DECL_LOG2, REPLACE_LOG2. * modules/log2: New file. * tests/test-math-c++.cc: Check the declaration of log2. * doc/posix-functions/log2.texi: Mention the new module and the IRIX and OSF/1 and Cygwin problems.
Bruno Haible 6f9fd2e9 2012-03-11T02:36:40 log1pl-ieee: Work around test failure on IRIX 6.5. * m4/log1pl-ieee.m4: New file. * m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present, test whether log1pl works with a minus zero argument. Replace it if not. * lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL. * modules/math (Makefile.am): Substitute REPLACE_LOG1PL. * modules/log1pl (configure.ac): Consider REPLACE_LOG1PL. (Depends-on): Update conditions. * modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_LOG1PL_IEEE. * doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
Bruno Haible 55b49420 2012-03-11T01:27:59 log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11. * m4/log1p-ieee.m4: New file. * m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test whether log1p works with a minus zero argument. Replace it if not. * lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P. * modules/math (Makefile.am): Substitute REPLACE_LOG1P. * modules/log1p (configure.ac): Consider REPLACE_LOG1P. (Depends-on): Update conditions. * modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_LOG1P_IEEE. * doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
Bruno Haible 0109cf66 2012-03-11T00:48:36 New module 'log1pl'. * lib/math.in.h (log1pl): New declaration. * lib/log1pl.c: New file. * m4/log1pl.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL. * modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL. * modules/log1pl: New file. * tests/test-math-c++.cc: Check the declaration of log1pl. * doc/posix-functions/log1pl.texi: Mention the new module.
Bruno Haible 6a2bdd8e 2012-03-10T22:28:49 New module 'log1pf'. * lib/math.in.h (log1pf): New declaration. * lib/log1pf.c: New file. * m4/log1pf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF, REPLACE_LOG1PF. * modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF, REPLACE_LOG1PF. * modules/log1pf: New file. * tests/test-math-c++.cc: Check the declaration of log1pf. * doc/posix-functions/log1pf.texi: Mention the new module.
Bruno Haible 5f70dcfc 2012-03-10T19:54:08 log1p: Provide replacement for Minix and MSVC. * lib/math.in.h (log1p): New declaration. * lib/log1p.c: New file. * m4/log1p.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P. * modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P. * modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4. (Depends-on): Add math, isnand, log, round. (configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if HAVE_LOG1P is 0. * tests/test-math-c++.cc: Check the declaration of log1p. * doc/posix-functions/log1p.texi: Mention the replacement.
Bruno Haible 72983fb6 2012-03-10T02:48:48 logl: Work around OSF/1 5.1 bug. * lib/math.in.h (logl): Override if REPLACE_LOGL is 1. * lib/logl.c (logl): If logf exists, use it and provide just the workaround. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro. (gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL. * modules/math (Makefile.am): Substitute REPLACE_LOGL. * modules/logl (configure.ac): Consider REPLACE_LOGL. (Depends-on): Update conditions. * doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.
Bruno Haible 7073cb03 2012-03-10T00:55:48 logf: Work around OSF/1 5.1 bug. * lib/math.in.h (logf): Override if REPLACE_LOGF is 1. * lib/logf.c (logf): If logf exists, use it and provide just the workaround. * m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro. (gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF. * modules/math (Makefile.am): Substitute REPLACE_LOGF. * modules/logf (configure.ac): Consider REPLACE_LOGF. (Depends-on): Update conditions. * doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.
Bruno Haible 0d37a2e6 2012-03-09T23:55:13 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.
Bruno Haible aa42b545 2012-03-09T02:14:26 exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5. * m4/exp2l-ieee.m4: New file. * m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present, test whether exp2l works with a NaN argument and with a negative infinity argument. Replace it if not. * lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L. * modules/math (Makefile.am): Substitute REPLACE_EXP2L. * modules/exp2l (configure.ac): Consider REPLACE_EXP2L. (Depends-on): Update conditions. * modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4. (configure.ac): Invoke gl_FUNC_EXP2L_IEEE. * doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
Bruno Haible 6be81027 2012-03-09T01:13:40 New module 'exp2l'. * lib/math.in.h (exp2l): New declaration. * lib/exp2l.c: New file. * lib/expl-table.c: New file, extracted from lib/expl.c. * lib/expl.c (gl_expl_table): New declaration. (expl): Remove expl_table. Update reference. * m4/exp2l.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L. * modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L. * modules/exp2l: New file. * modules/expl (Files): Add lib/expl-table.c. (configure.ac): Compile also expl-table.c. * tests/test-math-c++.cc: Check the declaration of exp2l. * doc/posix-functions/exp2l.texi: Mention the new module and the IRIX problem.
Bruno Haible bff4a106 2012-03-08T20:24:53 New module 'exp2f'. * lib/math.in.h (exp2f): New declaration. * lib/exp2f.c: New file. * m4/exp2f.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F. * modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F. * modules/exp2f: New file. * tests/test-math-c++.cc: Check the declaration of exp2f. * doc/posix-functions/exp2f.texi: Mention the new module and the IRIX problem.
Bruno Haible 98d50dd6 2012-03-07T03:29:32 New module 'exp2'. * lib/math.in.h (exp2): New declaration. * lib/exp2.c: New file. * m4/exp2.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2, REPLACE_EXP2. * modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2, REPLACE_EXP2. * modules/exp2: New file. * tests/test-math-c++.cc: Check the declaration of exp2. * doc/posix-functions/exp2.texi: Mention the new module and the IRIX and OpenBSD problems.
Bruno Haible 6d1c7caa 2012-03-08T12:35:39 fmal: Avoid compilation error on AIX. * lib/math.in.h (fmal): Undefine macro before declaration. Needed on AIX 5.2..7.1.
Bruno Haible bb5fbd18 2012-03-08T04:02:53 expm1l: Avoid compilation error on AIX. * lib/math.in.h (expm1l): Undefine macro before declaration. Needed on AIX 5.2..7.1.
Bruno Haible 519433af 2012-03-08T04:01:51 expm1l: Don't override undeclared system function on IRIX 6.5. * lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when it exists. Set HAVE_DECL_EXPM1L. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not HAVE_EXPM1L. * modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not HAVE_EXPM1L. * doc/posix-functions/expm1l.texi: Mention missing declaration problem.