doc/glibc-functions


Log

Author Commit Date CI Message
Bruno Haible 3925836a 2024-04-09T01:16:15 ptsname_r: Work around ptsname_r bug on NetBSD 10.0. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): On NetBSD, arrange to override ptsname_r. * lib/ptsname_r.c (ptsname_r): Add workaround for NetBSD bug. * doc/glibc-functions/ptsname_r.texi: Mention the NetBSD 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.
Paul Eggert af32ee82 2024-03-16T22:27:48 renameatu: support RENAME_EXCHANGE on macOS * lib/renameatu.c (renameat2ish, renameatu) [RENAME_SWAP]: Use macOS RENAME_SWAP to implement GNU/Linux RENAME_EXCHANGE. * tests/test-renameatu.c (main): Add a test for RENAME_EXCHANGE.
Bruno Haible 5aa8eafc 2024-03-05T19:11:09 doc: Update info about fopencookie. Reported by Michael Ford <fanquake@gmail.com>. * doc/glibc-functions/fopencookie.texi: Update platforms list.
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 6143e421 2024-01-26T00:18:55 Resolve conflicts for functions introduced in Android API level 34. * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): On platforms without glibc, test for copy_file_range using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. Conditionally set REPLACE_COPY_FILE_RANGE. * doc/glibc-functions/copy_file_range.texi: Mention the Android API levels.
Bruno Haible 884c299e 2024-01-26T00:18:52 Resolve conflicts for functions introduced in Android API level 34. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for posix_spawn_file_actions_addchdir_np and posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/posix_spawn_faction_addchdir.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/posix_spawn_faction_addfchdir.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention the Android API levels. * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: Likewise.
Bruno Haible df86a117 2024-01-25T21:04:29 Doc regarding functions introduced in Android API level 33. * doc/glibc-functions/backtrace.texi: Mention the Android API levels. * doc/glibc-functions/backtrace_symbols.texi: Likewise. * doc/glibc-functions/backtrace_symbols_fd.texi: Likewise. * doc/glibc-functions/preadv2.texi: Likewise. * doc/glibc-functions/pwritev2.texi: Likewise.
Bruno Haible 3260d550 2024-01-25T20:17:33 Resolve conflicts for functions introduced in Android API level 30. * doc/glibc-functions/memfd_create.texi: Mention the Android API levels. * doc/glibc-functions/mlock2.texi: Likewise. * doc/glibc-functions/pthread_cond_clockwait.texi: Likewise. * doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise. * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise. * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise. * doc/glibc-functions/renameat2.texi: Likewise. * doc/glibc-functions/sem_clockwait.texi: Likewise. * doc/glibc-functions/statx.texi: Likewise.
Bruno Haible d68d744a 2024-01-19T15:07:05 fenv-*: Fix test failures on NetBSD 9.3/arm64. * m4/fenv-exceptions-trapping.m4 (gl_FENV_EXCEPTIONS_TRAPPING): Override feenableexcept() also on NetBSD/arm64. * doc/glibc-functions/feenableexcept.texi: Update platforms list.
Bruno Haible dee279cf 2024-01-02T11:37:05 strverscmp: Work around bug in musl libc 1.2.3 and in Cygwin. Reported by Dmitry Bogatov <KAction@gnu.org> via Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00002.html>. * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STRVERSCMP. * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Test whether strverscmp works and set REPLACE_STRVERSCMP if not. * lib/string.in.h (strverscmp): Consider REPLACE_STRVERSCMP. * modules/strverscmp (Depends-on, configure.ac): Likewise. * modules/string (Makefile.am): Substitute REPLACE_STRVERSCMP. * tests/test-strverscmp.c (main): Add test cases suggested by Dmitry Bogatov and by Simon Josefsson. * doc/glibc-functions/strverscmp.texi: Mention the musl and Cygwin bug. Update version info regarding FreeBSD.
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 f09d9865 2023-12-01T11:47:31 sethostname tests: Fix a compilation error on FreeBSD 14.0. * tests/test-sethostname1.c: Skip the SIGNATURE_CHECK on some platforms. * doc/glibc-functions/sethostname.texi: Update platforms list.
Bruno Haible 202f49a7 2023-11-21T16:18:44 strerrorname_np: Work around glibc bug on HPPA systems. * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also strerrorname_np (ENOSYM). * lib/strerrorname_np.c (strerrorname_np): Update comments. * tests/test-strerrorname_np.c (main): Likewise. * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.37 still needs a workaround.
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 581e10cf 2023-11-05T12:56:24 fenv-exceptions-trapping: Update documentation. * doc/glibc-functions/feenableexcept.texi: Document the Linux/hppa problem.
Bruno Haible e5a52e29 2023-10-31T21:46:13 fenv-exceptions-trapping: New module. * lib/fenv.in.h (feenableexcept, fedisableexcept, fegetexcept): New declarations. * lib/fenv-except-trapping.c: New file, based on glibc. * m4/fenv_h.m4 (gl_FENV_H): Test also whether fegetexcept is declared. * m4/fenv-exceptions-trapping.m4: New file. * modules/fenv-exceptions-trapping: New file. * doc/glibc-functions/fegetexcept.texi: Mention the new module. * doc/glibc-functions/fedisableexcept.texi: Likewise. * doc/glibc-functions/feenableexcept.texi: Likewise. Mention the glibc, macOS, FreeBSD bugs.
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 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.
Bruno Haible 1bd24cc3 2023-08-13T16:08:33 readutmp, boot-time: Fix compilation error on Android API 8. Reported by Po Lu in <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>. * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether sysinfo is declared. * lib/boot-time-aux.h (get_linux_uptime): Invoke sysinfo only if it is declared. * doc/glibc-functions/sysinfo.texi: Mention the Android problem.
Bruno Haible 9cf0d830 2023-08-13T15:39:09 readutmp, boot-time: Fix compilation error on old Android. Reported by Po Lu in <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>. * lib/readutmp.c (endutent): New fallback declaration, for Android. (getutent): Remove Ultrix workaround from 2000-04-05. * lib/boot-time.c: Likewise. * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether endutent is declared, not getutent. * doc/glibc-functions/endutent.texi: Mention the Android bug.
Paul Eggert c408d9a5 2023-07-29T17:06:42 readutmp: work around glibc utmpx bug When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work, because the files use 32-bit time_t and the code passes this to the user unmodified, but <utmpx.h> defines a struct with 64-bit time_t. Work around this compatibility bug. Problem reported by Jakub Wilk via Sven Joachim <https://bugs.gnu.org/64937>. * lib/readutmp.c (copy_utmp_entry): New function. (read_utmp): Use it.
Bruno Haible 031219ca 2023-07-20T01:35:10 Document migration path for obsolescent functions. * doc/glibc-functions/timespec_get.texi: Add reference to ISO C. * doc/posix-functions/_tolower.texi: Recommend use of tolower. * doc/posix-functions/_toupper.texi: Recommend use of toupper. * doc/posix-functions/asctime.texi: Recommend use of strftime. * doc/posix-functions/asctime_r.texi: Likewise. * doc/posix-functions/ctime.texi: Recommend use of localtime_r and strftime. * doc/posix-functions/ctime_r.texi: Likewise. * doc/posix-functions/ftw.texi: Recommend use of fts. * doc/posix-functions/getitimer.texi: Recommend use of timer_gettime. * doc/posix-functions/gets.texi: Recommend use of fgets. * doc/posix-functions/gettimeofday.texi: Recommend use of gettime or timespec_get. * doc/posix-functions/inet_addr.texi: Recommend use of inet_pton. * doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop. * doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op. * doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op. * doc/posix-functions/rand_r.texi: Recommend use of random_r. * doc/posix-functions/setitimer.texi: Recommend use of timer_create and timer_settime. * doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid. * doc/posix-functions/sighold.texi: Recommend use of sigprocmask. * doc/posix-functions/sigignore.texi: Recommend use of sigaction. * doc/posix-functions/siginterrupt.texi: Recommend use of sigaction. * doc/posix-functions/sigpause.texi: Recommend use of sigsuspend. * doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask. * doc/posix-functions/sigset.texi: Recommend use of sigaction. * doc/posix-functions/tempnam.texi: Recommend use of mkstemp. * doc/posix-functions/ulimit.texi: Recommend use of getrlimit and setrlimit. * doc/posix-functions/utime.texi: Recommend use of utimens.
Jim Meyering 6a1c6825 2023-06-25T09:58:55 doc: correct doubled "on on" * doc/glibc-functions/initstate_r.texi: As above. * doc/posix-functions/initstate.texi: As above.
Bruno Haible af1e520a 2023-06-25T18:40:19 sigdescr_np tests: Avoid test failure on glibc/sparc. * tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT. * doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.
Bruno Haible 142909db 2023-06-25T18:19:06 strerrorname_np: Work around glibc bug on PowerPC, SPARC systems. * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also strerrorname_np (EDEADLOCK). * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36 still needs a workaround.
Bruno Haible ea3dd857 2023-06-25T17:58:57 doc: Mention glibc initstate, initstate_r bug. * doc/posix-functions/initstate.texi: Mention glibc bug. * doc/glibc-functions/initstate_r.texi: Likewise. * tests/test-random_r.c: Add a comment.
Bruno Haible e7d12124 2023-04-19T20:07:52 doc: Add references to changes accepted for future POSIX revisions. * doc/glibc-functions/bind_textdomain_codeset.texi: Add reference to www.austingroupbugs.net issue. * doc/glibc-functions/bindtextdomain.texi: Likewise. * doc/glibc-functions/dcgettext.texi: Likewise. * doc/glibc-functions/dcngettext.texi: Likewise. * doc/glibc-functions/dgettext.texi: Likewise. * doc/glibc-functions/dngettext.texi: Likewise. * doc/glibc-functions/getentropy.texi: Likewise. * doc/glibc-functions/getresgid.texi: Likewise. * doc/glibc-functions/getresuid.texi: Likewise. * doc/glibc-functions/gettext.texi: Likewise. * doc/glibc-functions/ngettext.texi: Likewise. * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Likewise. * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: Likewise. * doc/glibc-functions/setresgid.texi: Likewise. * doc/glibc-functions/setresuid.texi: Likewise. * doc/glibc-functions/textdomain.texi: Likewise. * doc/posix-functions/asctime_r.texi: Likewise. * doc/posix-functions/ctime_r.texi: Likewise.
Bruno Haible dc7c42cd 2023-04-08T12:08:03 login_tty: Fix compilation error in C++ mode on Solaris 11.4. * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists. Consider it when testing whether login_tty is declared. * lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include <termios.h> instead. * doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
Bruno Haible 63ccbd65 2023-03-28T13:13:55 doc: Update regarding linear string search. * doc/glibc-functions/memmem.texi: Update platforms list. * doc/posix-functions/strstr.texi: Likewise. * doc/glibc-functions/strcasestr.texi: Likewise.
Bruno Haible 7e73cf31 2023-03-24T12:11:52 obstack-printf-gnu: New module. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): New macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX. (gl_FUNC_OBSTACK_PRINTF_POSIX): Require it. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS. * m4/obstack-printf-gnu.m4: New file, based on m4/obstack-printf-posix.m4. * modules/obstack-printf-gnu: New file, based on modules/vasnprintf-gnu. * doc/glibc-functions/obstack_printf.texi: Mention the new module. * doc/glibc-functions/obstack_vprintf.texi: Likewise.
Bruno Haible 891708e6 2023-03-24T11:28:38 vasprintf-gnu: New module. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro, extracted from gl_FUNC_VASPRINTF_POSIX. (gl_FUNC_VASPRINTF_POSIX): Require it. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS. * m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4. * modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu. * doc/glibc-functions/vasprintf.texi: Mention the new module. * doc/glibc-functions/asprintf.texi: Likewise.
Bruno Haible 4928ebfa 2023-03-21T15:49:06 *printf-posix: Work around bug with %lc of 0 on many platforms. * lib/vasnprintf.c (local_wctomb): Define also for NEED_PRINTF_DIRECTIVE_LC. (VASNPRINTF): Implement %lc handling ourselves if NEED_PRINTF_DIRECTIVE_LC. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): New macro. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LC): New macro. (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require gl_PRINTF_DIRECTIVE_LC and test its result. Invoke gl_PREREQ_VASNPRINTF_DIRECTIVE_LC. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise. * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise. * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise. * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise. * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise. * tests/test-snprintf-posix.h (test_function): Add more tests for the %c and %lc directives. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnprintf-posix.c (test_function): Likewise. * tests/test-vasprintf-posix.c (test_function): Likewise. * doc/glibc-functions/asprintf.texi: Mention the %lc 0 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/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.
Bruno Haible bb7cf2b6 2023-03-17T22:45:56 *printf-posix: ISO C 23: Add %b directive for binary output of integers. * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive. * lib/printf-parse.h: Update comment. * lib/wprintf-parse.h: Likewise. * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the 'b' directive. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro. (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it. * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke gl_PREREQ_VASNPRINTF_DIRECTIVE_B. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require gl_PRINTF_DIRECTIVE_B and test its result. Invoke gl_PREREQ_VASNPRINTF_DIRECTIVE_B. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise. * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise. * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise. * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise. * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise. * tests/test-snprintf-posix.h (test_function): Add some tests of the %b directive. * 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/glibc-functions/asprintf.texi: Mention the 'b' directive. * 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 4873f857 2023-03-16T14:16:25 timegm: Document under ISO C and POSIX substitutes. * doc/posix-functions/timegm.texi: Renamed from doc/glibc-functions/timegm.texi. * doc/gnulib.texi (Function Substitutes): Include timegm.texi here... (Glibc time.h): ... not here.
Bruno Haible 8441d676 2023-03-05T19:37:14 Remove unused documentation file. * doc/glibc-functions/timespec_getres.texi: Remove file.
Bruno Haible 9041103e 2023-01-21T21:13:20 login_tty: Ensure declaration in <utmp.h>. * tests/test-utmp-c++.cc: New file. * modules/utmp-c++-tests: New file. * tests/test-utmp.c: New file. * modules/utmp-tests: New file. * lib/login_tty.c: Include <utmp.h>. * m4/login_tty.m4: New file. (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY. * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4. * modules/login_tty (Files): Add m4/login_tty.m4. (Depends-on): Add utmp. Remove pty. Update condition. (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR instead of gl_PTY_MODULE_INDICATOR. (Include): List <utmp.h>. * doc/glibc-functions/login_tty.texi: Mark the include file diversity as fixed. * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty here. * lib/utmp.in.h: New file. * m4/utmp_h.m4: New file. * modules/utmp: New file. * doc/glibc-headers/utmp.texi: New file. * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
Bruno Haible 1f993001 2023-01-19T15:18:31 fts: Document this module. * doc/glibc-headers/fts.texi: Mention the 'fts' module. * doc/glibc-functions/fts_children.texi: Likewise. * doc/glibc-functions/fts_close.texi: Likewise. * doc/glibc-functions/fts_open.texi: Likewise. * doc/glibc-functions/fts_read.texi: Likewise. * doc/glibc-functions/fts_set.texi: Likewise.
Bruno Haible 2886cca8 2023-01-12T16:51:15 error: Work around an Android problem. * lib/error.in.h: Renamed from lib/error.h. (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro. (error): Consider HAVE_ERROR and REPLACE_ERROR. (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE. * m4/error_h.m4: New file, partially based on m4/error.m4. * m4/error.m4 (gl_ERROR): Remove the test for error_at_line. * modules/error-h: New file. * modules/error (Files): Remove lib/error.h. (Depends-on): Add error-h. Update conditions. (configure.ac): Require gl_ERROR_H. Update condition. * doc/glibc-headers/error.texi: Mention the 'error-h' module. * doc/glibc-functions/error.texi: Mention the Android problem. * config/srclist.txt: Add comment regarding error.h.
Bruno Haible 7ca7d7d7 2023-01-05T17:16:09 getpass: Fix compilation error on Android. * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS. * doc/glibc-functions/getpass.texi: Mention the Android problem.
Bruno Haible cf2937d4 2023-01-05T16:36:52 Recognize functions added in future versions of Android. * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/freading.m4 (gl_FUNC_FREADING): Likewise. * m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise. * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise. * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise. * m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise. * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise. * m4/glob.m4 (gl_PREREQ_GLOB): Likewise. * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise. * doc/glibc-functions/getentropy.texi: Mark function as existing in Android 9.0. * doc/glibc-functions/getrandom.texi: Likewise. * doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise. * doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
Bruno Haible 16aa871e 2023-01-04T08:07:03 doc: Update regarding Android. * doc/glibc-functions/getdtablesize.texi: Update Android information. * doc/glibc-functions/wait3.texi: Likewise. * doc/pastposix-functions/ftime.texi: Likewise. * doc/pastposix-functions/index.texi: Likewise. * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise. * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise. * doc/pastposix-functions/wcswcs.texi: Likewise.
Bruno Haible 7c4ee888 2023-01-03T21:33:32 ffsl, ffsll: Fix compilation error on Android. * lib/string.in.h: On Android as well, include <strings.h>. * m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of AC_CHECK_FUNCS_ONCE. * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise. * doc/glibc-functions/ffsl.texi: Mention Android problems. * doc/glibc-functions/ffsll.texi: Likewise.
Bruno Haible 3c92fb8e 2023-01-03T17:14:33 stdio: Fix error in C++ mode on Android, due to putw. * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is not declared. * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared. (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW. * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW. * doc/glibc-functions/putw.texi: Update regarding Android.
Bruno Haible 8453b553 2022-12-06T00:25:34 argp: Correct documentation. Reported by José E. Marchesi <jemarch@gnu.org>. * doc/glibc-functions/argp_*.texi: Mention the 'argp' module.
Paul Eggert c4d0e2a0 2022-11-27T20:52:04 explicit_bzero: memset_explicit is standard * doc/glibc-functions/explicit_bzero.texi: Say that memset_explicit is preferred in new code.
Paul Eggert 8f71b269 2022-06-19T23:30:01 lchmod: port back to AIX 7.2 Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html * lib/lchmod.c: Include string.h, for strlen. (lchmod): Do not depend on HAVE_READLINK since we now depend on the readlink module. Check for AIX 7.2 bug. * m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink since we now depend on the readlink module. * modules/lchmod (Depends-on): Depend on readlink.
Paul Eggert 0ac98783 2022-01-14T17:27:51 copy-file-range: work around Linux kernel bug This workaround is adapted from Coreutils. * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]: Include <sys/utsname.h>. (copy_file_range): Use a stub to replace the copy_file_range of Linux kernel versions 4.5 through 5.2. * lib/unistd.in.h (copy_file_range): * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): * modules/copy-file-range (configure.ac): * modules/unistd (unistd.h): Support replacement of copy_file_range. * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): Define HAVE_COPY_FILE_RANGE if the system has copy_file_range, and on Linux check whether the system’s is known to work.
Paul Eggert af4148ce 2021-12-28T11:39:17 timespec_getres: new module * lib/time.in.h (timespec_getres): New decl. * lib/timespec_getres.c, m4/timespec_getres.m4: * modules/timespec_getres, modules/timespec_getres-tests: * tests/test-timespec_getres.c: New files. * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS): * modules/time (time.h): Support timespec_getres.
Bruno Haible 2a0fb7f6 2021-12-24T16:29:58 doc: Small updates. * doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X. * doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
Bruno Haible 8f4538a5 2021-08-14T22:07:33 doc: Update for glibc 2.34. * doc/posix-functions/timespec_getres.texi: New file. * doc/glibc-functions/_Fork.texi: New file. * doc/glibc-functions/closefrom.texi: New file. * doc/glibc-functions/dn_comp.texi: New file. * doc/glibc-functions/dn_skipname.texi: New file. * doc/glibc-functions/execveat.texi: New file. * doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New file. * doc/glibc-functions/res_dnok.texi: New file. * doc/glibc-functions/res_hnok.texi: New file. * doc/glibc-functions/res_mailok.texi: New file. * doc/glibc-functions/res_nmkquery.texi: New file. * doc/glibc-functions/res_nquery.texi: New file. * doc/glibc-functions/res_nquerydomain.texi: New file. * doc/glibc-functions/res_nsearch.texi: New file. * doc/glibc-functions/res_nsend.texi: New file. * doc/glibc-functions/res_ownok.texi: New file. * doc/glibc-functions/res_send.texi: New file. * doc/gnulib.texi: Include them. * doc/glibc-functions/inet_neta.texi: Remove file. * doc/glibc-functions/malloc_get_state.texi: Remove file. * doc/glibc-functions/malloc_set_state.texi: Remove file. * doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file. * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file. * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file. * doc/glibc-functions/pthread_yield.texi: Remove file. * doc/gnulib.texi: Don't include them. * doc/glibc-headers/resolv.texi: Update. * doc/pastposix-functions/h_errno.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Paul Eggert a7477abe 2021-04-24T10:45:45 reallocarray: check for ptrdiff_t overflow * doc/glibc-functions/reallocarray.texi (reallocarray): Mention ptrdiff_t overflow. * lib/reallocarray.c (reallocarray): Reindent as per usual GNU. * lib/stdlib.in.h (reallocarray): Allow reallocarray to be replaced. * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Check for ptrdiff_t overflow. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set up REPLACE_REALLOCARRAY. * modules/reallocarray (Files): Add malloc.m4. (configure.ac): Also test REPLACE_REALLOCARRAY. * modules/reallocarray-tests (Depends-on): Add stdint. * modules/stdlib (stdlib.h): Substitute REPLACE_REALLOCARRAY. * tests/test-reallocarray.c: Include stdint.h. (main): Check for ptrdiff_t overflow.
Bruno Haible 04a9dd8f 2021-04-17T15:29:16 doc: Update for FreeBSD 11.0, 12.0, 13.0. * doc/posix-headers/*.texi: Update. * doc/glibc-headers/*.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
Bruno Haible 0b06bc0c 2021-03-21T16:03:57 doc: More updates. * doc/glibc-functions/sethostname.texi: Update regarding macOS. * doc/glibc-functions/sethostname.texi: List the affected platforms.
Bruno Haible 79c4db53 2021-03-21T14:56:02 doc: Update for macOS 11.1. * doc/posix-headers/*.texi: Update. * doc/glibc-headers/*.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation guess.
Bruno Haible 3699ec97 2021-03-06T13:49:30 doc: Update for glibc 2.33. * doc/glibc-functions/mallinfo2.texi: New file. * doc/gnulib.texi: Include it. (Glibc sys/vtimes.h): Remove section. * doc/glibc-functions/vtimes.texi: Remove file. * doc/pastposix-functions/h_errno.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Bruno Haible 548423f2 2021-02-08T21:35:14 Document non-standard prototypes on MidnightBSD. * doc/posix-functions/initstate.texi: Mention different prototype on MidnightBSD 2.0. * doc/posix-functions/srandom.texi: Likewise. * doc/posix-functions/getlogin_r.texi: Likewise. * doc/glibc-functions/sethostname.texi: Likewise.
Bruno Haible fb0e2ad3 2021-01-20T09:08:50 doc: Document ptsname_r bug on Cygwin. * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug.
Bruno Haible e478401b 2021-01-06T12:15:33 flock: Update documentation. * doc/glibc-functions/flock.texi: Document what to expect on AIX and Solaris.
Bruno Haible 9333dcf6 2021-01-06T02:08:41 utimensat: Work around trailing slash bug in utimensat() on AIX 7.2. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a test for trailing slash handling. Improve cross-compilation guesses. Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT. * lib/utimensat.c (rpl_utimensat): Add alternative implementation when HAVE_NEARLY_WORKING_UTIMENSAT is defined. * lib/utimens.c: Use the overridden utimensat when HAVE_NEARLY_WORKING_UTIMENSAT is defined. * doc/posix-functions/utimensat.texi: Mention the AIX bug.
Bruno Haible e182feb2 2021-01-05T07:15:09 ffsll: Override completely broken implementation on AIX in 32-bit mode. * m4/ffsll.m4 (gl_FUNC_FFSLL): Test whether ffsll minimally works. If not, set REPLACE_FFSLL. * lib/string.in.h (ffsll): Consider REPLACE_FFSLL. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize REPLACE_FFSLL. * modules/string (Makefile.am): Substitute REPLACE_FFSLL. * modules/ffsll (Depends-on, configure.ac): Consider REPLACE_FFSLL. * doc/glibc-functions/ffsll.texi: Mention the AIX 7.2 bug.
Bruno Haible ae9fb3d6 2021-01-04T08:02:18 ffsl, ffsll: Work around AIX 7.2 problem. * lib/string.in.h: On AIX, include <strings.h> for the declarations of ffsl and ffsll. * doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem. * doc/glibc-functions/ffsll.texi: Likewise.
Bruno Haible caf114a3 2021-01-02T13:14:08 timespec_get: New module. * lib/time.in.h (timespec_get): New declaration. * lib/timespec_get.c: New file. * m4/timespec_get.m4: New file. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET. * modules/time (Makefile.am): Substitute GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET. * modules/timespec_get: New file. * tests/test-time-c++.cc (timespec_get): Check signature. * doc/glibc-functions/timespec_get.texi: Mention the new module.
Bruno Haible 3374e597 2020-12-31T22:18:05 memalign: Work around Solaris bug. * lib/memalign.c: New file. * m4/memalign.m4: New file. * modules/memalign (Files): Add them. (Depends-on): Add malloc-h. (configure.ac): Invoke gl_FUNC_MEMALIGN. Conditionally compile memalign.c. Set module indicator. (Include): Include <malloc.h> unconditionally. * doc/glibc-functions/memalign.texi: Mention the Solaris issues.
Bruno Haible a50484eb 2020-12-26T14:23:10 execvpe: New module. * lib/execvpe.c: New file. * m4/execvpe.m4: New file. * modules/execvpe: New file. * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the new module.
Bruno Haible c3ffa09c 2020-12-07T19:43:06 get-rusage-data: Fix link error on FreeBSD 12.2/arm64. * modules/get-rusage-data (configure.ac): Test whether sbrk exists. * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define trivially of sbrk is not available. * doc/glibc-functions/sbrk.texi: Mention that the function does not exist in FreeBSD 12.2/arm64. * doc/glibc-functions/brk.texi: Likewise.
Bruno Haible 5af45773 2020-12-06T15:51:41 doc: Mention some missing function declarations. * doc/glibc-functions/execvpe.texi: Mention the missing declaration on AIX. * doc/glibc-functions/fcloseall.texi: Mention the missing declaration on FreeBSD. * doc/pastposix-functions/ecvt.texi: Mention the missing declaration on Cygwin. * doc/pastposix-functions/fcvt.texi: Likewise. * doc/pastposix-functions/gcvt.texi: Likewise.
Bruno Haible a9a90f53 2020-11-22T18:18:17 doc: Add references to the LSB.
Bruno Haible 07053570 2020-11-22T17:48:50 doc: Add references to the LSB. * doc/glibc-functions/*.texi: Add references to LSB 5.0. * doc/posix-functions/*.texi: Likewise.
Bruno Haible 9019f1d7 2020-11-04T02:12:15 memalign: New module. * modules/memalign: New file. * doc/glibc-functions/memalign.texi: Mention the new module.
Bruno Haible 4041bb7c 2020-08-30T22:19:05 strerrorname_np: New module. * lib/string.in.h (strerrorname_np): New declaration. * lib/strerrorname_np.c: New file. * m4/strerrorname_np.m4: New file. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether strerrorname_np is declared. (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERRORNAME_NP, HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP. * modules/string (Makefile.am): Substitute GNULIB_STRERRORNAME_NP, HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP. * modules/strerrorname_np: New file. * tests/test-string-c++.cc: Verify the signature of strerrorname_np. * doc/glibc-functions/strerrorname_np.texi: Mention the new module and the glibc 2.32 bug.
Bruno Haible d17a87bd 2020-08-23T00:44:24 doc: Update for OpenBSD 6.0, 6.7. * doc/*/*.texi: Update. * m4/printf.m4: Update comments and cross-compilation guesses. * m4/ceill.m4: Update comments. * m4/getcwd-abort-bug.m4: Likewise. * m4/ilogb.m4: Likewise. * m4/ilogbf.m4: Likewise. * m4/langinfo_h.m4: Likewise. * m4/modf.m4: Likewise. * m4/modff.m4: Likewise.
Bruno Haible 3c8ec93c 2020-08-22T17:52:06 doc: Mention sig2str module. * doc/glibc-functions/sigabbrev_np.texi: Mention the sig2str module.
Bruno Haible e5f37108 2020-08-22T02:22:05 sigdescr_np: New module. * lib/string.in.h (sigdescr_np): New declaration. * lib/sigdescr_np.c: New file. * m4/sigdescr_np.m4: New file. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigdescr_np is declared. (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGDESCR_NP, HAVE_SIGDESCR_NP. * modules/string (Makefile.am): Substitute GNULIB_SIGDESCR_NP, HAVE_SIGDESCR_NP. * modules/sigdescr_np: New file. * tests/test-string-c++.cc: Verify the signature of sigdescr_np. * doc/glibc-functions/sigdescr_np.texi: Mention the new module.
Bruno Haible f57bc6d1 2020-08-21T00:54:18 sigabbrev_np: New module. * lib/string.in.h (sigabbrev_np): New declaration. * lib/sigabbrev_np.c: New file. * m4/sigabbrev_np.m4: New file. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigabbrev_np is declared. (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGABBREV_NP, HAVE_SIGABBREV_NP. * modules/string (Makefile.am): Substitute GNULIB_SIGABBREV_NP, HAVE_SIGABBREV_NP. * modules/sigabbrev_np: New file. * tests/test-string-c++.cc: Verify the signature of sigabbrev_np. * doc/glibc-functions/sigabbrev_np.texi: Mention the new module.
Bruno Haible feebf0f6 2020-08-15T17:52:24 doc: Update for MSVC/clang. * doc/*-functions/*printf.texi: Mention that MSVC/clang has two bugs that MSVC 14 does not have.
Paul Eggert bff5e7a5 2020-08-07T15:26:27 doc: more updates for glibc 2.32 * doc/glibc-functions/lchmod.texi, doc/posix-functions/faccessat.texi: * doc/posix-functions/fchmodat.texi: Update.
Bruno Haible a782d567 2020-08-07T23:02:21 doc: Update for glibc 2.32. * doc/glibc-functions/__libc_single_threaded.texi: New file. * doc/glibc-functions/pthread_attr_getsigmask_np.texi: New file. * doc/glibc-functions/pthread_attr_setsigmask_np.texi: New file. * doc/glibc-functions/sigabbrev_np.texi: New file. * doc/glibc-functions/sigdescr_np.texi: New file. * doc/glibc-functions/strerrordesc_np.texi: New file. * doc/glibc-functions/strerrorname_np.texi: New file. * doc/gnulib.texi: Include them. (Glibc sys/single_threaded.h): New section. * doc/pastposix-functions/h_errno.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Bruno Haible e6c7f8be 2020-07-25T23:27:40 doc: Update for NetBSD 7.1, 8.0, 9.0. * doc/*/*.texi: Update. * m4/exp2l.m4: Update comments. * m4/expl.m4: Likewise. * m4/ilogb.m4: Likewise. * m4/ilogbf.m4: Likewise. * m4/log10l.m4: Likewise. * m4/logl.m4: Likewise. * m4/printf.m4: Likewise. * m4/rintl.m4: Likewise. * m4/wcwidth.m4: Likewise.
Bruno Haible 0c12abaf 2020-07-25T01:38:31 doc: Update for Mac OS X 10.13. * doc/*/*.texi: Update. * m4/expm1l.m4: Update comments. * m4/getgroups.m4: Likewise. * m4/getlogin_r.m4: Likewise. * m4/linkat.m4: Likewise. * m4/printf.m4: Likewise.
Bruno Haible 5b477372 2020-07-25T01:37:59 doc: Update for Cygwin 2.9.0. * doc/*/*.texi: Update.
Bruno Haible 8ce76ed5 2020-07-21T10:03:42 aligned-malloc: New module. * lib/aligned-malloc.h: New file. * m4/malloc-align.m4: New file. * modules/aligned-malloc: New file. * doc/posix-functions/posix_memalign.texi: Mention the new module. * doc/glibc-functions/memalign.texi: Likewise.
Bruno Haible 6aa22a86 2020-07-04T18:14:46 getumask: New module. * lib/sys_stat.in.h (getumask): New declaration. * lib/getumask.c: New file. * m4/getumask.m4: New file. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether getumask is declared. (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_GETUMASK, HAVE_GETUMASK. * modules/sys_stat (Makefile.am): Substitute GNULIB_GETUMASK, HAVE_GETUMASK. * modules/getumask: New file. * tests/test-sys_stat-c++.cc (getumask): Check signature. * doc/glibc-functions/getumask.texi: New file. * doc/gnulib.texi (Glibc sys/stat.h): Include it.
Paul Eggert a6ca54cc 2020-06-01T17:02:54 getentropy, getrandom: compare to crypto/gc-random
Paul Eggert 60cfc85f 2020-06-01T15:45:44 getentropy, getrandom: update version numbers in doc
Paul Eggert dd091da1 2020-06-01T11:18:06 doc: improve randomness discussion Inspired by comments from Jeffrey Walton in: https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html * doc/glibc-functions/getentropy.texi (getentropy): * doc/glibc-functions/getrandom.texi (getrandom): Improve discussion of problems with "random" data, and cite Ristenpart & Yilek. Also, mention GRND_INSECURE.
Bruno Haible 56506c24 2020-06-01T20:05:14 doc: Fix Texinfo syntax error. * doc/glibc-functions/getrandom.texi: Add missing '@item'.
Asher Gordon 6be4a08f 2020-05-17T15:34:20 doc: Change '.' to '@.' where appropriate. * doc/c-ctype.texi: Change '.' to '@.' where appropriate. * doc/glibc-functions/fstatfs.texi: Likewise. * doc/glibc-functions/fts_children.texi: Likewise. * doc/glibc-functions/fts_read.texi: Likewise. * doc/glibc-functions/getdirentries.texi: Likewise. * doc/glibc-functions/mkostemp.texi: Likewise. * doc/glibc-functions/mkostemps.texi: Likewise. * doc/glibc-functions/mkstemps.texi: Likewise. * doc/glibc-functions/preadv.texi: Likewise. * doc/glibc-functions/pwritev.texi: Likewise. * doc/glibc-functions/sendfile.texi: Likewise. * doc/glibc-functions/statfs.texi: Likewise. * doc/gnulib-intro.texi: Likewise. * doc/gnulib-tool.texi: Likewise. * doc/intprops.texi: Likewise. * doc/lib-symbol-visibility.texi: Likewise. * doc/licenses-texi.texi: Likewise. * doc/pastposix-functions/bcmp.texi: Likewise. * doc/pastposix-functions/bcopy.texi: Likewise. * doc/pastposix-functions/bzero.texi: Likewise. * doc/pastposix-functions/ecvt.texi: Likewise. * doc/pastposix-functions/fcvt.texi: Likewise. * doc/pastposix-functions/ftime.texi: Likewise. * doc/pastposix-functions/gcvt.texi: Likewise. * doc/pastposix-functions/getwd.texi: Likewise. * doc/pastposix-functions/index.texi: Likewise. * doc/pastposix-functions/mktemp.texi: Likewise. * doc/pastposix-functions/rindex.texi: Likewise. * doc/pastposix-functions/wcswcs.texi: Likewise. * doc/posix-functions/aio_cancel.texi: Likewise. * doc/posix-functions/aio_error.texi: Likewise. * doc/posix-functions/aio_fsync.texi: Likewise. * doc/posix-functions/aio_read.texi: Likewise. * doc/posix-functions/aio_return.texi: Likewise. * doc/posix-functions/aio_suspend.texi: Likewise. * doc/posix-functions/aio_write.texi: Likewise. * doc/posix-functions/creat.texi: Likewise. * doc/posix-functions/ctime.texi: Likewise. * doc/posix-functions/daylight.texi: Likewise. * doc/posix-functions/fgetpos.texi: Likewise. * doc/posix-functions/fopen.texi: Likewise. * doc/posix-functions/freopen.texi: Likewise. * doc/posix-functions/fseeko.texi: Likewise. * doc/posix-functions/fsetpos.texi: Likewise. * doc/posix-functions/fstatat.texi: Likewise. * doc/posix-functions/fstatvfs.texi: Likewise. * doc/posix-functions/ftello.texi: Likewise. * doc/posix-functions/ftruncate.texi: Likewise. * doc/posix-functions/getrlimit.texi: Likewise. * doc/posix-functions/lio_listio.texi: Likewise. * doc/posix-functions/localtime.texi: Likewise. * doc/posix-functions/lseek.texi: Likewise. * doc/posix-functions/mkstemp.texi: Likewise. * doc/posix-functions/mktime.texi: Likewise. * doc/posix-functions/open.texi: Likewise. * doc/posix-functions/openat.texi: Likewise. * doc/posix-functions/opendir.texi: Likewise. * doc/posix-functions/pread.texi: Likewise. * doc/posix-functions/pwrite.texi: Likewise. * doc/posix-functions/readdir.texi: Likewise. * doc/posix-functions/readdir_r.texi: Likewise. * doc/posix-functions/scandir.texi: Likewise. * doc/posix-functions/seekdir.texi: Likewise. * doc/posix-functions/setrlimit.texi: Likewise. * doc/posix-functions/statvfs.texi: Likewise. * doc/posix-functions/strftime.texi: Likewise. * doc/posix-functions/telldir.texi: Likewise. * doc/posix-functions/timezone.texi: Likewise. * doc/posix-functions/tmpfile.texi: Likewise. * doc/posix-functions/truncate.texi: Likewise. * doc/posix-functions/tzname.texi: Likewise. * doc/posix-functions/wcsftime.texi: Likewise. * doc/windows-sockets.texi: Likewise.
Bruno Haible d4429157 2020-05-31T21:01:19 getrandom, getentropy: Mention the crypto/gc-random module. Suggested by Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00400.html>. * doc/glibc-functions/getrandom.texi: Mention the quality issues and the crypto/gc-random module. * doc/glibc-functions/getentropy.texi: Likewise.
Bruno Haible 90b3a5b6 2020-05-31T20:12:04 getentropy: Work around a macOS and Solaris problem. * lib/unistd.in.h: Include <sys/random.h>, when needed for the 'getentropy' module. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize UNISTD_H_HAVE_SYS_RANDOM_H. * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set UNISTD_H_HAVE_SYS_RANDOM_H. * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H. * doc/glibc-functions/getentropy.texi: Document the macOS and Solaris problem. List more platforms.
Bruno Haible 9de2f9ad 2020-05-31T18:47:12 getrandom: Doc and test tweaks. * lib/getrandom.c (getrandom): Mention that it never returns 0, and that it sets errno when failing. * tests/test-getrandom.c (main): Disable the high-quality check on those platforms on which it fails. * doc/glibc-functions/getrandom.texi: Add Minix, AIX, HP-UX, IRIX, Cygwin to the list of platforms that don't have the function. Add a note about the quality of the result. * doc/glibc-headers/sys_random.texi: Don't mention the 'getrandom' declaration; this is fixed by module 'getrandom'.
Bruno Haible 8175e3dd 2020-05-31T18:23:04 getrandom: Add support for native Windows. * lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>, <wincrypt.h>. (CRYPT_VERIFY_CONTEXT): New macro. (LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix 'A'. (GetProcAddress): New macro. (BCryptGenRandomFuncType): New type. (BCryptGenRandomFunc, initialized): New variables. (initialize): New function. (getrandom): On native Windows, use <bcrypt.h> API when available, and <wincrypt.h> API as fallback. * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM. * modules/getrandom (Link): New section. * modules/getentropy (Link): Likewise. * modules/getrandom-tests (Makefile.am): Link test-getrandom against $(LIB_GETRANDOM). * modules/getentropy-tests (Makefile.am): Link test-getentropy against $(LIB_GETRANDOM). * modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++ against $(LIB_GETRANDOM). * doc/glibc-functions/getrandom.texi: Mention the native Windows support.
Bruno Haible 68935ae9 2020-05-31T02:42:47 wmempcpy: New module. Reported by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>. * lib/wchar.in.h (wmempcpy): New declaration. * lib/wmempcpy.c: New file. * m4/wmempcpy.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY. * modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY, HAVE_WMEMPCPY. * modules/wmempcpy: New file. * tests/test-wchar-c++.cc: Check the signature of wmempcpy. * doc/glibc-functions/wmempcpy.texi: Mention the new module. * modules/mempcpy (Description): Fix typo.
Bruno Haible 67ae31b6 2020-05-30T17:33:46 getrandom: Override incompatible system function on Solaris 11. * lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1. * lib/getrandom.c (getrandom): When the system has getrandom, just invoke it. * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the system's getrandom function's prototype is not the expected one. * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize REPLACE_GETRANDOM. * modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM. * modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM. * tests/test-getrandom.c (main): Allow error EINVAL as an alternative to EAGAIN. * doc/glibc-functions/getrandom.texi: Mention the new module and the Solaris problem.
Paul Eggert 682cc4e6 2020-05-25T09:19:56 getentropy, getrandom: new modules * MODULES.html.sh (func_all_modules): * lib/unistd.in.h (getentropy, getrandom): * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS): * modules/unistd (unistd.h): Add support for getentropy, getrandom. * doc/glibc-functions/getentropy.texi (getentropy): * doc/glibc-functions/getrandom.texi (getrandom): These are now fixed on some platforms. * lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h: * m4/getentropy.m4, m4/getrandom.m4: * modules/getentropy, modules/getentropy-tests: * modules/getrandom, modules/getrandom-tests: * tests/test-getentropy.c, tests/test-getrandom.c: New files.
Bruno Haible d863fc54 2020-02-08T21:22:15 lchmod: Ensure declaration on HP-UX. * lib/sys_stat.in.h (lchown): Declare also on HP-UX. * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.
Bruno Haible 3be55f26 2020-02-08T15:54:25 doc: Update for glibc 2.31. * doc/glibc-functions/pthread_clockjoin_np.texi: New file. * doc/gnulib.texi: Include it. * doc/pastposix-functions/h_errno.texi: Update. * doc/posix-functions/*.texi: Likewise.
Paul Eggert c483c787 2020-02-07T16:34:12 fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that they act like chmod on non-symlinks. * NEWS: * doc/glibc-functions/lchmod.texi (lchmod): * doc/posix-functions/fchmodat.texi (fchmodat): Mention this. * lib/fchmodat.c: Define __need_system_sys_stat_h before including config.h, and undef it after including sys/stat.h the first time. Include fcntl.h, stdio.h, unistd.h, intprops.h, and include sys/stat.h a second time after defining orig_fchmodat. (orig_fchmodat) [HAVE_FCHMODAT]: New function. (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug. * lib/lchmod.c: New file. * lib/sys_stat.in.h (fchmodat, lchmod): Support replacing these functions. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists, test that AT_SYMLINK_NOFOLLOW works on non-symlinks. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat. Test that lchmod works on non-symlinks. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0. * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd. (Depends-on, configure.ac): Check REPLACE_FCHMODAT too. * modules/lchmod (Files): Add lib/lchmod.c. (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd. (configure.ac): Compile lchmod.c if needed. (lib_SOURCES): Add lchmod.c. * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT and REPLACE_LCHMOD. * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h. (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
Bruno Haible 15cd8caa 2020-01-01T16:34:39 doc: Update documentation about wchar_t. * doc/*/*wc*.texi: Clarify that 64-bit AIX does not have a too small wchar_t type.
Bruno Haible 16e9d079 2019-12-08T21:49:32 Fix compilation error in C++ mode on HP-UX 11. * lib/unistd.in.h (getpagesize): Declare on HP-UX. * doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.