doc/posix-functions


Log

Author Commit Date CI Message
Bruno Haible 2deaf1ff 2024-05-17T11:36:47 putenv-gnu: Update documentation. * doc/posix-functions/putenv.texi: Refer also to the glibc documentation. Use the usual doc structure.
Collin Funk 5d2987e6 2024-05-16T15:56:47 Rename module 'putenv' to 'putenv-gnu'. * modules/putenv-gnu: Renamed from modules/putenv. (Description): Mention the removal of environment variables. * modules/putenv-gnu-tests: Renamed from modules/putenv-tests. * modules/putenv: New file, an indirection to the new module. * doc/posix-functions/putenv.texi: Mention the new module name. * NEWS: Mention the change.
Bruno Haible f146bac0 2024-05-16T00:45:15 stdbit-h, stdc_*: New modules, part of the stdbit module. * lib/stdbit.in.h (_GL_STDC_*_INLINE): New macros. Enclose function definitions in #if @GL_STDC_*@ conditionals. * lib/stdc_leading_zeros.c: New file. * lib/stdc_leading_ones.c: New file. * lib/stdc_trailing_zeros.c: New file. * lib/stdc_trailing_ones.c: New file. * lib/stdc_first_leading_zero.c: New file. * lib/stdc_first_leading_one.c: New file. * lib/stdc_first_trailing_zero.c: New file. * lib/stdc_first_trailing_one.c: New file. * lib/stdc_count_zeros.c: New file. * lib/stdc_count_ones.c: New file, based on lib/stdbit.c. * lib/stdc_has_single_bit.c: New file. * lib/stdc_bit_width.c: New file. * lib/stdc_bit_floor.c: New file. * lib/stdc_bit_ceil.c: New file. * lib/stdbit.c (__gl_stdbit_popcount_support): Remove variable. * m4/stdbit_h.m4 (gl_STDBIT_H): Initialize GL_STDC_* variables. * modules/stdbit-h: New file, based on modules/stdbit. (Depends-on): Add gen-header. (Makefile.am): Substitute GL_STDC_* variables. * modules/stdc_leading_zeros: New file. * modules/stdc_leading_ones: New file. * modules/stdc_trailing_zeros: New file. * modules/stdc_trailing_ones: New file. * modules/stdc_first_leading_zero: New file. * modules/stdc_first_leading_one: New file. * modules/stdc_first_trailing_zero: New file. * modules/stdc_first_trailing_one: New file. * modules/stdc_count_zeros: New file. * modules/stdc_count_ones: New file. * modules/stdc_has_single_bit: New file. * modules/stdc_bit_width: New file. * modules/stdc_bit_floor: New file. * modules/stdc_bit_ceil: New file. * modules/stdbit: Change to a pure composition module. * modules/stdc_leading_zeros-tests: New file, based on modules/stdbit-tests. * modules/stdc_leading_ones-tests: New file, based on modules/stdbit-tests. * modules/stdc_trailing_zeros-tests: New file, based on modules/stdbit-tests. * modules/stdc_trailing_ones-tests: New file, based on modules/stdbit-tests. * modules/stdc_first_leading_zero-tests: New file, based on modules/stdbit-tests. * modules/stdc_first_leading_one-tests: New file, based on modules/stdbit-tests. * modules/stdc_first_trailing_zero-tests: New file, based on modules/stdbit-tests. * modules/stdc_first_trailing_one-tests: New file, based on modules/stdbit-tests. * modules/stdc_count_zeros-tests: New file, based on modules/stdbit-tests. * modules/stdc_count_ones-tests: New file, based on modules/stdbit-tests. * modules/stdc_has_single_bit-tests: New file, based on modules/stdbit-tests. * modules/stdc_bit_width-tests: New file, based on modules/stdbit-tests. * modules/stdc_bit_floor-tests: New file, based on modules/stdbit-tests. * modules/stdc_bit_ceil-tests: New file, based on modules/stdbit-tests. * modules/stdbit-tests: Remove file. * doc/posix-functions/stdc_leading_zeros.texi: Update. * doc/posix-functions/stdc_leading_ones.texi: Likewise. * doc/posix-functions/stdc_trailing_zeros.texi: Likewise. * doc/posix-functions/stdc_trailing_ones.texi: Likewise. * doc/posix-functions/stdc_first_leading_zero.texi: Likewise. * doc/posix-functions/stdc_first_leading_one.texi: Likewise. * doc/posix-functions/stdc_first_trailing_zero.texi: Likewise. * doc/posix-functions/stdc_first_trailing_one.texi: Likewise. * doc/posix-functions/stdc_count_zeros.texi: Likewise. * doc/posix-functions/stdc_count_ones.texi: Likewise. * doc/posix-functions/stdc_has_single_bit.texi: Likewise. * doc/posix-functions/stdc_bit_width.texi: Likewise. * doc/posix-functions/stdc_bit_floor.texi: Likewise. * doc/posix-functions/stdc_bit_ceil.texi: Likewise.
Paul Eggert 623b86c0 2024-05-13T09:29:00 doc: update C23 draft ref from n3047 to n3096
Bruno Haible 1b151519 2024-05-13T17:44:06 doc: Document <stdbit.h> function-like macros. * doc/posix-headers/stdbit.texi: Reference ISO C 23 as the documentation. Update platforms list. * doc/posix-functions/stdc_leading_zeros.texi: New file. * doc/posix-functions/stdc_leading_ones.texi: New file. * doc/posix-functions/stdc_trailing_zeros.texi: New file. * doc/posix-functions/stdc_trailing_ones.texi: New file. * doc/posix-functions/stdc_first_leading_zero.texi: New file. * doc/posix-functions/stdc_first_leading_one.texi: New file. * doc/posix-functions/stdc_first_trailing_zero.texi: New file. * doc/posix-functions/stdc_first_trailing_one.texi: New file. * doc/posix-functions/stdc_count_zeros.texi: New file. * doc/posix-functions/stdc_count_ones.texi: New file. * doc/posix-functions/stdc_has_single_bit.texi: New file. * doc/posix-functions/stdc_bit_width.texi: New file. * doc/posix-functions/stdc_bit_floor.texi: New file. * doc/posix-functions/stdc_bit_ceil.texi: New file. * doc/gnulib.texi (Function Substitutes): Include them all.
Bruno Haible 7941742a 2024-04-25T22:07:37 doc: Remove documentation of IRIX as supported platform. * doc/posix-headers/netdb.texi: Don't mention IRIX specific workarounds. * doc/posix-headers/pthread.texi: Likewise. * doc/posix-headers/sys_socket.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/posix-functions/btowc.texi: Likewise. * doc/posix-functions/cbrtf.texi: Likewise. * doc/posix-functions/cbrtl.texi: Likewise. * doc/posix-functions/copysignf.texi: Likewise. * doc/posix-functions/exp2.texi: Likewise. * doc/posix-functions/exp2f.texi: Likewise. * doc/posix-functions/exp2l.texi: Likewise. * doc/posix-functions/expm1f.texi: Likewise. * doc/posix-functions/expm1l.texi: Likewise. * doc/posix-functions/fabsl.texi: Likewise. * doc/posix-functions/isnan.texi: Likewise. * doc/posix-functions/iswblank.texi: Likewise. * doc/posix-functions/link.texi: Likewise. * doc/posix-functions/log10l.texi: Likewise. * doc/posix-functions/log1pf.texi: Likewise. * doc/posix-functions/log2.texi: Likewise. * doc/posix-functions/log2f.texi: Likewise. * doc/posix-functions/log2l.texi: Likewise. * doc/posix-functions/lseek.texi: Likewise. * doc/posix-functions/nl_langinfo.texi: Likewise. * doc/posix-functions/pthread_sigmask.texi: Likewise. * doc/posix-functions/remainderf.texi: Likewise. * doc/posix-functions/remainderl.texi: Likewise. * doc/posix-functions/rintf.texi: Likewise. * doc/posix-functions/sigaltstack.texi: Likewise. * doc/posix-functions/strtod.texi: Likewise. * doc/posix-functions/strtold.texi: Likewise. * doc/posix-functions/vscanf.texi: Likewise. * doc/posix-functions/wctob.texi: Likewise. * doc/**/*.texi: Update.
Bruno Haible 237cbf1c 2024-04-20T03:45:58 wcsstr: Update doc. * doc/posix-functions/wcsstr.texi: Update glibc version.
Paul Eggert c2174a62 2024-04-19T00:29:32 fstatat, stat: document macOS st_ino pipe bug * doc/posix-functions/fstatat.texi (fstatat): * doc/posix-functions/stat.texi (stat): Document macOS bug (see <https://bugs.gnu.org/70411>).
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 6a4b1085 2024-04-06T12:01:59 expm1l: Work around a NetBSD 10.0/i386 bug. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Test the value of expm1l(2^LDBL_MIN_EXP). * doc/posix-functions/expm1l.texi: Mention the NetBSD 10.0/i386 bug. * tests/test-expm1.h (test_function): Allow more deviation on NetBSD/i386.
Bruno Haible e866532d 2024-04-05T16:45:25 exp2l: Work around a NetBSD 10.0/i386 bug. * m4/exp2l.m4 (gl_FUNC_EXP2L): Test the value of exp2l(LDBL_MAX_EXP-1). * doc/posix-functions/exp2l.texi: Mention the NetBSD 10.0/i386 bug.
Bruno Haible 9ef347ea 2024-04-05T12:04:59 Update for NetBSD 9.3 and 10.0. * doc/*/*.texi: Update for NetBSD 9.3 and 10.0. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comments and cross-compilation guess. * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): Likewise. * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise. * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Likewise. * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Likewise. * m4/fcntl.m4: Update comments. * m4/fenv-environment.m4: Likewise. * m4/fenv-exceptions-trapping.m4: Likewise. * m4/fnmatch.m4: Likewise. * m4/getcwd-abort-bug.m4: Likewise. * m4/iswdigit.m4: Likewise. * m4/iswxdigit.m4: Likewise. * m4/modfl.m4: Likewise. * m4/wcscmp.m4: Likewise. * m4/wcsncmp.m4: Likewise. * m4/wctrans.m4: Likewise. * m4/wcwidth.m4: Likewise.
Bruno Haible 3978cc5a 2024-03-24T19:23:47 nstrtime, c-nstrftime: Fix %c directive's result on glibc ≤ 2.30. * lib/strftime.c (__strftime_internal): On glibc ≤ 2.30, like on NetBSD and Solaris, remove the last word of the %c directive's result if it looks like a time zone. * doc/posix-functions/strftime.texi: Update platforms list.
Bruno Haible 01a485ed 2024-02-21T22:45:47 strtof: New module. * lib/stdlib.in.h (strtof): New declaration. * lib/strtod.c: Support USE_FLOAT. * lib/strtof.c: New file. * m4/strtof.m4: New file, based on m4/strtod.m4. * m4/ldexpf.m4 (gl_CHECK_LDEXPF_NO_LIBM): New macro, based on m4/ldexp.m4. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRTOF. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOF, HAVE_STRTOF, REPLACE_STRTOF. * modules/strtof: New file. * tests/test-stdlib-c++.cc (strtof): Check signature. * doc/posix-functions/strtof.texi: Mention the new module and the bugs that it fixes. (gl_STDLIB_H_DEFAULTS): Initialize HAVE_STRTOF, REPLACE_STRTOF.
Bruno Haible 0fbc4699 2024-02-21T15:49:23 *printf-posix: Disable support for the 'n' directive by default. * m4/printf-with-n-directive.m4: New file. * modules/printf-with-n-directive: New file. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): If gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the value of the gl_cv_func_printf_directive_n variable. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise. * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise. * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise. * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise. * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): If gl_PRINTF_SUPPORT_N_DIRECTIVE is not defined, ignore the values of the gl_cv_func_printf_directive_n and gl_cv_func_snprintf_directive_n variables. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise. * lib/printf-parse.c (PRINTF_PARSE): If NEED_PRINTF_WITH_N_DIRECTIVE is not defined, treat the 'n' directive like an unknown directive. * lib/vasnprintf.c (VASNPRINTF): If NEED_PRINTF_WITH_N_DIRECTIVE is not defined, disable the processing of the 'n' directive. * tests/test-snprintf-posix.h (test_function): If NEED_PRINTF_WITH_N_DIRECTIVE is not defined, skip the %n test. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnprintf-posix.c (test_function): Likewise. * tests/test-vasnwprintf-posix.c (test_function): Likewise. * tests/test-vasprintf-posix.c (test_function): Likewise. * doc/posix-functions/dprintf.texi: Mention that support for the 'n' directive is only enabled together with the module 'printf-with-n-directive'. * doc/posix-functions/fprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise. * NEWS: Mention the change.
Bruno Haible 08529be2 2024-02-15T14:35:53 localename: Add more comments. * m4/intl-thread-locale.m4: Document expected configuration results. * doc/posix-functions/uselocale.texi: Update platforms list. * lib/localename.c: Likewise.
Paul Eggert 3aafd550 2024-02-10T17:53:34 doc: improve warnings about ctime etc. * doc/posix-functions/asctime.texi (asctime): * doc/posix-functions/asctime_r.texi (asctime_r): Say why these functions are typically used mistakenly. * doc/posix-functions/ctime.texi (ctime): * doc/posix-functions/ctime_r.texi (ctimef): Say that they can dump core due to an internal null pointer, too. * doc/posix-functions/ctime.texi (ctime): Don’t recommend ctime_r.
Bruno Haible fbafdff9 2024-02-08T15:34:34 nstrtime: Fix %p, %P, %r directives' results on NetBSD, Solaris. * lib/strftime.c: Include <locale.h>, localename.h. (should_remove_ampm): New function. (__strftime_internal): On NetBSD and Solaris, remove the AM/PM indicator from the %p, %r directives' results in specific locales. * modules/nstrftime (Depends-on): Add localename. * tests/test-nstrftime.h (locales_test): Update the expected result of the %r directive. * doc/posix-functions/strftime.texi: Mention the problem of the %p and %r directives on NetBSD and Solaris.
Bruno Haible 611ae97f 2024-02-08T14:52:06 nstrtime, c-nstrftime: Fix %c directive's result on NetBSD, Solaris. * doc/posix-functions/strftime.texi: Mention this as a restriction of strftime.
Bruno Haible 44a6681b 2024-02-07T23:34:28 nstrftime: Work around strftime bug with %r on macOS and FreeBSD. * lib/strftime.c (__strftime_internal): For %r, don't use the underlying strftime() directly. * doc/posix-functions/strftime.texi: Mention the %r bug.
Paul Eggert 92a981f1 2024-02-05T22:48:29 ctime: improve doc * doc/posix-functions/asctime.texi (asctime): * doc/posix-functions/asctime_r.texi (asctime_r): * doc/posix-functions/ctime_r.texi (ctime_r): * doc/posix-functions/ctime.texi (ctime): Mention locale problem of strftime more consistently. Improve wording. For ctime and ctime_r, mention that localtime_r can fail. * doc/posix-functions/ctime.texi (ctime): Move history section to end and spiff up a bit. * doc/posix-functions/ctime_r.texi (ctime_r): Omit commentary that assumes traditional SunOS ctime_r API; it was confusing and not useful for Gnulib apps, which assume the POSIX API.
Paul Eggert cbb65906 2024-02-05T15:18:48 doc: Extend doc of *ctime functions. * doc/posix-functions/ctime.texi (ctime): Document why we got into this mess. * doc/posix-functions/asctime.texi (asctime): * doc/posix-functions/asctime_r.texi (asctime_r): * doc/posix-functions/ctime_r.texi (ctime_r): Refer to ctime’s buffer overflow doc.
Bruno Haible bbe8a410 2024-01-26T00:55:45 Resolve conflicts for functions introduced in Android API level 35. * lib/time.in.h (timespec_getres): Consider REPLACE_TIMESPEC_GETRES. * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GETRES. * modules/time-h (Makefile.am): Substitute REPLACE_TIMESPEC_GETRES. * m4/timespec_getres.m4 (gl_FUNC_TIMESPEC_GETRES): Test for timespec_getres using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_TIMESPEC_GETRES. * modules/timespec_getres (Depends-on, configure.ac): Consider REPLACE_TIMESPEC_GETRES. * m4/gettime.m4 (gl_GETTIME_RES): Test for timespec_getres using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * doc/posix-functions/timespec_getres.texi: Mention the Android API levels.
Bruno Haible 2f4edab0 2024-01-26T00:18:49 Resolve conflicts for functions introduced in Android API level 34. * lib/string.in.h (memset_explicit): Consider REPLACE_MEMSET_EXPLICIT. * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMSET_EXPLICIT. * modules/string (Makefile.am): Substitute REPLACE_MEMSET_EXPLICIT. * m4/memset_explicit.m4 (gl_FUNC_MEMSET_EXPLICIT): Test for memset_explicit using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_MEMSET_EXPLICIT. * modules/memset_explicit (configure.ac): Consider REPLACE_MEMSET_EXPLICIT. * doc/posix-functions/memset_explicit.texi: Mention the Android API levels.
Bruno Haible 5d894998 2024-01-25T20:15:10 Resolve conflicts for functions introduced in Android API level 30. * lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP. (thrd_yield): Consider REPLACE_THRD_YIELD. (mtx_init): Consider REPLACE_MTX_INIT. (mtx_lock): Consider REPLACE_MTX_LOCK. (mtx_trylock): Consider REPLACE_MTX_TRYLOCK. (mtx_timedlock): Consider REPLACE_MTX_TIMEDLOCK. (mtx_unlock): Consider REPLACE_MTX_UNLOCK. (mtx_destroy): Consider REPLACE_MTX_DESTROY. (call_once): Consider REPLACE_CALL_ONCE. Fix warning message. (cnd_init): Consider REPLACE_CND_INIT. (cnd_wait): Consider REPLACE_CND_WAIT. (cnd_timedwait): Consider REPLACE_CND_TIMEDWAIT. (cnd_signal): Consider REPLACE_CND_SIGNAL. (cnd_broadcast): Consider REPLACE_CND_BROADCAST. (cnd_destroy): Consider REPLACE_CND_DESTROY. (tss_create): Consider REPLACE_TSS_CREATE. (tss_set): Consider REPLACE_TSS_SET. (tss_get): Consider REPLACE_TSS_GET. (tss_delete): Consider REPLACE_TSS_DELETE. * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_CALL_ONCE, REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT, REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT, REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK, REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK, REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE, REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET. * modules/threads-h (Makefile.am): Substitute REPLACE_CALL_ONCE, REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT, REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT, REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK, REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK, REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE, REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET. * m4/thrd.m4 (gl_FUNC_THRD_CREATE): New macro. * modules/thrd (configure.ac): Invoke gl_FUNC_THRD_CREATE. * m4/call_once.m4: New file. * modules/call_once (Files): Add m4/call_once.m4. (configure.ac): Invoke gl_FUNC_CALL_ONCE. Consider REPLACE_CALL_ONCE. * m4/cnd.m4: New file. * modules/cnd (Files): Add m4/cnd.m4. (configure.ac): Invoke gl_FUNC_CND_INIT. Consider REPLACE_CND_INIT. * m4/mtx.m4: New file. * modules/mtx (Files): Add m4/mtx.m4. (configure.ac): Invoke gl_FUNC_MTX_INIT. Consider REPLACE_MTX_INIT. * m4/tss.m4: New file. * modules/tss (Files): Add m4/tss.m4. (configure.ac): Invoke gl_FUNC_TSS_CREATE. Consider REPLACE_TSS_CREATE. * doc/posix-functions/call_once.texi: Mention the Android API levels. * doc/posix-functions/cnd_broadcast.texi: Likewise. * doc/posix-functions/cnd_destroy.texi: Likewise. * doc/posix-functions/cnd_init.texi: Likewise. * doc/posix-functions/cnd_signal.texi: Likewise. * doc/posix-functions/cnd_timedwait.texi: Likewise. * doc/posix-functions/cnd_wait.texi: Likewise. * doc/posix-functions/mtx_destroy.texi: Likewise. * doc/posix-functions/mtx_init.texi: Likewise. * doc/posix-functions/mtx_lock.texi: Likewise. * doc/posix-functions/mtx_timedlock.texi: Likewise. * doc/posix-functions/mtx_trylock.texi: Likewise. * doc/posix-functions/mtx_unlock.texi: Likewise. * doc/posix-functions/thrd_create.texi: Likewise. * doc/posix-functions/thrd_current.texi: Likewise. * doc/posix-functions/thrd_detach.texi: Likewise. * doc/posix-functions/thrd_equal.texi: Likewise. * doc/posix-functions/thrd_exit.texi: Likewise. * doc/posix-functions/thrd_join.texi: Likewise. * doc/posix-functions/thrd_sleep.texi: Likewise. * doc/posix-functions/thrd_yield.texi: Likewise. * doc/posix-functions/tss_create.texi: Likewise. * doc/posix-functions/tss_delete.texi: Likewise. * doc/posix-functions/tss_get.texi: Likewise. * doc/posix-functions/tss_set.texi: Likewise.
Bruno Haible 16276ab5 2024-01-19T22:58:43 fenv-environment: Fix for NetBSD/powerpc. * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): For feupdateenv, use the same configure test on NetBSD/powerpc as on glibc/hppa. * doc/posix-functions/feupdateenv.texi: Mention the NetBSD/powerpc bug.
Bruno Haible da981cbd 2024-01-19T22:34:27 fenv-exceptions-state-c99: Fix for FreeBSD/powerpc64 and NetBSD/powerpc. * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): On FreeBSD/powerpc64 and NetBSD/powerpc, set REPLACE_FESETEXCEPTFLAG. * doc/posix-functions/fesetexceptflag.texi: Mention the FreeBSD and NetBSD bug.
Bruno Haible d3159f16 2024-01-19T00:54:13 fenv-rounding: Avoid a test failure on OpenBSD/arm64. * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward): Skip the 'long double' tests on OpenBSD/arm64. * doc/posix-functions/fesetround.texi: Update platforms list.
Bruno Haible 6307a63f 2024-01-18T16:29:21 doc: Update regarding <math.h> *l functions on NetBSD 9.3. * doc/posix-functions/acoshl.texi: Mention the buggy implementation on NetBSD. * doc/posix-functions/acosl.texi: Likewise. * doc/posix-functions/asinhl.texi: Likewise. * doc/posix-functions/asinl.texi: Likewise. * doc/posix-functions/atan2l.texi: Likewise. * doc/posix-functions/atanhl.texi: Likewise. * doc/posix-functions/atanl.texi: Likewise. * doc/posix-functions/coshl.texi: Likewise. * doc/posix-functions/cosl.texi: Likewise. * doc/posix-functions/erfcl.texi: Likewise. * doc/posix-functions/erfl.texi: Likewise. * doc/posix-functions/powl.texi: Likewise. * doc/posix-functions/sinhl.texi: Likewise. * doc/posix-functions/sinl.texi: Likewise. * doc/posix-functions/tanhl.texi: Likewise. * doc/posix-functions/tanl.texi: Likewise. * doc/posix-functions/expl.texi: Update NetBSD version info. * doc/posix-functions/exp2l.texi: Likewise. * doc/posix-functions/hypotl.texi: Likewise. * doc/posix-functions/logl.texi: Likewise. * doc/posix-functions/log10l.texi: Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Update comments. * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise. * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): Likewise. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
Bruno Haible 2c1dd7f9 2024-01-18T15:41:39 modfl: Work around bug on NetBSD 9.3/arm64. * m4/modfl.m4 (gl_FUNC_MODFL): Add test whether modfl basically works. * doc/posix-functions/modfl.texi: Mention the NetBSD bug.
Bruno Haible 646c3890 2024-01-18T14:55:25 fmaf, fma, fmal: Work around bugs on OpenBSD 7.4/arm64. * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Use a volatile function pointer variable to disable clang's inlining. * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise. * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise. * doc/posix-functions/fmaf.texi: Mention the OpenBSD bug. * doc/posix-functions/fma.texi: Likewise. * doc/posix-functions/fmal.texi: Likewise.
Bruno Haible 26fe9800 2024-01-11T13:50:04 time: Fix test failure on FreeBSD 12.2/sparc64. * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on FreeBSD/sparc. * doc/posix-functions/time.texi: Mention the bug on FreeBSD/sparc.
Paul Eggert 00cf42bb 2023-12-28T11:15:56 stat-time: fix macOS bug with negative file times macOS has a bug similar (but not identical) to Solaris when file timestamps are negative: tv_nsec might go negative. Problem reported on Darwin 8.11.0 for GNU Tar by Gordon Steemson in: https://lists.gnu.org/r/bug-tar/2023-12/msg00001.html This was evidently Mac OS X 10.4.11; I reproduced it on Darwin 21.6.0 (macOS 12.5). * lib/stat-time.h (STAT_TIMESPEC_OFFSETOF): New macro. (stat_time_normalize): Also normalize timestamps on macOS. * m4/fstat.m4 (gl_FUNC_FSTAT): * m4/fstatat.m4 (gl_FUNC_FSTATAT): * m4/lstat.m4 (gl_FUNC_LSTAT): * m4/stat.m4 (gl_FUNC_STAT): Also replace on macOS.
Bruno Haible 6016e676 2023-12-01T13:21:44 doc: Update for FreeBSD 14.0. * doc/posix-headers/*.texi: Update. * doc/glibc-headers/*.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * m4/printf.m4: Update comments.
Bruno Haible 268f50de 2023-11-14T19:33:21 doc: Mention a 'random' limitation on OpenBSD. Reported by Corinna Vinschen <vinschen@redhat.com>. * doc/posix-functions/random.texi: Mention the OpenBSD limitation.
Bruno Haible 7375d571 2023-11-14T14:10:57 *printf-posix: Revert expectations of %lc of 0. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): Expect a NUL byte in the output. * lib/vasnprintf.c (VASNPRINTF): In the %lc implementation, don't special-case the NUL wide character. * tests/test-vasnprintf-posix.c (test_function): Change expected result for %lc of L'\0'. * tests/test-vasprintf-posix.c (test_function): Likewise. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise. * doc/posix-functions/dprintf.texi: Update platform list regarding %lc of 0 bug. * doc/posix-functions/fprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/glibc-functions/asprintf.texi: Likewise. * doc/glibc-functions/vasprintf.texi: Likewise. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise.
Bruno Haible f260d11f 2023-11-11T01:13:22 doc: Mention rand and srand limitations, part 2.
Bruno Haible 0610a7cc 2023-11-10T19:57:30 doc: Mention rand and srand limitations. * doc/posix-functions/rand.texi: Mention multithread-safety problem. * doc/posix-functions/srand.texi: Mention a Cygwin bug.
Bruno Haible 6c7ea007 2023-11-10T16:51:02 doc: Mention an srandom limitation on OpenBSD. * doc/posix-functions/srandom.texi: Mention the OpenBSD limitation.
Bruno Haible 53483b10 2023-11-10T16:46:17 random: Fix multithread-safety bug in general. * m4/random.m4 (gl_FUNC_RANDOM): Override also macOS, FreeBSD, Solaris, Cygwin, Haiku. * doc/posix-functions/random.texi: Mention the wider scope of the multithread-safety bug.
Bruno Haible 9d732263 2023-11-09T16:00:28 rand: New module. * lib/rand.c: New file, based on glibc/stdlib/rand.c. * m4/rand.m4: New file. * modules/rand: New file. * doc/posix-functions/rand.texi: Mention the new module.
Bruno Haible 0ab4517a 2023-11-09T15:56:32 random: Fix multithread-safety bug on CheriBSD. * m4/random.m4 (gl_FUNC_RANDOM): Override on CheriBSD. * lib/random.c: Include glthread/lock.h. (__libc_lock_define_initialized, __libc_lock_lock, __libc_lock_unlock): Define to do real locking. * modules/random (Depends-on): Add lock. * doc/posix-functions/random.texi: Mention the multithread-safety problem.
Bruno Haible 0c60267a 2023-11-07T02:04:59 fenv-*: Avoid test failures on OpenBSD/mips64. * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward): Skip the 'long double' tests on OpenBSD/mips64. * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/mips64, skip the 'long double' test. * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests and the 'long double' tests also on OpenBSD/mips64. * doc/posix-functions/fesetround.texi: Mention OpenBSD/mips64 here too.
Bruno Haible 80028c70 2023-11-07T02:04:47 fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64. * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1. * doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64 bug. * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.
Bruno Haible ca68a81f 2023-11-06T14:09:17 fenv-exceptions-state-c99: Update doc regarding Minix. * doc/posix-functions/fesetexceptflag.texi: Mention the Minix bug.
Bruno Haible 35bac6a7 2023-11-05T23:25:08 fenv-exceptions-tracking-c99: Fix test failures on Minix. * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On Minix, set REPLACE_FECLEAREXCEPT and REPLACE_FETESTEXCEPT to 1. * doc/posix-functions/feclearexcept.texi: Mention the Minix bug. * doc/posix-functions/fetestexcept.texi: Likewise.
Bruno Haible 057858a2 2023-11-05T22:16:38 fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64. * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to override fesetexceptflag() on Haiku. * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug.
Bruno Haible c19cabc0 2023-11-05T15:00:29 fenv-environment: New module. * lib/fenv.in.h (fenv_t) [hppa]: Remove the __exception field. (FE_DFL_ENV): Override if <fenv.h> exists but HAVE_FE_DFL_ENV is not defined. (fegetenv, fesetenv, feupdateenv, feholdexcept): New declarations. * lib/fenv-env.c: New file, based on glibc. * lib/fenv-env-hold.c: New file. * lib/fenv-env-update.c: New file. * m4/fenv-environment.m4: New file. * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fenv_t *' type. * m4/fenv_h.m4 (gl_FENV_H_DEFAULTS): Initialize REPLACE_FEGETENV, REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV. * modules/fenv (Makefile.am): Substitute REPLACE_FEGETENV, REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV. * modules/fenv-environment: New file. * doc/posix-functions/fegetenv.texi: Mention the new module and the bugs on glibc, macOS, AIX. * doc/posix-functions/feholdexcept.texi: Mention the new module and the bugs on glibc, musl libc, FreeBSD, AIX, mingw, MSVC. * doc/posix-functions/fesetenv.texi: Mention the new module and the bugs on musl libc, FreeBSD, NetBSD, AIX, Solaris, Cygwin, mingw, MSVC. * doc/posix-functions/feupdateenv.texi: Mention the new module and the bugs on glibc, musl libc, macOS, FreeBSD, AIX, Solaris, mingw, MSVC.
Bruno Haible 421e04d7 2023-11-04T16:27:09 doc: Update info about Cygwin feraiseexcept bug. * doc/posix-functions/feraiseexcept.texi: Update info regarding Cygwin.
Bruno Haible bae535e8 2023-11-04T14:31:37 fenv-exceptions-tracking-c99: Work around a NetBSD/x86_64 bug. * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On NetBSD/x86_64, set REPLACE_FETESTEXCEPT to 1. * doc/posix-functions/fetestexcept.texi: Document the NetBSD bug.
Bruno Haible 4650354b 2023-11-04T14:18:28 fenv-rounding: Avoid a test failure on NetBSD/sparc64. * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward): Skip the 'long double' tests on NetBSD/sparc64. * doc/posix-functions/fesetround.texi: Mention the problem with 'long double' operations on some platforms.
Bruno Haible 7655a646 2023-10-30T16:49:25 fenv-exceptions-state-c23: New module. * lib/fenv.in.h (fetestexceptflag): New declaration. * lib/fenv-except-state-test.c: New file, based on glibc. * m4/fenv-exceptions-state-c23.m4: New file. * modules/fenv-exceptions-state-c23: New file. * doc/posix-functions/fetestexceptflag.texi: Mention the new module.
Bruno Haible ee6460d2 2023-10-30T16:39:19 fenv-exceptions-state-c99: New module. * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): New declarations. * lib/fenv-except-state-get.c: New file, baed on glibc. * lib/fenv-except-state-set.c: New file, baed on glibc. * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fexcept_t *' type. * m4/fenv-exceptions-state.m4: New file. * modules/fenv-exceptions-state-c99: New file. * doc/posix-functions/fegetexceptflag.texi: Mention the new module. * doc/posix-functions/fesetexceptflag.texi: Mention the new module and the glibc, musl libc, macOS, AIX, mingw bugs.
Bruno Haible b21a4c46 2023-10-29T22:20:02 fenv-exceptions-tracking-c23: New module. * lib/fenv.in.h (fesetexcept): New declaration. * lib/fenv-except-tracking-set.c: New file, based on glibc. * lib/fenv-private.h (_GETMSR, _SETMSR, MSR_FP_EXC_MASK, PR_SET_FPEXC, PR_FP_EXC_DISABLED, PR_FP_EXC_NONRECOV, PR_FP_EXC_ASYNC, PR_FP_EXC_PRECISE, prctl) [NetBSD/powerpc]: New macros. * m4/fenv-exceptions-tracking-c23.m4: New file. * modules/fenv-exceptions-tracking-c23: New file. * doc/posix-functions/fesetexcept.texi: Mention the new module and the glibc bugs.
Bruno Haible 2ce970a2 2023-10-28T18:31:22 fenv-exceptions-tracking-c99: New module. * lib/fenv.in.h (feclearexcept, feraiseexcept, fetestexcept): New declarations. * lib/fenv-except-tracking-clear.c: New file, based on glibc. * lib/fenv-except-tracking-raise.c: New file, based on glibc. * lib/fenv-except-tracking-test.c: New file, based on glibc. * m4/fenv-exceptions-tracking.m4: New file. * m4/fenv-exceptions.m4: New file. * modules/fenv-exceptions-tracking-c99: New file. * doc/posix-functions/feclearexcept.texi: Mention the new module. * doc/posix-functions/fetestexcept.texi: Likewise. * doc/posix-functions/feraiseexcept.texi: Likewise. Mention the glibc and Cygwin bugs.
Bruno Haible 404ce57f 2023-10-27T20:16:50 fenv-rounding: New module. * lib/fenv.in.h (fegetround, fesetround): New declarations. * lib/fenv-private.h: New file, based on glibc. * lib/fenv-round.c: New file, based on glibc. * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_rnd. * m4/fenv-rounding.m4: New file. * modules/fenv (Depends-on): Add snippet/c++defs. (Makefile.am): Substitute $(CXXDEFS_H) into fenv.h. * modules/fenv-rounding: New file. * doc/posix-functions/fegetround.texi: Mention the new module. * doc/posix-functions/fesetround.texi: Likewise.
Bruno Haible 645b803a 2023-10-14T23:45:40 totalorder*: Document glibc bug on SH4. * doc/posix-functions/totalorder.texi: Mention the glibc bug on SH4. * doc/posix-functions/totalorderf.texi: Likewise. * doc/posix-functions/totalorderl.texi: Likewise.
Bruno Haible f4dd150d 2023-10-14T20:42:00 totalorder*: Improve documentation. * doc/posix-functions/totalorder.texi: Reference the specification. * doc/posix-functions/totalorderf.texi: Likewise. * doc/posix-functions/totalorderl.texi: Likewise.
Bruno Haible 2a08b56b 2023-10-08T09:59:03 isfinite: Work around a bug with 'long double' in glibc 2.5/ia64. * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require gl_LONG_DOUBLE_EXPONENT_LOCATION. Test also another NaN value. * modules/isfinite (Files): Add m4/exponentl.m4. * doc/posix-functions/isfinite.texi: Mention also a 'long double' problem on ia64.
Bruno Haible be250a8b 2023-10-05T22:39:52 doc: Mention xstrerror. * doc/posix-functions/strerror_r.texi: Mention xstrerror.
Bruno Haible 3ecee316 2023-10-04T00:30:28 ilogb: Document a Mac OS X bug. * doc/posix-functions/ilogb.texi: Mention a bug that affects Mac OS X. * m4/ilogb.m4 (gl_FUNC_ILOGB): Update comments.
Bruno Haible f5c688cf 2023-10-03T23:27:30 *printf-posix: Work around bug with %#.0x on Mac OS X 10.6. * lib/vasnprintf.c (VASNPRINTF): Enable NEED_PRINTF_UNBOUNDED_PRECISION- guarded code also for NEED_PRINTF_FLAG_ALT_PRECISION_ZERO. Set prec_ourselves to 1 if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO, precision is 0, and the directive is 'x' or 'X'. If prec_ourselves, remove the "0" output if required. * m4/printf.m4 (gl_PRINTF_FLAG_ALT_PRECISION_ZERO): New macro. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO): New macro. (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Invoke it. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Require gl_PRINTF_FLAG_ALT_PRECISION_ZERO and test its result. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise. * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise. * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise. * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise. * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise. * doc/glibc-functions/asprintf.texi: Mention the %#.0x bug. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise. * doc/glibc-functions/vasprintf.texi: Likewise. * doc/posix-functions/dprintf.texi: Likewise. * doc/posix-functions/fprintf.texi: Likewise. * doc/posix-functions/fwprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise.
Bruno Haible acdf80a4 2023-10-03T15:59:57 access: Work around trailing slash bug on Mac OS X 10.5. * m4/access.m4 (gl_FUNC_ACCESS): Test whether access honors a trailing slash. Set REPLACE_ACCESS to 1 and define ACCESS_TRAILING_SLASH_BUG if not. * lib/access.c (access): Add an implementation for Unix-like platforms. * tests/test-access.c (main): Test for result if the argument has a trailing slash. * modules/access-tests (Depends-on): Add 'symlink'. * doc/posix-functions/access.texi: Mention the Mac OS X bug.
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 11ee0fc8 2023-09-09T11:26:46 chown, lchown: Revisit platforms. * doc/posix-functions/chown.texi: Update platforms list. * doc/posix-functions/lchown.texi: Likewise. * lib/chown.c (rpl_chown): Add platform comments. * lib/lchown.c: Likewise.
Bruno Haible 91fb520b 2023-09-05T16:36:11 stdint, *printf: Update doc about MSVC. * doc/posix-headers/stdint.texi: MSVC 14 has <stdint.h>. * doc/posix-functions/*printf.texi: Current mingw and MSVC 14 support the j, t, z size specifiers. * doc/glibc-functions/obstack_*printf.texi: Likewise.
Paul Eggert a68d527a 2023-09-02T13:43:34 Warn about Bug#65599 with CIFS chmod/chown
Bruno Haible a07c0e4b 2023-08-30T02:19:01 wctype: Rely on module iswpunct. * m4/wctype.m4 (gl_FUNC_WCTYPE): Also test whether the "punct" class works. * modules/wctype (Depends-on): Add iswpunct. * tests/test-iswctype.c (main): Add more tests of the "punct" class. * doc/posix-functions/wctype.texi: Mention the Android problem.
Bruno Haible 9753b53d 2023-08-30T02:18:06 iswpunct: New module. * lib/wctype.in.h (iswpunct): New declaration. * lib/iswpunct.c: New file. * m4/iswpunct.m4: New file. * m4/wctype_h.m4 (gl_WCTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISWPUNCT. (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_ISWPUNCT. * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWPUNCT, REPLACE_ISWPUNCT. * modules/iswpunct: New file. * doc/posix-functions/iswpunct.texi: Mention the new module.
Bruno Haible 47a6017d 2023-08-30T01:38:59 iswdigit, iswxdigit: Fix documentation. * doc/posix-functions/iswdigit.texi: Mention the module 'iswdigit'. * doc/posix-functions/iswxdigit.texi: Mention the module 'iswxdigit'.
Bruno Haible 60c34616 2023-08-29T19:49:15 wctype: Fix documentation (mistake 2023-07-26). * doc/posix-functions/wctype.texi: The "blank" argument problem on mingw is now worked around by Gnulib.
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 9b0c8f90 2023-08-20T00:45:05 logbl: Work around endless loop on OpenBSD 7.3/mips64. * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Terminate the test program if it takes longer than 5 seconds. * doc/posix-functions/logbl.texi: Mention the OpenBSD bug.
Bruno Haible 2d963d69 2023-08-18T22:38:04 thrd: Work around thrd_join bug on AIX 7.3.1. * m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set BROKEN_THRD_JOIN. (gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN. * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of BROKEN_THRD_START_T. * modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN. * lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN is 1. * lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of BROKEN_THRD_START_T. * doc/posix-functions/thrd_join.texi: Update. * doc/posix-functions/thrd_exit.texi: Likewise.
Bruno Haible cdf08214 2023-08-18T20:52:08 thrd: On AIX 7.1 and 7.2, override also thrd_exit. * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT. * lib/thrd.c (rpl_thrd_exit): New function. * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT. * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust LIBSTDTHREAD. * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT. * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem also here.
Bruno Haible b27b9d9b 2023-08-18T18:54:28 aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to disable optimization of ibm-clang -O2. * doc/posix-functions/aligned_alloc.texi: Update version info.
Bruno Haible 1fac141c 2023-08-11T10:24:46 clock-time: On mingw, avoid buggy clock_gettime from libwinpthread. * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_CANONICAL_HOST. On native Windows, avoid using clock_getres clock_gettime clock_settime from mingw's libwinpthread. * doc/posix-functions/clock_gettime.texi: Mention the mingw bug.
Paul Eggert ef7951ae 2023-08-06T12:19:36 Document Android, OpenBSD printf "%n" lack In doc/posix/functions/*printf*.texi, document that the POSIX-specified printf functions do not support the %n format on Android and OpenBSD. This lack of support is deliberate, as %n is a common target of attacks on security.
Bruno Haible bb86348c 2023-08-03T16:41:16 doc: More platform detail. * doc/posix-functions/fnmatch.texi: Mention Solaris OpenIndiana here, since it behaves differently than Solaris 11.4.
Bruno Haible ab9675b5 2023-08-03T14:21:17 doc: Add references to FreeBSD bugs. * doc/posix-functions/fnmatch.texi: Add commented reference to FreeBSD bug. * doc/posix-functions/wcscmp.texi: Likewise. * doc/posix-functions/wcsncmp.texi: Likewise.
Bruno Haible 042a7042 2023-07-26T16:32:48 wctrans: Work around bug on NetBSD. * lib/wctype.in.h (rpl_wctrans_t, wctrans_t, GNULIB_defined_wctrans_t): Define if REPLACE_WCTRANS is 1. (wctrans): Consider REPLACE_WCTRANS. (towctrans): Override if REPLACE_WCTRANS is 1. * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTRANS. * m4/wctrans.m4 (gl_FUNC_WCTRANS): Define through AC_DEFUN_ONCE. Test whether wctrans supports the "tolower" character mapping. Set REPLACE_WCTRANS if not. * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Require gl_FUNC_WCTRANS. * modules/wctrans (Depends-on): Add towctrans. (configure.ac): Consider REPLACE_WCTRANS. * modules/towctrans (Files): Add m4/wctrans.m4. (configure.ac): Override also if REPLACE_WCTRANS is 1. * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTRANS. * doc/posix-functions/wctrans.texi: Mention the NetBSD bug.
Bruno Haible d8fc9af5 2023-07-26T15:12:47 wctype: Work around wctype+iswctype bug on MSVC. * m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the MSVC bug. Update cross-compilation guess. * doc/posix-functions/wctype.texi: Mention the MSVC bug.
Bruno Haible f4ad51ee 2023-07-26T14:50:00 wctype: Work around wctype bug on mingw. * lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t): Define if REPLACE_WCTYPE is 1. (wctype): Consider REPLACE_WCTYPE. (iswctype): Override also if REPLACE_WCTYPE is 1. * lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the function-pointer based implementation. * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE. * m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test whether wctype supports the "blank" character class. Set REPLACE_WCTYPE if not. * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE. * modules/wctype (Status, Notice): Remove. (Depends-on): Add iswctype. Consider REPLACE_WCTYPE. (configure.ac): Consider REPLACE_WCTYPE. * modules/iswctype (Status, Notice): Remove. (Files): Add m4/wctype.m4. (configure.ac): Override also if REPLACE_WCTYPE is 1. * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE. * doc/posix-functions/wctype.texi: Mention the mingw bug.
Bruno Haible 1a602613 2023-07-26T14:13:48 wctype-h: Work around iswprint bug on mingw. * lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's iswprint function. * tests/test-wctype-h.c (main): Verify that this character class contains the ASCII space but not tab and newline. * tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value on native Windows as on other platforms. * doc/posix-functions/iswprint.texi: Mention the mingw bug.
Bruno Haible d1db7ef2 2023-07-24T12:08:23 fnmatch: Overcome wchar_t limitations. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on AIX in 32-bit mode. * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h. (UCHAR_TO_WCHAR): Renamed from BTOWC. (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR, TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros. (IS_CHAR_CLASS): Use WCTYPE instead of wctype. (UCHAR_TO_WCHAR): Use BTOWC instead of btowc. (FOLD): Use TOWLOWER instead of towlower. (CHAR): Use WCHAR_T instead of wchar_t. (UCHAR, INT): Use WINT_T instead of wint_t. (STRLEN): Use WCSLEN instead of wcslen. (STRCAT): Use WCSCAT instead of wcscat. (MEMPCPY): Use WMEMPCPY instead of wmempcpy. (MEMCHR): Use WMEMCHR instead of wmemchr. (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of wchar_t, WCTYPE instead of wctype. (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of mbsrtowcs. * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE instead of iswctype. Update for renamed BTOWC. * modules/fnmatch (Depends-on): Add btoc32, c32tolower, c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr, unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen. (Link): Add $(LIBUNISTRING). * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with $(LIBUNISTRING). * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX bug descriptions to the "fixed by Gnulib" section.
Bruno Haible dc1b379b 2023-07-24T11:10:15 fnmatch: Update doc regarding Solaris 10. * doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description to the "fixed by Gnulib" section.
Bruno Haible d5c86249 2023-07-23T15:26:28 fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to the test program. Reorganize its return values. * tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4. * doc/posix-functions/fnmatch.texi: Move the corresponding bug descriptions to the "fixed by Gnulib" section.
Bruno Haible 42473a0a 2023-07-23T14:04:59 fnmatch, fnmatch-gnu: Document known bugs. * doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR, FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME. * doc/posix-functions/fnmatch.texi: Reference the glibc documentation and the Linux man page. Document the effects of the two modules and all the known bugs in detail.
Bruno Haible 25cb1584 2023-07-23T00:32:47 doc: Mention a wctype bug. * doc/posix-functions/wctype.texi: Mention a bug on mingw.