doc/posix-functions

Branch


Log

Author Commit Date CI Message
Paul Eggert 39540147 2025-10-23T23:10:44 doc: allow for _FORTIFY_SOURCE = 3 Problem reported by Basil L. Contovounesios in: https://lists.gnu.org/r/bug-gnulib/2025-10/msg00068.html
Collin Funk 9bb08f51 2025-10-22T12:15:16 doc: Update gmtime_r documentation for OpenBSD 7.8. * doc/posix-functions/gmtime_r.texi: Mention that only OpenBSD 7.7 and earlier use GMT instead of UTC.
Collin Funk a0d10f43 2025-10-20T20:50:21 fenv-rounding tests: Avoid test failure on Android. * tests/test-fenv-round.c (test_towardzero, test_upward) (test_downward): Disable tests that are known to fail. * doc/posix-functions/fesetround.texi: Update list of platforms.
Bruno Haible 19141077 2025-10-20T21:13:39 glob: Add support for Android. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00054.html>. * m4/glob.m4 (gl_GLOB): On Android, skip a test that assumes that /bin/sh exists. Update cross-compilation guess. * tests/test-glob.c (main): On Android, skip a test that assumes that /bin/sh exists. * doc/posix-functions/glob.texi: Mention also Android.
Bruno Haible edaba33e 2025-10-15T15:16:59 glob: Fix test failure on Cygwin. * m4/glob.m4 (gl_GLOB): Add a second test case. * doc/posix-functions/glob.texi: Mention Cygwin.
Collin Funk f1a18f6f 2025-10-10T22:34:19 glob: Prevent a stack overflow with many slashes. * lib/glob.c (__glob): Strip trailing slashes before making the recursive call. * m4/glob.m4 (gl_GLOB): Check for the glibc bug. * doc/posix-functions/glob.texi: Mention the bug.
Collin Funk 3ac88aeb 2025-10-09T20:41:09 getline: Work around a glibc bug. * m4/getline.m4 (gl_FUNC_GETLINE): Check that the buffer is terminated with a NUL character when the first character read is EOF. Guess that the function does not work on glibc. * doc/posix-functions/getline.texi: Mention the bug.
Collin Funk c06522b1 2025-10-09T20:36:15 getdelim: Work around a glibc bug. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check that the buffer is terminated with a NUL character when the first character read is EOF. Guess that the function does not work on glibc. * doc/posix-functions/getdelim.texi: Mention the bug.
Bruno Haible d08b322e 2025-09-23T02:21:58 fchownat: Revert my earlier change today entirely. * doc/posix-functions/fchownat.texi: Revert last change.
Bruno Haible 4e944641 2025-09-22T13:44:06 fchownat: Fix test failure on OpenBSD and Cygwin 2.9 (regr. 2025-09-20). * doc/posix-functions/fchownat.texi: Document that the dereferencing bug also affects OpenBSD and Cygwin 2.9. * m4/chown.m4 (gl_FUNC_CHOWN_CTIME): New macro, extracted from gl_FUNC_CHOWN. (gl_FUNC_CHOWN): Invoke it. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Guess that a platform that has the chown ctime bug also has the fchownat AT_SYMLINK_NOFOLLOW bug. * modules/fchownat (Files): Add m4/chown.m4.
Bruno Haible eb2c639c 2025-09-21T20:59:20 chown, lchown: Fix regression on Cygwin 2.9.0 (regression today). * m4/chown.m4 (AC_FUNC_CHOWN): Restore the previous configure-time test on OpenBSD and Cygwin platforms. * doc/posix-functions/chown.texi: Update platforms list.
Paul Eggert 162ce0b7 2025-09-21T07:55:00 fchownat: fix security races and other bugs This fixes some unlikely security races, where our “no-op” chmod undid some other process’s chmod. Ironically this bug occurred on OpenBSD, our most paranoid target. This patch also fixes some EOVERFLOW bugs, along with a performance bug and a CHOWN_CHANGE_TIME_BUG with fchownat. * lib/chown.c, lib/fchownat.c, lib/lchown.c: Remove unnecessary inconsistencies. Include stat-time.h. (CHOWN_CHANGE_TIME_BUG, CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE) (CHOWN_MODIFIES_SYMLINK, CHOWN_TRAILING_SLASH_BUG): Default to 0, and prefer ‘if (...)’ to ‘#ifdef ...’. (utimensat) [!HAVE_UTIMENSAT]: Default to a no-op. (rpl_chown, rpl_fchownat, rpl_lchown): Prefer ‘if (...)’ to ‘#ifdef ...’. Statically, call the stat-like and chown-like functions just once. Do not fail if the stat-like function fails with EOVERFLOW, if existence is all we care about. Use utimensat to update ctime, instead of a chmod-like function. * lib/fchownat.c (rpl_fchownat): Defend against OpenBSD’s CHOWN_CHANGE_TIME_BUG. This bug in rpl_fchownat was exposed by yesterday’s fix that caused rpl_fchownat to call fchownat instead of using the tricky old fork/chdir business. * m4/chown.m4 (gl_FUNC_CHOWN): Check for utimensat if the ctime bug is present. * modules/chown, modules/lchown, modules/fchownat: (Depends-on): Add stat-time.
Collin Funk cfef893b 2025-09-20T22:45:29 sig2str: Port to Android API level 36. * m4/sig2str.m4 (gl_FUNC_SIG2STR): Use gl_CHECK_FUNCS_ANDROID to check for sig2str and str2sig instead of AC_CHECK_FUNCS. * doc/posix-functions/sig2str.texi: Document that the function is missing on Android API 35 and lower. * doc/posix-functions/str2sig.texi: Likewise.
Collin Funk c751b471 2025-09-20T22:41:16 qsort_r: Port to Android API level 36. * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use gl_CHECK_FUNCS_ANDROID to check for qsort_r instead of AC_CHECK_FUNCS_ONCE. * doc/glibc-functions/qsort_r.texi: Document that the function is missing on Android API 35 and lower.
Bruno Haible 8ebd5a9a 2025-09-20T15:49:50 nl_langinfo: Work around nl_langinfo multithread-safety bug on macOS 26. * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set NL_LANGINFO_MTSAFE to 0 on macOS. * lib/nl_langinfo.c (ITEMS): Define appropriately on macOS. * doc/posix-functions/nl_langinfo.texi: Document the macOS bug.
Bruno Haible 84d76cdd 2025-09-17T09:31:31 stdio-h: Work around [v][f]printf bugs in mingw with msvcrt. Reported by 松延 英樹 <maznobu@gmail.com> in <https://github.com/mlocati/gettext-iconv-windows/issues/52>. * lib/stdio.in.h (gl_consolesafe_fprintf, gl_consolesafe_printf, gl_consolesafe_vfprintf, gl_consolesafe_vprintf): New declarations. (fprintf): When msvcrt is in use, use gl_consolesafe_fprintf. (printf): When msvcrt is in use, use gl_consolesafe_printf. (vfprintf): When msvcrt is in use, use gl_consolesafe_vfprintf. (vprintf): When msvcrt is in use, use gl_consolesafe_vprintf. * lib/stdio-consolesafe.c: Include fseterr.h. (gl_consolesafe_fprintf, gl_consolesafe_printf, gl_consolesafe_vfprintf, gl_consolesafe_vprintf): New functions. * lib/stdio-write.c (vfprintf): When msvcrt is in use, use gl_consolesafe_vfprintf. * modules/stdio-h (Depends-on): Add fseterr. * doc/posix-functions/fprintf.texi: Document the mingw bug. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise.
Bruno Haible dc8590b1 2025-09-17T08:38:14 stdio-h: Work around fwrite bug in msvcrt. Reported by 松延 英樹 <maznobu@gmail.com> in <https://github.com/mlocati/gettext-iconv-windows/issues/52>. * lib/stdio.in.h (gl_consolesafe_fwrite): New declaration. (fwrite): When msvcrt is in use, use gl_consolesafe_fwrite. * lib/stdio-consolesafe.c: New file. * lib/stdio-write.c (fwrite): When msvcrt is in use, use gl_consolesafe_fwrite. * modules/stdio.h (Files): Add lib/stdio-consolesafe.c. (Depends-on): Add stdckdint-h. (configure.ac): Define condition GL_COND_OBJ_STDIO_CONSOLESAFE. (Makefile.am): Arrange to compile stdio-consolesafe.c. * doc/posix-functions/fwrite.texi: Document the workaround.
Bruno Haible 901563ae 2025-09-16T17:08:44 Document msvcrt (native Windows) bugs regarding console output. * doc/posix-functions/fputc.texi: Document a bug found in msvcrt. * doc/posix-functions/putc.texi: Likewise. * doc/posix-functions/fwrite.texi: Document another bug found in msvcrt.
Bruno Haible 51aa7ef1 2025-09-16T16:30:38 strtof: Work around mingw bug with overflow. * lib/strtod.c (STRTOD): Recognize overflow. * modules/strtof (Depends-on): Add isinf. * modules/strtod (Depends-on): Likewise. * modules/strtold (Depends-on): Likewise. * doc/posix-functions/strtof.texi: Update mingw version.
Bruno Haible 06b4b215 2025-09-10T23:22:50 doc: Remove support for IRIX. * doc/gnulib.texi (Header files): Update. * doc/posix-functions/sig2str.texi: Don't mention IRIX problem. * doc/posix-functions/str2sig.texi: Likewise. * doc/posix-functions/strerror.texi: Likewise. * doc/posix-headers/sys_stat.texi: Don't mention IRIX. * doc/posix-headers/sys_types.texi: Likewise.
Bruno Haible 9d429ac1 2025-08-19T19:29:03 doc: Update for glibc 2.42. * doc/glibc-functions/pthread_gettid_np.texi: New file. * doc/gnulib.texi (Glibc pthread.h): Include it. * doc/posix-headers/*.texi: Update. * doc/posix-functions/*.texi: Likewise.
Bruno Haible 99221b14 2025-08-19T09:23:26 doc: Update for glibc 2.41. * doc/glibc-functions/sched_getattr.texi: New file. * doc/glibc-functions/sched_setattr.texi: New file. * doc/gnulib.texi (Glibc sched.h): Include them. * doc/posix-functions/initstate.texi: Update. * doc/glibc-functions/initstate_r.texi: Likewise. * doc/posix-functions/compoundn*.texi: Likewise.
Bruno Haible b9c324e2 2025-08-19T08:49:22 doc: Mention some musl libc stubs. * doc/posix-functions/sched_getparam.texi: Mention musl libc stub. * doc/posix-functions/sched_setparam.texi: Likewise. * doc/posix-functions/sched_getscheduler.texi: Likewise. * doc/posix-functions/sched_setscheduler.texi: Likewise. * doc/posix-functions/posix_spawnattr_getschedparam.texi: Likewise. * doc/posix-functions/posix_spawnattr_setschedparam.texi: Likewise. * doc/posix-functions/posix_spawnattr_getschedpolicy.texi: Likewise. * doc/posix-functions/posix_spawnattr_setschedpolicy.texi: Likewise.
Paul Eggert 98704937 2025-08-02T10:21:36 Shorten glibc bug URLs
Paul Eggert 1f4148c1 2025-07-22T15:37:22 fsync, fdatasync: generalize fsync write access doc
Collin Funk 7075f237 2025-07-22T14:40:50 doc: Document that fsync doesn't work on directories on AIX 7.3. Reported by Lakshmi-Surekha <Lakshmi.Kovvuri@ibm.com> in: <https://github.com/tukaani-project/xz/issues/188>. * doc/posix-functions/fsync.texi: Document the behavior.
Collin Funk 17357997 2025-07-16T16:57:06 doc: Use @code around errno constants. * doc/posix-functions/mkfifoat.texi: Use @code for errno constants instead of @samp. * doc/posix-functions/mknodat.texi: Likewise. * doc/posix-functions/setenv.texi: Likewise. * doc/posix-functions/symlinkat.texi: Likewise. * doc/posix-functions/unsetenv.texi: Likewise. * doc/glibc-functions/sethostname.texi: Use @code around errno constants. * doc/posix-functions/chmod.texi: Likewise. * doc/posix-functions/posix_fallocate.texi: Likewise. * doc/posix-functions/ptsname_r.texi: Likewise.
Bruno Haible e8712cc1 2025-06-13T12:27:44 stat: Support the file name "/dev/null" on native Windows. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00119.html>. * lib/stat.c (rpl_stat): On native Windows, map "/dev/null" to "NUL". * tests/test-fstat.c (main): Test /dev/null also on native Windows. * tests/test-stat.h (test_stat_func): Likewise. * tests/test-lstat.h (test_lstat_func): Likewise. * doc/posix-functions/stat.texi: Mention problem of null device name. * doc/posix-functions/lstat.texi: Likewise.
Bruno Haible 2b918f2e 2025-06-13T00:02:57 stat: Document mingw bug. * doc/posix-functions/stat.texi: Mention the bug with NUL on mingw.
Bruno Haible f3b9112a 2025-06-11T14:43:04 fenv*: Fix compilation error with mingw 13. It's caused by an ABI change in mingw: <https://sourceforge.net/p/mingw-w64/mingw-w64/ci/5c5973cf5f021db8fd75e9667e63881ccd169320/>. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-04/msg00215.html>. * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): Update comments for mingw 13. * lib/fenv-private.h (exceptions_to_x86hardware, x86hardware_to_exceptions): On mingw >= 13, define these like on MSVC. * lib/fenv-round.c (fegetround, fesetround): Do the safe mapping also on mingw >= 13. * lib/fenv-except-state-set.c (fesetexceptflag): Do the exceptions_to_x86hardware conversion also on other platforms than MSVC. * lib/fenv-except-tracking-clear.c (feclearexcept): Likewise. * lib/fenv-except-tracking-set.c (fesetexcept): Likewise. * lib/fenv-except-trapping.c (feenableexcept, fedisableexcept, fegetexcept): Do the exceptions_to_x86hardware and x86hardware_to_exceptions conversions also on other platforms than MSVC. * lib/fenv-env.c (fegetenv, fesetenv): Add new implementation for mingw >= 13. * doc/posix-functions/fesetenv.texi: Mention the new mingw bug. * doc/posix-functions/feupdateenv.texi: Mention the new mingw bug.
Paul Eggert f6c13a00 2025-05-30T00:41:32 Document O_CREAT|O_DIRECTORY bugs with Linux <6.4
Bruno Haible e3b56580 2025-05-27T11:24:45 fcntl-h: Update platforms list re O_DIRECTORY. * doc/posix-headers/fcntl.texi: Update platforms list. * doc/posix-functions/open.texi: Likewise. * doc/posix-functions/openat.texi: Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Guess that O_DIRECTORY works for Mac OS X >= 10.5. Use prefix 'gl_', not 'ac_', for our variables.
Paul Eggert bc1bf2fc 2025-05-26T18:30:18 fcntl-h: support O_DIRECTORY It is relatively easy to support O_DIRECTORY on platforms that lack it, so let’s do that instead of having to work around bugs like <https://bugs.gnu.org/78509#95>. * lib/fcntl.in.h (O_DIRECTORY): Default to 0x20000000 not 0, since Gnulib now supports it. * lib/open.c, lib/openat.c (OPEN_TRAILING_SLASH_BUG): Default to false, so that this can be used outside #if. (open, openat): Add support for O_DIRECTORY on platforms that lack it. If fstat fails, fail instead of assuming the file is a directory, since failure can occur due to EOVERFLOW, etc. Rearrange code to minimize differences between open.c and openat.c. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Also test O_DIRECTORY, and define HAVE_WORKING_O_DIRECTORY if needed. Prefer AS_CASE for Emacs’s benefit. * m4/open.m4 (gl_FUNC_OPEN): * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_FCNTL_O_FLAGS and replace the function if O_DIRECTORY does not work. * tests/test-open.h: Test O_DIRECTORY.
Bruno Haible e9d8c4f4 2025-05-16T15:51:13 sigprocmask: Make multithread-safe on native Windows. * lib/sigprocmask.c: Include glthread/lock.h. (sig_lock): New variable. (blocked_set): Remove 'volatile'. (sigprocmask, _gl_raise_SIGPIPE): Use the sig_lock. * modules/sigprocmask (Depends-on): Add lock. * doc/posix-functions/sigprocmask.texi: Mention the async-safety issue.
Bruno Haible de082701 2025-05-12T12:43:59 doc: Update for a few recently fixed Hurd bugs. * doc/posix-functions/utimensat.texi: List the affected glibc versions. * doc/posix-functions/futimens.texi: Likewise. * doc/posix-functions/linkat.texi: Likewise. * doc/glibc-functions/renameat2.texi: Likewise.
Paul Eggert 9e054b0b 2025-05-08T00:48:56 Fix some ungrammatical uses of "allows to" This buys back some comment changes from Emacs, and fixes other instances I noticed.
Collin Funk c0c646e2 2025-05-02T20:33:56 doc: Update documentation for 'open' errno discrepancies. * doc/posix-functions/open.texi: Document that NetBSD 10.0 and FreeBSD 14.2 set errno differently than POSIX specifies for 'open ("symlink", O_NOFOLLOW ...)'.
Collin Funk 30c88729 2025-04-23T20:29:25 tsearch tests: Disable tfind signature check on Cygwin. * tests/test-tsearch.c [__CYGWIN__]: Skip the tfind signature check. * doc/posix-functions/tfind.texi: Mention the Cygwin signature.
Collin Funk b05d9ebb 2025-04-21T20:35:08 strsignal tests: Disable signature check on Haiku. * tests/test-strsignal.c [__HAIKU__]: Skip signature check. * doc/posix-functions/strsignal.texi: Document that strsignal returns 'const char *' instead of 'char *' on Haiku.
Bruno Haible 6861ecc3 2025-04-13T11:17:26 *printf: Document a Haiku bug. * doc/posix-functions/fwprintf.texi: Mention the missing ' flag support. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise.
Bruno Haible 0710282c 2025-04-12T11:03:45 vasnprintf: Work around two grouping bugs on native Windows. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): On native Windows, define NEED_PRINTF_FLAG_GROUPING. * lib/vasnprintf.c (localeconv): Undefine. (thousands_separator_char, thousands_separator_wchar): On native Windows, use localeconv(). * tests/test-vasnprintf-posix2.c (main): On native Windows, expect 3 digits for the exponent. * tests/test-vasnwprintf-posix2.c (main): Likewise. * doc/posix-functions/fprintf.texi: Mention the mingw and MSVC bugs. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/dprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/fwprintf.texi: Likewise. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise. * doc/posix-functions/asprintf.texi: Likewise. * doc/posix-functions/vasprintf.texi: Likewise. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise.
Bruno Haible f7a63a90 2025-04-12T00:09:23 vasnprintf: Work around two grouping bugs on many platforms. * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING_INT_PRECISION): New macro. (gl_PRINTF_FLAG_GROUPING_MULTIBYTE): New macro. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Require gl_PRINTF_FLAG_GROUPING_INT_PRECISION, gl_PRINTF_FLAG_GROUPING_MULTIBYTE. Test gl_cv_func_printf_flag_grouping_int_precision, gl_cv_func_printf_flag_grouping_multibyte. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_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. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): Require gl_PRINTF_FLAG_GROUPING_INT_PRECISION, gl_PRINTF_FLAG_GROUPING_MULTIBYTE. Test gl_cv_func_printf_flag_grouping_int_precision, gl_cv_func_printf_flag_grouping_multibyte. Define the C macro NEED_PRINTF_FLAG_GROUPING_INT. * lib/vasnprintf.c (thousands_separator_char): New function. (THOUSEP_CHAR_MAXLEN): New macro. (thousands_separator_wchar): New function. (THOUSEP_WCHAR_MAXLEN): New macro. (MAX_ROOM_NEEDED): Improve the room estimate for FLAG_GROUP. (VASNPRINTF): Add code for emitting thousands separators in the %f, %F, %g, %G implementations and in the code relies the system's sprintf/snprintf/swprintf function. Test NEED_PRINTF_FLAG_GROUPING and NEED_PRINTF_FLAG_GROUPING_INT where needed. * tests/test-vasnprintf-posix2.c (main): Add tests of the grouping flag. * tests/test-vasnwprintf-posix2.c (main): Likewise. * tests/test-vasnprintf-posix2.sh: Test in both French locales, not only in one of them. * tests/test-vasnwprintf-posix2.sh: Likewise. * modules/vasnprintf-posix-tests (Depends-on): Add localeconv. * modules/vasnwprintf-posix-tests (Depends-on): Likewise. * doc/posix-functions/fprintf.texi: Mention the grouping bug with precision on integers and the grouping bug with a multibyte thousands separator. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/dprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/fwprintf.texi: Likewise. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise. * doc/posix-functions/asprintf.texi: Likewise. * doc/posix-functions/vasprintf.texi: Likewise. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise.
Bruno Haible 9aa6e580 2025-03-24T14:52:12 getlocalename_l-unsafe: Work around Cygwin 3.6.0 bug. * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize REPLACE_GETLOCALENAME_L. * m4/getlocalename_l.m4 (gl_FUNC_GETLOCALENAME_L_UNSAFE): Test whether getlocalename_l works. Set REPLACE_GETLOCALENAME_L. * modules/locale-h (Makefile.am): Substitute REPLACE_GETLOCALENAME_L. * lib/locale.in.h (getlocalename_l): Consider REPLACE_GETLOCALENAME_L. * modules/getlocalename_l-simple (Depends-on, configure.ac): Likewise. * doc/posix-functions/getlocalename_l.texi: Mention two Cygwin bugs.
Bruno Haible 40b7c218 2025-03-22T13:03:43 setlocale-messages: Rename to setlocale-fixes and add Android support. * lib/setlocale-fixes.h: Renamed from lib/setlocale-messages.h. (setlocale_fixed, setlocale_fixed_null): New declarations. * lib/setlocale-fixes.c: Renamed from lib/setlocale-messages.h. (lc_cat_name): New variable. (cat_to_index, index_to_cat): New macro. (lc_all_name): New variable. (cat_names): New constant. (fill_lc_all_name, extract_single_name, setlocale_fixed, setlocale_fixed_null): New functions. * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set NEED_SETLOCALE_IMPROVED to 1 on Android. * lib/setlocale.c: Include setlocale-fixes.h instead of setlocale-messages.h. (setlocale_unixlike) [__ANDROID__]: Use setlocale_fixed instead of setlocale_mtsafe. (setlocale_improved): On Android, use setlocale_fixed_null instead of setlocale. * lib/getlocalename_l-unsafe.c: Include setlocale-fixes.h instead of setlocale-messages.h. (getlocalename_l_unsafe): On Android, use setlocale_fixed_null instead of setlocale_null. * modules/setlocale-fixes: Renamed from modules/setlocale-messages. (Files): Update. (configure.ac): Compile the .c file also on Android. (Include): Include setlocale-fixes.h instead of setlocale-messages.h. * modules/setlocale (Depends-on): Add setlocale-fixes. Remove setlocale-messages. * modules/getlocalename_l-unsafe (Depends-on): Likewise. * doc/posix-functions/setlocale.texi: Mention the Android problem.
Bruno Haible 83df81ce 2025-03-19T15:35:13 getlogin, getlogin_r: Fix typo in documentation. Reported by Eric Blake in <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00071.html>. * doc/posix-functions/getlogin.texi: Fix typo. * doc/posix-functions/getlogin_r.texi: Likewise.
Collin Funk 23a3940f 2025-03-18T21:50:00 futimens: Work around a GNU/Hurd bug. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Check if futimens validates the tv_nsec values of the timespec argument. Set bits in a return value instead of exiting early. * doc/posix-functions/futimens.texi (futimens): Mention the GNU/Hurd bug. Mention the same bug occurs on NetBSD 10.
Collin Funk 381815da 2025-03-17T21:16:22 utimensat: Work around a GNU/Hurd bug. * lib/utimensat.c (rpl_utimensat) [__gnu_hurd__]: Check for out of range tv_nsec values. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise. Guess that utimensat doesn't work on GNU/Hurd. * doc/posix-functions/utimensat.texi: Mention the bug.
Collin Funk ed91d9b1 2025-03-12T18:55:26 dup3: Fix behavior for equal file descriptors on Haiku. * lib/dup3.c (dup3) [__HAIKU__]: Set errno to EINVAL and return -1 if both file descriptors are equal. * doc/posix-functions/dup3.texi: Document the Haiku bug.
Bruno Haible 69cbf3e2 2025-03-10T06:23:06 getlogin, getlogin_r: Document limitation. Reported by Nicolas Boos <nicolas.boos@wanadoo.fr> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00033.html>. * doc/posix-functions/getlogin.texi: Mention the "different user names with same uid" limitation. * doc/posix-functions/getlogin_r.texi: Likewise.
Bruno Haible 0bca5720 2025-03-09T10:19:20 getlogin_r: Work around musl bug. * lib/getlogin_r.c (getlogin_r): Add implementation for Linux. * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r has the musl bug. * tests/test-getlogin_r.c (main): Add another test. * doc/posix-functions/getlogin_r.texi: Mention the workaround.
Bruno Haible 90840606 2025-03-09T10:16:58 getlogin: Work around musl bug. * lib/unistd.in.h (getlogin): Consider REPLACE_GETLOGIN. * lib/getlogin.c: Change license header to GPL. (getlogin): Add implementation for Linux. * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Test whether getlogin works. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN. * modules/unistd-h (Makefile.am): Substitute REPLACE_GETLOGIN. * modules/getlogin (Depends-on): Add readutmp. (configure.ac): Consider REPLACE_GETLOGIN. (License): Change to GPL. * tests/test-getlogin.c (main): Add another test. * doc/posix-functions/getlogin.texi: Mention the workaround.
Paul Eggert 2a60c939 2025-03-08T15:36:33 getlogin: document musl bug Problem reported by Nicolas Boos <https://bugs.gnu.org/76876>.
Bruno Haible 6e6eb216 2025-02-21T19:26:23 langinfo-h, nl_langinfo: Support abbreviated alternative month names. * lib/langinfo.in.h (ABALTMON_1...ABALTMON_12): New macros. * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ABALTMON. * modules/langinfo-h (Makefile.am): Substitute HAVE_LANGINFO_ABALTMON. * tests/test-langinfo-h.c (items): Add ABALTMON_1 to ABALTMON_12. * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ABALTMON_i like ABMON_i. * tests/test-nl_langinfo.c (main): Test ABALTMON_*. * doc/posix-headers/langinfo.texi: Document support of ABALTMON_*. * doc/posix-functions/nl_langinfo.texi: Likewise.
Bruno Haible 706178a9 2025-02-21T11:25:51 getlocalename_l-simple: New module. * lib/locale.in.h (newlocale, duplocale, freelocale): Now enabled by module 'getlocalename_l-simple'. (getlocalename_l): New declaration. * lib/getlocalename_l.c: New file, based on lib/localename-unsafe.c, with modifications for glibc systems, NetBSD, OpenBSD, Android. * lib/localename-table.h (LCMIN): New macro. * lib/struniq.h: Update a comment. * lib/localename-unsafe.c: Don't define the LOCALENAME_ENHANCE_LOCALE_FUNCS overrides here. Moved to lib/getlocalename_l.c. (gl_locale_name_thread_unsafe): Invoke getlocalename_l. Previous code moved to lib/getlocalename_l.c. * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Improve support for OpenBSD: Set gt_nameless_locales to yes and gt_localename_enhances_locale_funcs to yes also when $gt_fake_locales is yes. * m4/getlocalename_l.m4: New file, based on m4/localename.m4. * m4/localename.m4 (gl_LOCALENAME_UNSAFE, gl_LOCALENAME_UNSAFE_LIMITED): Remove code that was moved to m4/getlocalename_l.m4. * m4/locale_h.m4 (gl_LOCALE_H): Test whether getlocalename_l is declared. (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETLOCALENAME_L. (gl_LOCALE_H_DEFAULTS): Initialize HAVE_GETLOCALENAME_L. * modules/locale-h (Makefile.am): Substitute GNULIB_GETLOCALENAME_L, HAVE_GETLOCALENAME_L. * modules/getlocalename_l-simple: New file. * modules/localename-unsafe (Files): Remove lib/localename-table.h, lib/localename-table.c, lib/struniq.h. (Depends-on): Add getlocalename_l-simple. Remove bool, flexmember, free-posix, langinfo-h, thread-optim. (Makefile.am): Don't compile localename-table.c. * modules/localename-unsafe-limited (Depends-on): Add getlocalename_l-simple. * modules/newlocale (Link): New section. * modules/duplocale (Link): Link with $(GETLOCALENAME_L_LIB). * modules/freelocale (Link): New section. * modules/newlocale-tests (Makefile.am): Link the test program with $(GETLOCALENAME_L_LIB). * modules/duplocale-tests (Makefile.am): Likewise. * modules/freelocale-tests (Makefile.am): Likewise. * modules/is*_l-tests (Makefile.am): Likewise. * modules/tolower_l-tests (Makefile.am): Likewise. * modules/toupper_l-tests (Makefile.am): Likewise. * modules/strcasecmp_l-tests (Makefile.am): Likewise. * modules/strncasecmp_l-tests (Makefile.am): Likewise. * modules/strerror_l-tests (Makefile.am): Likewise. * doc/posix-functions/getlocalename_l.texi: Mention the new module.
Bruno Haible 7f279c82 2025-02-18T12:20:41 strerror_l: New module. * lib/string.in.h: Include <locale.h>. (strerror_l, strerror_l_r): New declarations. * lib/strerror_l.c: New file. * m4/strerror_l.m4: New file. * m4/string_h.m4 (gl_STRING_H): Test for strerror_l. (gl_STRING_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRERROR_L. (gl_STRING_H_DEFAULTS): Initialize HAVE_STRERROR_L, REPLACE_STRERROR_L. * modules/string-h (Makefile.am): Substitute GNULIB_STRERROR_L, HAVE_STRERROR_L, REPLACE_STRERROR_L. * modules/strerror_l: New file. * tests/test-string-h-c++.cc: Check declaration of strerror_l. * doc/posix-functions/strerror_l.texi: Mention the new module.
Bruno Haible b2bf05b1 2025-02-16T22:32:33 strncasecmp_l: New module. * lib/strings.in.h (strncasecmp_l): New declaration. * lib/strncasecmp_l.c: New file, based on lib/strncasecmp.c. * m4/strncasecmp_l.m4: New file. * m4/strings_h.m4 (gl_STRINGS_H): Test for strncasecmp_l. (gl_STRINGS_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRNCASECMP_L. (gl_STRINGS_H_DEFAULTS): Initialize HAVE_STRNCASECMP_L, REPLACE_STRNCASECMP_L. * modules/strings-h (Makefile.am): Substitute GNULIB_STRNCASECMP_L, HAVE_STRNCASECMP_L, REPLACE_STRNCASECMP_L. * modules/strncasecmp_l: New file. * tests/test-strings-h-c++.cc: Check declaration of strncasecmp_l. * doc/posix-functions/strncasecmp_l.texi: Mention the new module and the macOS, Solaris, Cygwin bugs.
Bruno Haible 6fafa36c 2025-02-16T22:32:02 strcasecmp_l: New module. * lib/strings.in.h: Include <locale.h>. (strcasecmp_l): New declaration. * lib/strcasecmp_l.c: New file, based on lib/strcasecmp.c. * m4/strcasecmp_l.m4: New file. * m4/strings_h.m4 (gl_STRINGS_H): Test for strcasecmp_l. (gl_STRINGS_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRCASECMP_L. (gl_STRINGS_H_DEFAULTS): Initialize HAVE_STRCASECMP_L, REPLACE_STRCASECMP_L. * modules/strings-h (Makefile.am): Substitute GNULIB_STRCASECMP_L, HAVE_STRCASECMP_L, REPLACE_STRCASECMP_L. * modules/strcasecmp_l: New file. * tests/test-strings-h-c++.cc: Check declaration of strcasecmp_l. * doc/posix-functions/strcasecmp_l.texi: Mention the new module and the macOS, Solaris, Cygwin bugs.
Bruno Haible 557f0e49 2025-02-16T18:22:31 strncasecmp: Work around Solaris, Cygwin bug. * lib/strings.in.h (strncasecmp): Consider REPLACE_STRNCASECMP. Use the usual idioms. * m4/strings_h.m4 (gl_STRINGS_H_DEFAULTS): Initialize HAVE_STRNCASECMP, REPLACE_STRNCASECMP. * m4/strncasecmp.m4 (gl_FUNC_STRNCASECMP): Invoke gl_STRNCASECMP_WORKS. Set REPLACE_STRNCASECMP. Assume that HAVE_STRNCASECMP is initialized. * modules/strncasecmp (Files): Add m4/strcasecmp.m4. (configure.ac): Consider REPLACE_STRNCASECMP. * modules/strings-h (Makefile.am): Substitute HAVE_STRNCASECMP, REPLACE_STRNCASECMP. * doc/posix-functions/strncasecmp.texi: Mention the Solaris, Cygwin bug.
Bruno Haible 9980b9e5 2025-02-16T17:59:48 strcasecmp: Work around Solaris, Cygwin bug. * lib/strings.in.h (strcasecmp): Consider REPLACE_STRCASECMP. Use the usual idioms. * m4/strings_h.m4 (gl_STRINGS_H_DEFAULTS): Initialize REPLACE_STRCASECMP. * m4/strcasecmp.m4 (gl_STRCASECMP_WORKS): New macro. (gl_FUNC_STRCASECMP): Invoke it. Set REPLACE_STRCASECMP. * modules/strcasecmp (configure.ac): Consider REPLACE_STRCASECMP. * modules/strings-h (Makefile.am): Substitute REPLACE_STRCASECMP. * doc/posix-functions/strcasecmp.texi: Mention the Solaris, Cygwin bug.
Bruno Haible b2927d1b 2025-02-16T12:21:53 strcasecmp, strncasecmp: New modules. * modules/strcasecmp: New file. * modules/strncasecmp: New file. * modules/strcase: Merely depend on strcasecmp, strncasecmp. * m4/strcasecmp.m4: New file, based on m4/strcase.m4. * m4/strncasecmp.m4: New file, based on m4/strcase.m4. * m4/strcase.m4: Remove file. * lib/strings.in.h (strcasecmp, strncasecmp): Fix typo in warning message. * lib/strcasecmp.c: Improve comment. * lib/strncasecmp.c: Likewise. * doc/posix-functions/strcasecmp.texi: Mention module strcasecmp, not module strcase. * doc/posix-functions/strncasecmp.texi: Mention module strncasecmp, not module strcase. * doc/strings.texi (Comparison of string APIs): Reference modules strcasecmp, strncasecmp. * modules/argp (Depends-on): Add strcasecmp. Remove strcase. * modules/strcasestr-simple (Depends-on): Add strncasecmp. Remove strcase. * modules/strptime (Depends-on): Likewise.
Bruno Haible 6f828018 2025-02-16T06:55:52 toupper_l: New module. * lib/ctype.in.h: (toupper_l): New declaration. * lib/toupper_l.c: New file. * m4/toupper_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for toupper_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOUPPER_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_TOUPPER_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_TOUPPER_L, HAVE_TOUPPER_L. * modules/toupper_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of toupper_l. * doc/posix-functions/toupper_l.texi: Mention the new module.
Bruno Haible 0a0d7cdf 2025-02-16T06:45:57 tolower_l: New module. * lib/ctype.in.h: (tolower_l): New declaration. * lib/tolower_l.c: New file. * lib/to_l-impl.h: New file. * m4/tolower_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for tolower_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOLOWER_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_TOLOWER_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_TOLOWER_L, HAVE_TOLOWER_L. * modules/tolower_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of tolower_l. * doc/posix-functions/tolower_l.texi: Mention the new module.
Bruno Haible 38c2e4c1 2025-02-15T21:56:15 isxdigit_l: New module. * lib/ctype.in.h: (isxdigit_l): New declaration. * lib/isxdigit_l.c: New file. * m4/isxdigit_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isxdigit_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISXDIGIT_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISXDIGIT_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISXDIGIT_L, HAVE_ISXDIGIT_L. * modules/isxdigit_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isxdigit_l. * doc/posix-functions/isxdigit_l.texi: Mention the new module.
Bruno Haible d8e0b253 2025-02-15T21:50:08 isupper_l: New module. * lib/ctype.in.h: (isupper_l): New declaration. * lib/isupper_l.c: New file. * m4/isupper_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isupper_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISUPPER_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISUPPER_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISUPPER_L, HAVE_ISUPPER_L. * modules/isupper_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isupper_l. * doc/posix-functions/isupper_l.texi: Mention the new module.
Bruno Haible d9249901 2025-02-15T21:35:14 isspace_l: New module. * lib/ctype.in.h: (isspace_l): New declaration. * lib/isspace_l.c: New file. * m4/isspace_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isspace_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISSPACE_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISSPACE_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISSPACE_L, HAVE_ISSPACE_L. * modules/isspace_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isspace_l. * doc/posix-functions/isspace_l.texi: Mention the new module.
Bruno Haible 5a811892 2025-02-15T20:42:59 ispunct_l: New module. * lib/ctype.in.h: (ispunct_l): New declaration. * lib/ispunct_l.c: New file. * m4/ispunct_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for ispunct_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISPUNCT_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISPUNCT_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISPUNCT_L, HAVE_ISPUNCT_L. * modules/ispunct_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of ispunct_l. * doc/posix-functions/ispunct_l.texi: Mention the new module.
Bruno Haible 90111228 2025-02-15T20:10:53 isprint_l: New module. * lib/ctype.in.h: (isprint_l): New declaration. * lib/isprint_l.c: New file. * m4/isprint_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isprint_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISPRINT_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISPRINT_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISPRINT_L, HAVE_ISPRINT_L. * modules/isprint_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isprint_l. * doc/posix-functions/isprint_l.texi: Mention the new module.
Bruno Haible 7f2b1b71 2025-02-15T20:01:04 islower_l: New module. * lib/ctype.in.h: (islower_l): New declaration. * lib/islower_l.c: New file. * m4/islower_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for islower_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISLOWER_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISLOWER_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISLOWER_L, HAVE_ISLOWER_L. * modules/islower_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of islower_l. * doc/posix-functions/islower_l.texi: Mention the new module.
Bruno Haible ef401330 2025-02-15T19:49:54 isgraph_l: New module. * lib/ctype.in.h: (isgraph_l): New declaration. * lib/isgraph_l.c: New file. * m4/isgraph_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isgraph_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISGRAPH_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISGRAPH_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISGRAPH_L, HAVE_ISGRAPH_L. * modules/isgraph_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isgraph_l. * doc/posix-functions/isgraph_l.texi: Mention the new module.
Bruno Haible 4204b429 2025-02-15T19:25:49 isdigit_l: New module. * lib/ctype.in.h: (isdigit_l): New declaration. * lib/isdigit_l.c: New file. * m4/isdigit_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isdigit_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISDIGIT_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISDIGIT_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISDIGIT_L, HAVE_ISDIGIT_L. * modules/isdigit_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isdigit_l. * doc/posix-functions/isdigit_l.texi: Mention the new module.
Bruno Haible be7df9ec 2025-02-15T10:58:23 iscntrl_l: New module. * lib/ctype.in.h: (iscntrl_l): New declaration. * lib/iscntrl_l.c: New file. * m4/iscntrl_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for iscntrl_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISCNTRL_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISCNTRL_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISCNTRL_L, HAVE_ISCNTRL_L. * modules/iscntrl_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of iscntrl_l. * doc/posix-functions/iscntrl_l.texi: Mention the new module.
Bruno Haible 663152f1 2025-02-15T10:45:48 isblank_l: New module. * lib/ctype.in.h: (isblank_l): New declaration. * lib/isblank_l.c: New file. * m4/isblank_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isblank_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISBLANK_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISBLANK_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISBLANK_L, HAVE_ISBLANK_L. * modules/isblank_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isblank_l. * doc/posix-functions/isblank_l.texi: Mention the new module.
Bruno Haible c7be9c20 2025-02-15T10:31:25 isalpha_l: New module. * lib/ctype.in.h: (isalpha_l): New declaration. * lib/isalpha_l.c: New file. * m4/isalpha_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isalpha_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISALPHA_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISALPHA_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISALPHA_L, HAVE_ISALPHA_L. * modules/isalpha_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isalpha_l. * doc/posix-functions/isalpha_l.texi: Mention the new module.
Bruno Haible f7cb31ac 2025-02-14T23:59:09 isalnum_l: Fix errors in C++ mode. * lib/ctype.in.h (isalnum_l): Disable _GL_CXXALIASWARN invocation on non-glibc systems. * tests/test-ctype-h-c++.cc (isalnum_l): Fix typo. * doc/posix-functions/isalnum_l.texi: Correct platforms list.
Bruno Haible eb6c3786 2025-02-14T06:17:24 isalnum_l: New module. * lib/ctype.in.h: Include <locale.h>. (isalnum_l): New declaration. * lib/isalnum_l.c: New file. * lib/is_l-impl.h: New file. * m4/isalnum_l.m4: New file. * m4/ctype_h.m4 (gl_CTYPE_H): Test for isalnum_l. (gl_CTYPE_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISALNUM_L. (gl_CTYPE_H_DEFAULTS): Initialize HAVE_ISALNUM_L. * modules/ctype-h (Makefile.am): Substitute GNULIB_ISALNUM_L, HAVE_ISALNUM_L. * modules/isalnum_l: New file. * tests/test-ctype-h-c++.cc: Check declaration of isalnum_l. * doc/posix-functions/isalnum_l.texi: Mention the new module.
Bruno Haible cdab5862 2025-02-14T09:42:18 freelocale: Allow non-POSIX prototype on macOS. * tests/test-freelocale.c: Skip the signature check on macOS. * doc/posix-functions/freelocale.texi: Mention the macOS problem.
Bruno Haible 49564bc5 2025-02-14T15:42:22 newlocale: Work around NetBSD bug. * lib/newlocale.c (newlocale) [NetBSD]: Test whether the locale name is valid; fail with error ENOENT if not. * doc/posix-functions/newlocale.texi: Mention the NetBSD bug.
Bruno Haible bc2d70ee 2025-02-14T15:24:54 newlocale: Work around macOS, NetBSD, Solaris 11 OpenIndiana bug. * m4/newlocale.m4 (gl_FUNC_NEWLOCALE): Test for the "null base" bug. Set REPLACE_NEWLOCALE to 1 if it has the bug. * lib/newlocale.c (newlocale): Add alternative implementation that uses the system's newlocale(). * modules/newlocale (configure.ac): Consider REPLACE_NEWLOCALE. * tests/test-newlocale.c: Include <langinfo.h>. (main): Verify fix for the "null base" bug. * modules/newlocale-tests (configure.ac): Test for nl_langinfo_l. * doc/posix-functions/newlocale.texi: Mention the "null base" bug.
Bruno Haible a5ce928d 2025-02-14T05:56:55 duplocale: Support all platforms. * lib/locale.in.h (duplocale): Declare also on platforms that don't already have a duplocale function. Don't define HAVE_WORKING_DUPLOCALE. * lib/duplocale.c: Include <stdlib.h>. (duplocale): Renamed from rpl_duplocale. Add implementation for platforms without native locale_t. * modules/duplocale (Depends-on): Add newlocale, freelocale. (configure.ac): Compile also on platforms without native locale_t. * tests/test-duplocale.c: Ignore HAVE_WORKING_DUPLOCALE. * tests/test-locale-h-c++.cc: Likewise. * doc/posix-functions/duplocale.texi: Mention the change.
Bruno Haible 414c6c84 2025-02-14T02:59:02 freelocale: New module. * lib/locale.in.h (freelocale): Consider GNULIB_FREELOCALE. Declare if not declared. * lib/freelocale.c: New file. * m4/freelocale.m4: New file. * m4/locale_h.m4 (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize GNULIB_FREELOCALE. * modules/locale-h (Makefile.am): Substitute GNULIB_FREELOCALE. * modules/freelocale: New file. * tests/test-locale-h-c++.cc: Check declaration of freelocale. * doc/posix-functions/freelocale.texi: Mention the new module.
Bruno Haible f6af6db6 2025-02-13T23:01:52 newlocale: New module. * lib/locale.in.h (newlocale): Consider GNULIB_NEWLOCALE. Declare if not declared. Don't define HAVE_WORKING_NEWLOCALE. * lib/newlocale.c: New file. * m4/newlocale.m4: New file. * m4/locale_h.m4 (gl_LOCALE_H_REQUIRE_DEFAULTS): Initialize GNULIB_NEWLOCALE. * modules/locale-h (Makefile.am): Substitute GNULIB_NEWLOCALE. * modules/newlocale: New file. * tests/test-locale-h-c++.cc: Check declaration of newlocale. * tests/test-localename.c: Ignore HAVE_WORKING_NEWLOCALE. * doc/posix-functions/newlocale.texi: Mention the new module.
Bruno Haible 3906ba18 2025-02-12T23:34:39 getaddrinfo: Support the AI_NUMERICSERV flag. * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require AC_CANONICAL_HOST. Test whether getaddrinfo supports AI_NUMERICSERV. * lib/getaddrinfo.c (getaddrinfo): Accept and implement the AI_NUMERICSERV flag. * tests/test-getaddrinfo.c (simple): In pass 4, pass the AI_NUMERICSERV flag. (main): Test numeric services in pass 1. Add pass 4. * doc/posix-functions/getaddrinfo.texi: Mention the native Windows bug.
KO Myung-Hun 39ed3d9c 2025-02-10T20:35:00 popen: Set gl_cv_func_popen_works to "guessing no" on OS/2. * doc/posix-functions/popen.texi: List OS/2 kLIBC case. * m4/popen.m4 (gl_FUNC_POPEN): Set gl_cv_func_popen_works to "guessing no" on OS/2. Copyright-paperwork-exempt: Yes
Collin Funk d4fa8756 2025-02-08T17:40:48 doc: Document free_aligned_sized and free_sized added in C23. * doc/posix-functions/free_aligned_sized.texi: New file. * doc/posix-functions/free_sized.texi: New file. * doc/gnulib.texi (Functions in <stdlib.h>): Include them.
Paul Eggert a70e47e5 2025-02-08T14:58:51 memalignment: document * doc/gnulib-readme.texi (Other portability assumptions): Mention the C23 function memalignment. * doc/posix-functions/memalignment.texi: New file. * doc/gnulib.texi (Functions in <stdlib.h>): Include it.
Paul Eggert fbaddca3 2025-02-08T14:31:04 doc: some updates for glibc 2.41
Collin Funk f52b2a3d 2025-01-24T21:36:11 ptsname_r: Work around ptsname_r bug on Solaris 11 OmniOS. * lib/ptsname_r.c (ptsname_r): Ensure the resulting buffer is not clobbered if it is too small on Solaris 11 OmniOS. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): On Solaris 11 OmniOS, arrange to override ptsname_r. * doc/posix-functions/ptsname_r.texi: Document the bug.
Bruno Haible 974b4446 2025-01-24T20:06:06 tests: Fix a few compilation errors on Solaris 11 OmniOS with gcc 14. * tests/test-accept.c: Omit the signature check on Solaris. * tests/test-gethostname.c: Likewise. * tests/test-getpeername.c: Likewise. * tests/test-getsockname.c: Likewise. * tests/test-getsockopt.c: Likewise. * tests/test-recvfrom.c: Likewise. * doc/posix-functions/accept.texi: Mention the Solaris 11 OmniOS problem. * doc/posix-functions/gethostname.texi: Likewise. * doc/posix-functions/getpeername.texi: Likewise. * doc/posix-functions/getsockname.texi: Likewise. * doc/posix-functions/getsockopt.texi: Likewise. * doc/posix-functions/recvfrom.texi: Likewise.
Collin Funk 82c416d7 2025-01-18T18:00:55 linkat tests: Revert the last change. * tests/test-linkat.c (main): Disallow EINVAL an alternative error value. * doc/posix-functions/linkat.texi: Document the GNU/Hurd bug.
Paul Eggert 5a2d28df 2025-01-13T10:17:21 fts, savedir: avoid glibc 2.2 readdir ENOENT bug This is mostly to document the bug. If these old platforms were still common I suppose we should change the readdir module to work around it. However, I’m not sure it’s worth the hassle at this point. * doc/posix-functions/readdir.texi, doc/posix-functions/readdir_r.texi: Document the bug. * lib/fts.c (fts_build): * lib/savedir.c (streamsavedir): Work around it.
Paul Eggert 66080623 2025-01-10T10:34:58 doc: document some file system portability issues * doc/glibc-functions/flistxattr.texi: * doc/glibc-functions/listxattr.texi: * doc/glibc-functions/llistxattr.texi: * doc/posix-functions/fchdir.texi, doc/posix-functions/fstat.texi: * doc/posix-functions/fstatvfs.texi: Document some portability gotchas that Gnulib does not work around.
Bruno Haible 53cf0bab 2025-01-08T22:39:36 pselect: Document this module. * doc/posix-functions/pselect.texi: Document module 'pselect'.
Collin Funk 71fbdb50 2025-01-06T13:56:40 servent tests: Fix failure on 32-bit native Windows. * tests/test-servent.c (getservbyname, getservbyport) [_WIN64 && !__CYGWIN__]: Disable signature check. * doc/posix-functions/getservbyname.texi: Document the incompatible __stdcall function signature. * doc/posix-functions/getservbyport.texi: Likewise.
Paul Eggert b1715e52 2025-01-05T17:45:41 utimensat: mention Linux kernel bug with CIFS * doc/posix-functions/utimensat.texi (utimensat): Mention Linux kernel bug reported by Bruno Haible in: https://lists.gnu.org/r/bug-tar/2024-12/msg00004.html
Bruno Haible 4b3bf87e 2025-01-06T01:16:11 sigsegv tests: Work around a longjmp bug on GNU/Hurd. * tests/test-sigsegv-catch-stackoverflow1.c (_FORTIFY_SOURCE, __USE_FORTIFY_LEVEL): Undefine, as a workaround to the Hurd longjmp bug. * tests/test-sigsegv-catch-stackoverflow2.c (_FORTIFY_SOURCE, __USE_FORTIFY_LEVEL): Likewise. * doc/posix-functions/longjmp.texi: Document the Hurd bug.
Bruno Haible c828e762 2024-12-29T23:06:06 qsort_r: Update documentation. * modules/qsort_r (Description): Say "POSIX signature". * doc/posix-functions/qsort_r.texi: Mention the qsort_r module.
Bruno Haible 83ebf44f 2024-12-29T21:15:16 sig2str: Document a portability problem. * doc/posix-functions/sig2str.texi: Document IRIX problem. * doc/posix-functions/str2sig.texi: Likewise.
Collin Funk 1d1888d0 2024-12-28T18:11:03 doc: Add missing module index. Suggested by Bruno Haible in: <https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00240.html>. * doc/posix-functions/getservbyname.texi (getservbyname): Add module index. * doc/posix-functions/getservbyport.texi (getservbyport): Likewise.
Collin Funk 4beb431a 2024-12-28T17:26:28 doc: Fix the previous commit. Suggested by Bruno Haible in: <https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00236.html>. * doc/posix-functions/getservbyname.texi: Mention the Windows declaration under "Portability problems fixed by Gnulib". * doc/posix-functions/getservbyport.texi: Likewise.
Collin Funk 2d1c0b2f 2024-12-28T16:19:01 doc: Mention the servent module. * doc/posix-functions/getservbyname.texi: Document that the servent module will provide the declarations in netdb.h. * doc/posix-functions/getservbyport.texi: Likewise.