doc


Log

Author Commit Date CI Message
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 a9a1a8cd 2025-09-16T21:35:12 inttypes-h tests: Avoid compilation error on mingw. Reported by Michele Locati in <https://lists.gnu.org/archive/html/bug-gettext/2024-09/msg00015.html>. * tests/test-inttypes-h.c (l): On mingw without __USE_MINGW_ANSI_STDIO, don't test for the presence of SCN*8, SCN*LEAST8, SCN*FAST8}. * doc/posix-headers/inttypes.texi: Mention the mingw bug.
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.
Karl Berry e3777b8b 2025-09-15T08:34:43 autoupdate
Karl Berry cfd950f4 2025-09-14T08:06:52 autoupdate
Karl Berry b4855f4a 2025-09-13T09:02:51 autoupdate
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 552641c5 2025-09-10T22:52:31 acl-permissions, file-has-acl: Remove support for IRIX. * lib/acl-internal.h (MODE_INSIDE_ACL): Remove code for IRIX. * lib/acl-internal.c (acl_access_nontrivial): Likewise. * lib/acl_entries.c (acl_entries): Likewise. * lib/file-has-acl.c: Update comments. * lib/get-permissions.c: Likewise. * lib/set-permissions.c: Likewise. * m4/acl.m4 (gl_FUNC_ACL): Likewise. * doc/acl-resources.txt: Remove info about IRIX.
Paul Eggert 2b2bcdbc 2025-09-09T09:44:55 gettext-h: support overriding "gnulib" This is for GNU Diffutils, which is still using the old way of also translating Gnulib’s msgids. * lib/gettext.h (GNULIB_TEXT_DOMAIN): New macro. * lib/argmatch.c, lib/bitset/stats.c, lib/c-stack.c: * lib/clean-temp-simple.c, lib/clean-temp-simple.c, lib/clean-temp.c: * lib/closein.c, lib/closeout.c, lib/copy-acl.c, lib/copy-file.c: * lib/csharpcomp.c, lib/csharpexec.c, lib/cygpath.c, lib/dfa.c: * lib/error.c, lib/execute.c, lib/gai_strerror.c, lib/getaddrinfo.c: * lib/getopt.c, lib/javacomp.c, lib/javaexec.c, lib/javaversion.c: * lib/mkdir-p.c, lib/obstack.c, lib/openat-die.c, lib/os2-spawn.c: * lib/pagealign_alloc.c, lib/parse-datetime.y, lib/pipe-filter-gi.c: * lib/pipe-filter-ii.c, lib/quotearg.c, lib/rpmatch.c, lib/set-acl.c: * lib/sigpipe-die.c, lib/spawn-pipe.c, lib/strsignal.c, lib/timevar.c: * lib/unicodeio.c, lib/userspec.c, lib/vc-mtime.c, lib/version-etc.c: * lib/wait-process.c, lib/windows-cygpath.c, lib/xalloc-die.c: * lib/xbinary-io.c, lib/xfreopen.c, lib/xmemcoll.c, lib/xprintf.c: * lib/xsetenv.c, lib/xstdopen.c, lib/xstrerror.c, lib/xstrtol-error.c: (_): Use GNULIB_TEXT_DOMAIN instead of "gnulib" when calling dgettext. * lib/argmatch.h (ARGMATCH_DEFINE_GROUP): * lib/file-type.c (file_type): * lib/regex_internal.h (gettext) [HAVE_LIBINTL_H & ENABLE_NLS & !_LIBC]: * lib/xstrtol-error.c (xstrtol_error): Likewise.
Bruno Haible e107905f 2025-09-09T12:37:35 acl-permissions, file-has-acl: Remove support for OSF/1. * m4/acl.m4 (gl_FUNC_ACL): Don't test for libpacl. * lib/acl-internal.h (rpl_acl_get_fd, rpl_acl_set_fd): Remove functions. * lib/acl-internal.c (acl_access_nontrivial): Remove code for OSF/1. * lib/acl_entries.c (acl_entries): Likewise. * lib/file-has-acl.c (fdfile_has_aclinfo): Likewise. * lib/set-permissions.c (acl_from_mode): Likewise. * doc/acl-resources.txt: Remove info about OSF/1.
Paul Eggert 81d14735 2025-09-04T13:42:23 extern-inline: mention likely C2y change
Bruno Haible 6fd6098f 2025-09-04T00:15:19 gnulib-tool: In tests directories, augment AM_CFLAGS and AM_CXXFLAGS. Reported by Pádraig Brady in <https://lists.gnu.org/archive/html/bug-gnulib/2025-09/>. * gnulib-tool.sh (func_emit_tests_Makefile_am): Append the warning-protection options to AM_CFLAGS and AM_CXXFLAGS, in addition to initializing CFLAGS and CXXFLAGS. * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Likewise. * doc/gnulib-tool.texi (Modified build rules): Document the need to initialize AM_CFLAGS and AM_CXXFLAGS in tests directories. * NEWS: Mention the new requirement.
Collin Funk d5dcc6c9 2025-09-01T14:26:59 Fix the previous two commits. The issue occurs on alpha not hppa. Also add the glibc bug report link in comments.
Collin Funk 282ea164 2025-09-01T14:01:36 sys_types-h tests: Fix a static_assert failure on glibc/hppa. * tests/test-sys_types-h.c [__GLIBC__ && __hppa]: Don't check that blksize_t and blkcnt_t are signed. * doc/posix-headers/sys_types.texi: Mention that these types are unsigned on this platform.
Collin Funk 1087a157 2025-09-01T14:00:00 sys_stat-h tests: Fix a static_assert failure on glibc/hppa. Reported by Santiago Vila <sanvila@debian.org> in: <https://lists.gnu.org/archive/html/bug-m4/2025-09/msg00000.html>. * tests/test-sys_stat-h.c [__GLIBC__ && __hppa]: Don't check that blksize_t and blkcnt_t are signed. * doc/posix-headers/sys_stat.texi: Mention that these types are unsigned on this platform.
Paul Eggert 8ba0c4da 2025-09-01T13:04:21 tests: adapt AT_FDCWD fix for more tests * tests/test-areadlinkat-with-size.c (main): * tests/test-areadlinkat.c (main): * tests/test-faccessat.c (main): * tests/test-fchmodat.c (main): * tests/test-fchownat.c (main): * tests/test-fstatat.c (main): * tests/test-linkat.c (main): * tests/test-mkdirat.c (main): * tests/test-mkfifoat.c (main): * tests/test-openat-safer.c (main): * tests/test-readlinkat.c (main): * tests/test-renameat.c (main): * tests/test-renameatu.c (main): * tests/test-symlinkat.c (main): * tests/test-unlinkat.c (main): * tests/test-utimensat.c (main): Work even if AT_FDCWD == -1.
Paul Eggert e30c1556 2025-09-01T11:25:00 openat2-tests: fix AT_FDCWD portability * tests/test-openat.c (main): Work even if AT_FDCWD == -1.
Bruno Haible f05b5a23 2025-08-19T20:05:47 doc: Update for glibc 2.42. * doc/glibc-functions/uabs.texi: New file. * doc/glibc-functions/ulabs.texi: New file. * doc/glibc-functions/ullabs.texi: New file. * doc/glibc-functions/uimaxabs.texi: New file. * doc/gnulib.texi (Glibc inttypes.h): New section. (Glibc stdlib.h): Include three of these files.
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 2410984b 2025-08-02T10:25:13 Shorten GCC bug URLs
Paul Eggert 98704937 2025-08-02T10:21:36 Shorten glibc bug URLs
Paul Eggert a44c85a2 2025-08-02T08:52:29 More copy_file_range commentary
Collin Funk c3779ad1 2025-08-01T21:34:37 doc: Mention the copy_file_range bug. * doc/glibc-functions/copy_file_range.texi: Mention glibc bug 33245 in version 2.41 and 2.42.
Simon Josefsson 6bb58afd 2025-07-31T16:21:30 doc: Improvements for gnulib git bundle. * doc/gnulib-git-bundle.texi (Gnulib Git Bundle): Add 20250729 release. Improve reproducibility instructions.
Paul Eggert 1ce8849f 2025-07-28T17:50:30 float-h: change IBM long double to match GCC 15 This is in response to the GCC developers; see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120993>. * lib/float.c (gl_LDBL_MAX): Remove the implementation for PowerPC, as it should no longer be needed. * lib/float.in.h (LDBL_MIN_EXP, LDBL_MIN_10_EXP, LDBL_MIN) (LDBL_MAX, LDBL_EPSILON, LDBL_NORM_MAX): On PowerPC with IBM long double, simplify by using the GCC 15 values unconditionally. These are the correct values according to the GCC developers and there seems little point to disagreeing with current GCC about obsolescent arithmetic that is so problematic in practice. * tests/test-float-h.c (test_long_double): Relax tests of LDBL_MAX when !LDBL_IS_IEC_60559, as the tests would now fail on PowerPC and they were not portable in that case anyway.
Collin Funk e936bfd8 2025-07-23T19:55:41 sethostname tests: Avoid test failure on Haiku. * tests/test-sethostname2.c (main): On Haiku, skip the "too long hostname" test. * doc/glibc-functions/sethostname.texi: Mention the Haiku problem.
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.
Karl Berry 7c20e73b 2025-07-20T07:09:22 autoupdate
Bruno Haible 1b22071b 2025-07-20T13:42:46 doc: Document resilience against supply chain attacks. * doc/gnulib-intro.texi (Other source code libraries): New subsection.
Collin Funk f50bfdb3 2025-07-18T20:35:29 doc: Mention GNU/Hurd is missing sync_file_range. * doc/glibc-functions/sync_file_range.texi: Add GNU/Hurd to the list of platforms missing sync_file_range.
Bruno Haible 31e573de 2025-07-17T16:43:42 parse-datetime: Update documentation regarding non-Gregorian calendars. * doc/parse-datetime.texi (General date syntax): Mention that date syntax should use the Gregorian calendar. Change examples that use %Y to use LC_ALL=C, so that they work even for users in Thailand, Iran, or Ethiopia.
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.
Collin Funk 07610f0d 2025-07-15T20:16:46 doc: Mention copy_file_range stub on GNU/Hurd. * doc/glibc-functions/copy_file_range.texi: Use @code around errno constants. Mention that the GNU/Hurd version of this function is just a stub.
Paul Eggert e94aad0c 2025-07-13T00:43:36 safe-alloc: make obsolete and remove REALLOC_N Problem reported by Vivien Kraus in: https://lists.gnu.org/r/bug-gnulib/2025-07/msg00073.html This module never caught on. * lib/safe-alloc.h (REALLOC_N): Remove. * modules/safe-alloc: Now obsolete. * tests/test-safe-alloc.c (main): Remove REALLOC_N test.
Bernhard Voelker f3aaeaf5 2025-07-09T21:06:12 regexprops-generic: update from regex.h * doc/regexprops-generic.texi: Re-generate by running the 'regexprops' binary from GNU findutils: ./regexprops "Regular Expressions" generic At least the recent(ish) change (efd5c380ff) to regex.h aligning gnulib with Emacs behavior had made this document out-of-date. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00037.html>. Additionally, today's findutils commit c9c2c51175 fixed the sort order of the Texinfo nodes.
Paul Eggert 6164b4cb 2025-07-08T17:34:25 float-h: work around GCC bug 120993 Also, fix a too-low LDBL_MAX on this platform, a problem that contributed to LDBL_NORM_MAX test failures with C23 PowerPC GCC with ibmlongdouble. * lib/float.c (gl_LDBL_MAX): On PowerPC with ibmlongdouble, the correct value is 2**1024 - 2**918, not 2**1024 - 2**971. Also, use C99 hex double notation for the divisor, as it’s clearer and should work nowadays. * lib/float.in.h: Simplify by not worring whether it’s AIX or GNU/Linux when redefining LDBL_* macros on PowerPC GCC with ibmlongdouble, as the problem seems to be universal then. (LDBL_NORM_MAX): On PowerPC GCC with ibmlongdouble, define to be LDBL_MAX, so that it’s 2**1024 - 2**918, doubling GCC’s value if supplied. * modules/float-h-tests (Depends-on): Remove floorl, ldexpl. Add truncl. (test_float_h_LDADD): Likewise for libraries. * tests/test-float-h.c (test_isfinitel): New static function, so that we need not rely on isfinitel. (normalize_long_double): Work even if X is negative or not finite. Do not rely on frexpl or ldexpl. Use truncl instead of floorl so that the negative results are consistent with positive. Defend against fritzy PowerPC long double arithmetic.
Karl Berry d79e2998 2025-07-05T07:33:49 autoupdate
Bruno Haible 27d2acd1 2025-07-01T08:03:42 doc: Update regarding stable branches. * doc/gnulib-readme.texi (Stable Branches): Mention new branch stable-202507. Mention that stable-202407 is no longer updated.
Bruno Haible 0d1077ab 2025-06-27T15:27:24 options: New module. * lib/options.h: New file. * lib/options.c: New file. * modules/options: New file. * doc/glibc-functions/getopt_long.texi: Mention the new module.
Karl Berry ab69e774 2025-06-23T08:00:12 autoupdate
Paul Eggert f60688ed 2025-06-17T09:11:49 listxattr: document Linux 6.15 bug This bug should be fixed in Linux kernel 6.16; see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe78e02600f83d81e55f6fc352d82c4f264a2901 For what it's worth, Coreutils decided not to work around the bug, and instead to suggest updating to a fixed kernel or to a future version of libattr with at least the following patches: https://cgit.git.savannah.gnu.org/cgit/attr.git/commit/?id=58abfe6eba0d8d58a61ee8bee0615f74d393fff2 https://cgit.git.savannah.gnu.org/cgit/attr.git/commit/?id=504ab19d7b032212755ab3c7df16be98d5b5212e
Bruno Haible de208bd2 2025-06-16T11:15:01 gnulib-tool: Default to --single-configure. New option --two-configures. * gnulib-tool.sh: single_configure now defaults to false. New option --two-configures. Stop documenting option --single-configure. * pygnulib/GLInfo.py (GLInfo.usage): Document option --two-configures. Stop documenting option --single-configure. * pygnulib/GLTestDir.py (GLTestDir.execute): Update comment. * pygnulib/main.py (main): single_configure now defaults to false. New option --two-configures. * doc/transversal.texi: Update. * HACKING: Update.
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.
Collin Funk 9a604394 2025-06-06T20:52:07 doc: Add some missing Makefile targets. * doc/Makefile (standards.pdf, maintain.info, maintain.html) (maintain.dvi, maintain.pdf): New targets. * doc/.gitignore: Add files generated when building GNU Maintainer Information and GNU Standards.
Karl Berry 4bc8bde6 2025-06-06T07:58:19 autoupdate
Karl Berry 64b179d6 2025-06-02T08:01:09 autoupdate
Paul Eggert d02604fd 2025-05-30T10:28:06 listxattr: document Linux 6.14- bug This bug is fixed in Linux kernel 6.15; see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b0ba61d For what it's worth, Coreutils decided not to work around the bug, and instead to suggest updating to a fixed kernel.
Paul Eggert f6c13a00 2025-05-30T00:41:32 Document O_CREAT|O_DIRECTORY bugs with Linux <6.4
Bruno Haible be4e50f3 2025-05-27T11:33:00 doc: Update platforms list re *_CLOFORK. * doc/posix-headers/fcntl.texi: Update platforms list.
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.
Bruno Haible 004d7434 2025-05-27T10:29:31 doc: Style module name. * doc/posix-headers/fcntl.texi: Style module name with @code.
Paul Eggert 8a7304a5 2025-05-26T19:24:27 fcntl-h: document O_CLOFORK etc
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.
Paul Eggert 4ccca948 2025-05-26T15:41:51 Document HAVE_WORKING_O_NO{ATIME,FOLLOW}
Bruno Haible 7d0b12d7 2025-05-22T13:09:57 strchrnul: Update doc. * doc/glibc-functions/strchrnul.texi: strchrnul got added in macOS 15.4.
Paul Eggert b4a2a542 2025-05-18T22:39:06 Fix misspelling of ‘or1k’ in doc
Karl Berry 1620cd9b 2025-05-18T07:22:27 autoupdate
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 a258598e 2025-05-14T12:51:46 spin: New module. * lib/glthread/spin.h: New file, based on lib/glthread/lock.h and lib/asyncsafe-spin.h. * lib/glthread/spin.c: New file, based on lib/asyncsafe-spin.c. * modules/spin: New file. * doc/multithread.texi (Choosing a multithreading API): Spin locks no longer require POSIX threads. (Gnulib multithreading): Mention the 'spin' module.
Bruno Haible c58efdb8 2025-05-12T14:01:42 doc: Update doc about ACLs on Cygwin. * doc/acl-resources.txt: Update function list for Cygwin >= 2.5.
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.
Bruno Haible 5656e32e 2025-05-10T03:16:52 string-desc: Distinguish writable strings from read-only strings. * lib/string-desc.h (HAVE_STATEMENT_EXPRESSIONS): New macro. (rw_string_desc_t): New type. (string_desc_t) [HAVE_STATEMENT_EXPRESSIONS]: Change field _data from 'char *' to 'const char *'. (sd_readonly, sd_readwrite): New inline functions. (sd_length): Define through a macro with _Generic. (sd_char_at): Define through a macro and an inline function. (sd_data, sd_is_empty): Define through a macro with _Generic. (sd_equals, sd_startswith, sd_endswith, sd_cmp, sd_c_casecmp, sd_index, sd_last_index, sd_contains): Define through a macro. (sd_new_addr): Define through a macro with _Generic. (sd_substring, sd_write, sd_fwrite): Define through a macro. (sd_new, sd_new_filled): Change parameter type. (sd_copy): Define through a macro. (sd_concat): Change parameter type. (sd_c): Define through a macro. (sd_set_char_at, sd_fill): Change parameter type. (sd_overwrite): Define through a macro. (sd_free): Change parameter type. * lib/string-desc.c (_sd_equals): Renamed from sd_equals. Take scalar parameters. (_sd_startswith): Renamed from sd_startswith. Take scalar parameters. (_sd_endswith): Renamed from sd_endswith. Take scalar parameters. (_sd_cmp): Renamed from sd_cmp. Take scalar parameters. (_sd_c_casecmp): Renamed from sd_c_casecmp. Take scalar parameters. (_sd_index): Renamed from sd_index. Take scalar parameters. (_sd_last_index): Renamed from sd_last_index. Take scalar parameters. (_sd_new_addr, _rwsd_new_addr): Renamed from sd_new_addr. (sd_substring): Remove function. (_sd_write): Renamed from sd_write. Take scalar parameters. (_sd_fwrite): Renamed from sd_fwrite. Take scalar parameters. (sd_new, sd_new_filled): Change parameter type. (_sd_copy): Renamed from sd_copy. Change parameter type. Take scalar parameters. (sd_concat): Change parameter type. (_sd_c): Renamed from sd_c. Take scalar parameters. (sd_set_char_at, sd_fill): Change parameter type. (_sd_overwrite): Renamed from sd_overwrite. Change parameter type. Take scalar parameters. (sd_free): Change parameter type. * lib/string-desc-contains.c (_sd_contains): Renamed from sd_contains. Take scalar parameters. * lib/xstring-desc.h (xsd_new, xsd_new_filled, xsd_copy, xsd_concat): Change return type to rw_string_desc_t. (xsd_c): Define through a macro. * lib/xstring-desc.c (xsd_concat): Change return type to rw_string_desc_t. * doc/string-desc.texi (Handling strings with NUL characters): Mention rw_string_desc_t and the sd_readonly() function. * lib/string-buffer.h (sb_dupfree, sb_xdupfree): Change return type to rw_string_desc_t. * lib/string-buffer.c (sb_contents): Add a cast to 'const char *'. (sb_dupfree): Change return type to rw_string_desc_t. * lib/xstring-buffer.c (sb_xdupfree): Change return type to rw_string_desc_t. * lib/string-buffer-reversed.h (sbr_dupfree, sbr_xdupfree): Change return type to rw_string_desc_t. * lib/string-buffer-reversed.c (sbr_contents): Add a cast to 'const char *'. (sbr_dupfree): Change return type to rw_string_desc_t. * lib/xstring-buffer-reversed.c (sbr_xdupfree): Change return type to rw_string_desc_t. * tests/test-string-desc.c (main): Use type rw_string_desc_t as appropriate. * tests/test-xstring-desc.c (main): Likewise. * tests/test-sf-istream.c (main): Remove cast in sd_new_addr argument. * tests/test-sfl-istream.c (main): Likewise. * NEWS: Mention the change.
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 ...)'.
G. Branden Robinson cd3725d6 2025-05-02T01:06:18 doc: Clarify age of <sys/types.h>. * doc/gnulib-readme.texi (C language versions): Mention when <sys/types.h> first appeared. Copyright-paperwork-exempt: Yes
Paul Eggert dc2f601c 2025-04-25T17:03:48 doc: update some GCC version comments GCC 15.1 is released, and we can update some commentary now.
Paul Eggert dc79f8d2 2025-04-25T16:57:48 stddef-h: port better to future GCC 13.4, 14.3 * m4/stddef_h.m4 (gl_STDDEF_H): The idempotency bug should be fixed in GCC 13.4 and 14.3, if and when they’re published.
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 bdb1601d 2025-04-22T18:46:08 random_r tests: Disable signature check on Haiku. * tests/test-random_r.c [__HAIKU__]: Skip initstate_r and setstate_r signature check. * doc/glibc-functions/initstate_r.texi: Remove year. * doc/glibc-functions/setstate_r.texi: Likewise.
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.
Karl Berry b08ee1d0 2025-04-19T07:49:06 autoupdate
Karl Berry c20dedcb 2025-04-18T08:19:27 autoupdate
Paul Eggert 8c6c35c7 2025-04-17T20:26:23 Update some POSIX.1-2004 citations
Paul Eggert 6ff0345d 2025-04-14T14:43:02 regex: don’t check RE_SYNTAX_EMACS * m4/regex.m4 (gl_REGEX): Do not check RE_SYNTAX_EMACS’s value. Suggested by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2025-04/msg00098.html
Paul Eggert efd5c380 2025-04-13T18:01:08 regex: match current Emacs behavior * config/srclist.txt: Comment out regex.h, since we now disagree with glibc. * lib/regex.h (RE_SYNTAX_EMACS): Match Emacs 21+ behavior, not Emacs 20-. * m4/regex.m4 (gl_REGEX): Check for this Emacs fix.
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.
Collin Funk 01c06a1a 2025-03-28T14:58:31 doc: Document NetBSD acl functions. * doc/acl-resources.txt: Document that NetBSD supports all ACL functions that FreeBSD supports.
Karl Berry 18ccaf87 2025-03-26T09:22:06 autoupdate
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.
Karl Berry e353c222 2025-03-19T06:48:03 autoupdate
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.
Simon Josefsson a716eaed 2025-03-12T11:29:59 Fix typo in last commit.
Simon Josefsson 867344f9 2025-03-12T11:22:39 doc: Improvements for gnulib git bundle. * doc/gnulib-git-bundle.texi (Gnulib Git Bundle): Use https URL, suggested by Bruno. Update instructions and add checksum/keyinfo.
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>.