Log

Author Commit Date CI Message
Bruno Haible 3f0950f6 2023-04-27T01:42:25 fdopendir: Fix fd leak and test failure on native Windows. * lib/dirent-private.h: On mingw, define 'struct gl_directory' as a wrapper around the original DIR. On MSVC, add an 'fd_to_close' field to 'struct gl_directory'. * lib/dirent.in.h (DIR): Define when DIR_HAS_FD_MEMBER is 0, i.e. on both mingw and MSVC. (GNULIB_defined_DIR): New macro. (opendir): Avoid incompatible redeclaration. (readdir): Consider REPLACE_READDIR. (rewinddir): Consider REPLACE_REWINDDIR. * m4/dirent_h.m4 (gl_DIRENT_DIR): New macro. (gl_DIRENT_H): Invoke it. (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_READDIR, REPLACE_REWINDDIR. * modules/dirent (Makefile.am): Substitute DIR_HAS_FD_MEMBER, REPLACE_READDIR, REPLACE_REWINDDIR. -- * lib/dirfd.c (dirfd): If GNULIB_defined_DIR, just use the 'fd_to_close' field. * m4/dirfd.m4 (gl_FUNC_DIRFD): Set HAVE_DIRFD. Don't set REPLACE_DIRFD to 1 if HAVE_DIRFD is 0. If DIR_HAS_FD_MEMBER is 0, ensure dirfd.c gets compiled. * modules/dirfd (Files): Add lib/dirent-private.h. (Depends-on, configure.ac): Simplify conditions. -- * lib/closedir.c: Include <stdlib.h> always, for free(). (closedir): If GNULIB_defined_DIR, arrange to call close(dirfd(dirp)) at the end. On mingw, call free() of dirp. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if HAVE_CLOSEDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure closedir.c gets compiled. -- * lib/opendir.c: Include <stdlib.h> always. Include <string.h>. (opendir): On mingw, allocate the 'struct gl_directory' through malloc. If GNULIB_defined_DIR, set the 'fd_to_close' field to -1. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if HAVE_OPENDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure opendir.c gets compiled. -- * lib/fdopendir.c (fdopendir): If GNULIB_defined_DIR, use a simple implementation based on opendir and the fchdir module. If __KLIBC__, don't define unused auxiliary functions. * modules/fdopendir (Files): Add lib/dirent-private.h. -- * lib/readdir.c (readdir): On mingw, redirect to the original readdir function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/readdir.m4 (gl_FUNC_READDIR): If DIR_HAS_FD_MEMBER is 0, ensure readdir.c gets compiled. * modules/readdir (configure.ac): Consider REPLACE_READDIR. -- * lib/rewinddir.c (rewinddir): On mingw, redirect to the original rewinddir function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h. * m4/rewinddir.m4 (gl_FUNC_REWINDDIR): If DIR_HAS_FD_MEMBER is 0, ensure rewinddir.c gets compiled. * modules/rewinddir (configure.ac): Consider REPLACE_REWINDDIR. -- * lib/fchdir.c (dir_info_t): Remove a FIXME.
Bruno Haible d70f555e 2023-04-27T00:48:21 fchdir tests: Fix test failure on native Windows. * modules/fchdir-tests (Depends-on): Add dup.
Bruno Haible 2c2f6738 2023-04-26T06:06:03 fclose: Make last change more maintainable. * m4/fclose.m4 (gl_FUNC_FCLOSE): Define through AC_DEFUN_ONCE. Don't modify REPLACE_FOPEN. * modules/fclose (Depends-on): Add comment. (configure.ac): Don't modify REPLACE_FOPEN. Don't duplicate actions of module 'fopen'. * m4/fopen.m4 (gl_FUNC_FOPEN_ITSELF): Renamed from gl_FUNC_FOPEN. (gl_FUNC_FOPEN): New macro. * modules/fopen (Files): Add m4/fclose.m4, m4/fflush.m4. * m4/close.m4 (gl_FUNC_CLOSE): Define through AC_DEFUN_ONCE.
Po Lu 3ef794d1 2023-04-26T04:57:31 gnulib-tool: For conditional dependencies, generate portable sh code. * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax 'if ! variable', that does not work with Solaris /bin/sh. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
Bruno Haible 446cbd49 2023-04-26T00:16:06 expm1 tests: Avoid test failure on 32-bit mingw. * tests/test-expm1.h (test_function): Mark y as 'volatile'.
Bruno Haible 9c0e7adb 2023-04-25T13:38:47 poll tests: Avoid test failure on native Windows. * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on native Windows. * doc/posix-functions/poll.texi: Mention also native Windows w.r.t. POLLHUP.
Bruno Haible 02271486 2023-04-25T12:55:00 dfa tests: Fix compilation error (regression 2023-04-22). * tests/test-dfa-match-aux.c: Include unistd.h. * modules/dfa-tests (Depends-on): Add unistd.
Bruno Haible 94f25cc6 2023-04-25T00:14:01 tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13. * tests/test-localename.c: Disable #pragma for GCC < 12. * tests/test-dup2.c: Disable #pragma for GCC < 13. * tests/test-fcntl.c: Likewise. * tests/test-getdtablesize.c: Likewise. * tests/test-listen.c: Likewise. * tests/test-open.h: Likewise. * tests/test-perror2.c: Likewise. * tests/test-select.h: Likewise.
Bruno Haible 034af0e4 2023-04-24T21:28:32 select, pselect: Fix test failure on native Windows. * lib/select.c (rpl_select): Fail if nfds is out-of-range. * lib/pselect.c (pselect): Likewise.
Paul Eggert 4bb14d69 2023-04-24T12:06:55 fclose: pacify gcc -Wanalyzer-file-leak Without this patch, building coreutils with --enable-gcc-checking=expensive would fail with a message like “lib/exclude.c:682:6: error: leak of FILE 'in' [CWE-775] [-Werror=analyzer-file-leak]”, because Gnulib replaced fclose but not fopen, and GCC saw a call to fopen followed by a call to rpl_fclose. The patch causes GCC to instead see a call to rpl_fopen followed by rpl_fclose. * m4/fclose.m4 (gl_FUNC_FCLOSE): Replace fopen when replacing fclose. * modules/fclose (Depends-on): Add fopen. (configure.ac): Replace fopen when replacing fclose.
Paul Eggert b98993a1 2023-04-24T12:06:54 unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-var * tests/test-unsetenv.c (main): Make entry static. Even with this change, it’s unclear whether this test is portable POSIX code, but that’s a different matter.
Paul Eggert 9e6a37cc 2023-04-24T12:06:54 tests: suppress some unwanted -fanalyzer checking * tests/test-dup2.c, tests/test-fcntl.c, tests/test-fopen.h: * tests/test-getdtablesize.c, tests/test-listen.c: * tests/test-localename.c, tests/test-open.h, tests/test-perror2.c: * tests/test-select.h: Add pragmas to disable unwanted -fanalyzer checking.
Bruno Haible c254399a 2023-04-24T19:48:47 ftell, ftello: Fix recognition of pipes on native Windows. * m4/lseek.m4 (gl_FUNC_LSEEK): Update comment. * m4/ftello.m4 (gl_FUNC_FTELLO): On native Windows, set REPLACE_FTELLO=1 always. * doc/posix-functions/ftello.texi: Mention the behaviour on pipes. * doc/posix-functions/ftell.texi: Likewise. * doc/posix-functions/fgetpos.texi: Likewise.
Bruno Haible ca5545a2 2023-04-24T19:15:22 lseek: Fix module dependencies (regression 2021-11-15). * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency also when WINDOWS_64_BIT_OFF_T is 0.
Bruno Haible ee84e6ad 2023-04-24T13:56:46 system-quote: Fix memory overrun bug on native Windows. * lib/system-quote.c (system_quote): Allocate enough space for the result.
Bruno Haible b9a770fc 2023-04-24T12:48:31 unicodeio tests: Avoid test failures on native Windows. * tests/test-unicodeio.c: Include localcharset.h. (main): Handle C locales whose encoding is CP1252 or similar. * modules/unicodeio-tests (Depends-on): Add localcharset.
Bruno Haible ebdce3b6 2023-04-24T10:57:16 *sprintf tests: Avoid test failures on mingw 10. * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect the de-facto standard result. * tests/test-vasprintf-posix.c (test_function): Likewise. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise.
Bruno Haible f187e34f 2023-04-24T01:57:33 Improve quoting of AS_HELP_STRING's first argument. * m4/acl.m4 (gl_FUNC_ACL_ARG): Don't underquote AS_HELP_STRING's first argument. * m4/assert.m4 (gl_ASSERT): Likewise. * m4/gc.m4 (gl_GC): Likewise. * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise. * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise. * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise. * m4/libgmp.m4 (gl_LIBGMP): Likewise. * m4/regex.m4 (gl_REGEX): Likewise. * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Likewise. * m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Likewise. * m4/sigsegv.m4 (gl_SIGSEGV): Likewise. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise. * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Likewise. * m4/version-etc.m4 (gl_VERSION_ETC_FLAG): Likewise. * m4/xattr.m4 (gl_FUNC_XATTR): Likewise. * doc/manywarnings.texi (manywarnings): Likewise. This avoids the use of quadrigraphs.
Bruno Haible 634ee03a 2023-04-23T20:19:50 category-none: Fix link errors on MSVC, when libunistring is installed. * modules/unictype/category-none (configure.ac): Remove gl_LIBUNISTRING_MODULE invocation. (Makefile.am): Compile unictype/categ_none.c always.
Paul Eggert da43b04c 2023-04-23T08:54:00 manywarnings: use AS_IF * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT): Use AS_IF when the body contains Autoconf macros that could conceivably require something.
Paul Eggert 78f7aef9 2023-04-23T08:53:59 manywarnings: update C warnings for GCC 13 Adjust for C programs compiled by GCC 13. (A C++ expert still needs to look at manywarnings-c++.m4.) * build-aux/gcc-warning.spec: Add warnings introduced in GCC 13. * doc/manywarnings.texi (manywarnings): Document flex arrays. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fstrict-flex-arrays and -Wstrict-flex-arrays as these should be suitable for Gnulib-using code.
Paul Eggert e3b58d82 2023-04-23T08:53:59 manywarnings: bring doc up to date * doc/manywarnings.texi: Bring doc up to date for GCC 12.
Paul Eggert 76ef8271 2023-04-23T08:53:55 manywarnings: omit -fno-common in GCC 10+ * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Omit -fno-common in GCC 10 and later, as it is the default there. Check exit status of ‘gcc --version’.
Bruno Haible e46a05b5 2023-04-23T13:25:42 libunistring: Fix build on Windows, when a libunistring is installed. * lib/unicase.in.h: Include <unistring/woe32dll.h>. (unicase_empty_prefix_context, unicase_empty_suffix_context): Declare with GNULIB_UNICASE_..._DLL_VARIABLE. * lib/unictype.in.h: Include <unistring/woe32dll.h>. (UC_CATEGORY_*, UC_PROPERTY_*): Declare with GNULIB_UNICTYPE_..._DLL_VARIABLE. * lib/uninorm.in.h: Include <unistring/woe32dll.h>. (unicode_normalization_form uninorm_nf*): Declare with GNULIB_UNINORM_..._DLL_VARIABLE. * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE_WITH_VARIABLE): New macro. (gl_LIBUNISTRING_LIB_PREPARE): Set HAVE_UNISTRING_WOE32DLL_H. * m4/unicase_h.m4: New file. * m4/unictype_h.m4: New file. * m4/uninorm_h.m4: New file. * modules/unicase/base (Files): Add m4/unicase_h.m4. (configure.ac): Bump version number. Invoke gl_UNICASE_H, gl_UNICASE_H_REQUIRE_DEFAULTS. (Makefile.am): Substitute all GNULIB_UNICASE_*_DLL_VARIABLE. * modules/unicase/empty-*-context (configure.ac): Invoke gl_UNICASE_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE. * modules/unictype/base (Files): Add m4/unictype_h.m4. (configure.ac): Bump version number. Invoke gl_UNICTYPE_H, gl_UNICTYPE_H_REQUIRE_DEFAULTS. (Makefile.am): Substitute all GNULIB_UNICTYPE_*_DLL_VARIABLE. * modules/unictype/category-* (configure.ac): Invoke gl_UNICTYPE_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE. * modules/unictype/property-* (configure.ac): Likewise. * modules/uninorm/base (Files): Add m4/uninorm_h.m4. (configure.ac): Bump version number. Invoke gl_UNINORM_H, gl_UNINORM_H_REQUIRE_DEFAULTS. (Makefile.am): Substitute all GNULIB_UNINORM_*_DLL_VARIABLE. * modules/uninorm/nf* (configure.ac): Invoke gl_UNINORM_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
Bruno Haible 934167a3 2023-04-23T03:29:28 Avoid some Autoconf "was expanded before it was required" warnings. * m4/locale-ar.m4 (gt_LOCALE_AR): Define through AC_DEFUN_ONCE. * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise. * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise. * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise. * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
Bruno Haible 9a7378f1 2023-04-22T17:38:28 string-desc tests: Avoid test failure on native Windows. * tests/test-string-desc.c: Include <fcntl.h>, <unistd.h>. (main): Expect a file name argument. Write to this file, instead of to fd 3. * tests/test-string-desc.sh: Pass a file name as argument, instead of using '3>'. * modules/string-desc-tests (Depends-on): Add close.
Bruno Haible aa9dc79d 2023-04-22T15:10:31 threadlib, pthread-h, threads-h: Avoid mingw's libwinpthread by default. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Set gl_use_winpthreads_default to 'no' by default. (gl_AVOID_WINPTHREAD): Update comments.
Bruno Haible f498e10d 2023-04-22T13:56:55 posixtm tests: Avoid test failure on native Windows. * tests/test-posixtm.c (T): On native Windows, disable test cases that would fail.
Bruno Haible eddc3474 2023-04-22T13:47:15 dfa tests: Fix test failure on mingw differently. Suggested by Paul Eggert. * tests/test-dfa-invalid-char-class.sh: Revert last change. * tests/test-dfa-match-aux.c: Include binary-io.h. (main): Put stdout into binary mode. * modules/dfa-tests (Depends-on): Add binary-io.
Bruno Haible dd0a48f5 2023-04-20T23:21:42 getumask: Make it work on native Windows. * lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP. * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native Windows.
Bruno Haible 876ad6af 2023-04-20T20:02:13 posixtm tests: Fix link error. * modules/posixtm-tests (Depends-on): Add stpcpy.
Bruno Haible 60e3e210 2023-04-20T19:03:27 readtokens tests: Fix test failure on mingw. * tests/test-readtokens.sh: Transform CRLF to LF in the output, before comparing with the expected output.
Bruno Haible 17970797 2023-04-20T18:51:48 parse-duration tests: Fix test failure on mingw. * tests/test-parse-duration.sh: Transform CRLF to LF in the output, before analyzing the output.
Bruno Haible 9cc5e656 2023-04-20T18:39:33 dfa tests: Fix test failure on mingw. * tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the output, before comparing with the expected output.
Bruno Haible ebb4fc02 2023-04-20T16:40:20 Fix uses of libwinpthread on mingw 10. * m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to "guessing no".
Bruno Haible e524987d 2023-04-20T14:21:09 Move remaining call_once tests from mtx-tests to call_once-tests. * tests/test-call_once1.c: Renamed from tests/test-call_once.c. * tests/test-call_once2.c: New file, based on tests/test-mtx.c. * tests/test-mtx.c: Remove the code that was testing call_once. * modules/call_once-tests (Files): Add test-call_once1.c, test-call_once2.c. Remove test-call_once.c. (Depends-on): Add thrd, lock, stdint. (configure.ac): Check for alarm. (Makefile.am): Test test-call_once1 instead of test-call_once. Also test test-call_once2.
Bruno Haible 5a883444 2023-04-20T13:23:52 execute tests: Fix compilation error on mingw (regression 2023-01-17). * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not defined.
Bruno Haible f50fa20d 2023-04-20T08:42:56 assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30. * lib/verify.h (_Static_assert): In C++ mode with MSVC 14.1 or newer, define merely to static_assert. (static_assert): In C++ mode with MSVC 14.1 or newer, don't define.
Bruno Haible e5eacca5 2023-04-20T02:51:43 chown, lchown tests: Fix link error on mingw 10. * modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/lchown-tests (configure.ac): Likewise. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback. * tests/test-lchown.h (getgid): Likewise.
Bruno Haible b3774862 2023-04-20T02:29:26 chown tests: Fix link error on mingw 10. * modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback.
Bruno Haible 57d2a227 2023-04-20T02:18:59 ctime: Fix compilation errors in C++ mode on mingw 10. * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment. * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before _GL_FUNCDECL_RPL in C++ mode.
Bruno Haible 5ec5eb70 2023-04-20T02:03:43 random: Fix compilation errors in C++ on mingw 10. * lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation on non-glibc systems.
Bruno Haible fe921023 2023-04-19T14:20:54 year2038-required: Fix configure failure with MSVC. * m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results "support not detected" and "supported through gnulib". If the result is "supported through gnulib", don't fail.
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 0fb00d83 2023-04-19T17:59:58 wcsncmp: Add tests. * tests/test-wcsncmp.c: New file, based on tests/unistr/test-strncmp.h and tests/test-wcscmp.c. * modules/wcsncmp-tests: New file.
Bruno Haible ccb59e4c 2023-04-19T17:59:03 wcsncmp: Work around two ISO C compliance bugs on several platforms. * lib/wchar.in.h (wcsncmp): Consider REPLACE_WCSNCMP. * lib/wcsncmp-impl.h (wcsncmp): Don't assume that the two wide characters are in the range 0..INT_MAX. * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Test whether wcsncmp works for all wide characters. Set REPLACE_WCSNCMP. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNCMP. * modules/wchar (Makefile.am): Substitute REPLACE_WCSNCMP. * modules/wcsncmp (Status, Notice): Un-obsolete this module. (configure.ac): Consider REPLACE_WCSNCMP. * doc/posix-functions/wcsncmp.texi: Mention the two bugs.
Bruno Haible 9bf6bcc7 2023-04-19T02:14:44 wcscmp: Add tests. * tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h. * modules/wcscmp-tests: New file.
Bruno Haible 4b440d35 2023-04-19T02:14:09 wcscmp: Work around two ISO C compliance bugs on several platforms. * lib/wchar.in.h (wcscmp): Consider REPLACE_WCSCMP. * lib/wcscmp-impl.h (wcscmp): Don't assume that the two wide characters are in the range 0..INT_MAX. * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test whether wcscmp works for all wide characters. Set REPLACE_WCSCMP. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSCMP. * modules/wchar (Makefile.am): Substitute REPLACE_WCSCMP. * modules/wcscmp (Status, Notice): Un-obsolete this module. (configure.ac): Consider REPLACE_WCSCMP. * doc/posix-functions/wcscmp.texi: Mention the two bugs.
Bruno Haible 7634eee7 2023-04-19T02:10:23 wmemcmp: Add tests. * tests/test-wmemcmp.c (main): Add comment.
Bruno Haible 312f211b 2023-04-19T01:10:32 wmemcmp: Add tests. * tests/test-wmemcmp.c: New file, based on tests/unistr/test-cmp.h. * modules/wmemcmp-tests: New file.
Bruno Haible 6c28538c 2023-04-19T01:01:56 wmemcmp: Work around ISO C compliance bug on several platforms. * lib/wchar.in.h (wmemcmp): Consider REPLACE_WMEMCMP. * lib/wmemcmp-impl.h (wmemcmp): Don't assume that the two wide characters are in the range 0..INT_MAX. * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Test whether wmemcmp works for all wide characters. Set REPLACE_WMEMCMP. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMCMP. * modules/wchar (Makefile.am): Substitute REPLACE_WMEMCMP. * modules/wmemcmp (configure.ac): Consider REPLACE_WMEMCMP. * doc/posix-functions/wmemcmp.texi: Mention the bug.
Bruno Haible 5c9f32c9 2023-04-19T00:17:15 doc: Update platform list for posix_spawnp. * doc/posix-functions/posix_spawnp.texi: Update platform list.
Paul Eggert 9a8ec097 2023-04-18T14:25:09 Go back to dynamic largefile, year2038 tests Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2023-04/msg00134.html * modules/largefile-tests, modules/year2038-tests (Depends-on): Remove assert-h. * tests/test-largefile.c, tests/test-year2038.c: Test dynamically, not via static_assert.
Paul Eggert 3b693f5a 2023-04-18T13:59:32 doc: mention when O_* defaults to 0 * doc/posix-headers/fcntl.texi: Document in more detail which O_* macros default to 0 in Gnulib.
Bruno Haible b397f58b 2023-04-18T15:01:22 doc: Mention a Cygwin 3.4.6 bug. * doc/posix-functions/readlinkat.texi: Mention a readlinkat bug on Cygwin < 3.4.7.
Bruno Haible 38489e5c 2023-04-18T13:24:42 ilogbl: Work around a Cygwin 3.4.6 bug. * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Also test the value of ilogbl(NaN). * doc/posix-functions/ilogbl.texi: Mention the new Cygwin bug.
Bruno Haible 2d4adbff 2023-04-18T12:53:22 file-has-acl tests: Avoid test failures on Cygwin 3.4.6. * tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and Cygwin setfacl.
Bruno Haible 48984797 2023-04-18T09:51:21 c32isgraph: Avoid test failure on Cygwin 3.4.6. * tests/test-c32isgraph.c (main): Skip U+00A0 test on Cygwin.
Paul Eggert 2c70f907 2023-04-17T08:44:51 Slightly nicer largefile, year2038 tests * modules/largefile-tests, modules/year2038-tests (Depends-on): Add assert-h, intprops. * tests/test-largefile.c, tests/test-year2038.c: Prefer compile-time to run-time tests. Don’t assume CHAR_BIT == 8.
Bruno Haible 879c7d6e 2023-04-17T13:41:57 MODULES.html.sh: Ensure hyperlinked files are displayable. * MODULES.html.sh (repo_url_prefix): Use cgit instead of gitweb.
Bruno Haible 02287d59 2023-04-17T13:07:28 MODULES.html.sh: Avoid a HTTP redirect. * MODULES.html.sh (repo_url_prefix): Use the unabbreviated name of the git repository server.
Bruno Haible b549c292 2023-04-16T23:35:47 year2038: Add tests. * tests/test-year2038.c: New file. * modules/year2038-tests: New file.
Bruno Haible 3f1469b7 2023-04-16T23:30:36 largefile: Add tests. * tests/test-largefile.c: New file. * modules/largefile-tests: New file.
Bruno Haible ab7e730c 2023-04-16T17:44:42 year2038: Revert the added module dependencies. Suggested by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00117.html>. * modules/year2038 (Depends-on): Remove sched, sys_msg, sys_select, sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
Bruno Haible a6874e97 2023-04-16T13:41:17 posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin. * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an unportable test also on Cygwin.
Bruno Haible 5399c704 2023-04-15T18:05:57 Fix compilation errors of list, set, oset, map, omap in C++ mode. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_BRACKET_BEFORE_ATTRIBUTE. In _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, don't use the bracket syntax if _GL_BRACKET_BEFORE_ATTRIBUTE is defined.
Bruno Haible 2afd12da 2023-04-15T16:55:34 Don't include module 'year2038-required' in all-of-gnulib testdirs. * all-modules (exclude): Add year2038-required.
Bruno Haible 7683ccb3 2023-04-15T13:44:34 selinux-h: Fix compilation error (regression 2023-04-13). * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Instead of defining the C macro HAVE_SELINUX_SELINUX_H to 0, set the Autoconf variable HAVE_SELINUX_SELINUX_H to 0.
Paul Eggert f0d3e2cb 2023-04-14T22:02:35 * ChangeLog: fix year2038 wording
Bruno Haible 44366a5e 2023-04-14T21:57:37 year2038: Fix configure failure on 32-bit mingw. * m4/largefile.m4 (_AC_SYS_YEAR2038_PROBE): Use the same option spelling as in _AC_SYS_YEAR2038_OPTIONS.
Bruno Haible 9f182146 2023-04-15T00:46:57 isnan: Fix compilation error in C++ mode on FreeBSD 13.2. * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan through _GL_MATH_CXX_REAL_FLOATING_DECL_2.
Bruno Haible 535e24db 2023-04-14T19:23:19 filemode: Fix double-inclusion guard. * lib/filemode.h: Make the double-inclusion guard actually work.
Bruno Haible 97c4d331 2023-04-14T12:52:25 year2038: Add reminder to include <config.h> before time_t gets defined. * lib/sched.in.h: Check that config.h was already included before the * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_types.in.h: Likewise. * lib/time.in.h: Likewise. * lib/utime.in.h: Likewise. * modules/year2038 (Depends-on): Add sched, sys_msg, sys_select, sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
Bruno Haible 09596027 2023-04-14T12:48:46 sys_shm: New module. * lib/sys_shm.in.h: New file. * m4/sys_shm_h.m4: New file. * modules/sys_shm: New file. * doc/posix-headers/sys_shm.texi: Mention the new module.
Bruno Haible e8bbebe5 2023-04-14T12:48:01 sys_sem: New module. * lib/sys_sem.in.h: New file. * m4/sys_sem_h.m4: New file. * modules/sys_sem: New file. * doc/posix-headers/sys_sem.texi: Mention the new module.
Bruno Haible 90c477e6 2023-04-14T12:47:03 sys_msg: New module. * lib/sys_msg.in.h: New file. * m4/sys_msg_h.m4: New file. * modules/sys_msg: New file. * doc/posix-headers/sys_msg.texi: Mention the new module.
Bruno Haible 45122e72 2023-04-13T23:48:40 Add more reminders to include <config.h>. * lib/aligned-malloc.h: Check that config.h was already included. * lib/careadlinkat.h: Likewise. * lib/filemode.h: Likewise. * lib/freadptr.h: Likewise. * lib/fseterr.h: Likewise. * lib/glthread/lock.h: Likewise. * lib/glthread/tls.h: Likewise. * lib/immutable.h: Likewise. * lib/isapipe.h: Likewise. * lib/isnand-nolibm.h: Likewise. * lib/isnanf-nolibm.h: Likewise. * lib/isnanl-nolibm.h: Likewise. * lib/mbswidth.h: Likewise. * lib/md5.h: Likewise. * lib/minmax.h: Likewise. * lib/msvc-inval.h: Likewise. * lib/msvc-nothrow.h: Likewise. * lib/pathmax.h: Likewise. * lib/sha1.h: Likewise. * lib/sha256.h: Likewise. * lib/sha512.h: Likewise. * lib/size_max.h: Likewise. * lib/sm3.h: Likewise. * lib/stat-size.h: Likewise. * lib/termcap.h: Likewise. * lib/terminfo.h: Likewise. * lib/thread-optim.h: Likewise. * lib/unlocked-io.h: Likewise. * lib/vma-iter.h: Likewise.
Bruno Haible 298293b2 2023-04-13T23:18:19 Adjust comments in <config.h> reminders. * lib/*.h: In the comments, mention also HAVE_*.
Bruno Haible dcba8542 2023-04-13T22:17:02 Adjust comments in <config.h> reminders. * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*. * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
Bruno Haible ffb4ed84 2023-04-13T21:43:51 utmp: Avoid using HAVE_* macros in *.in.h files. * m4/pty_h.m4 (gl_PTY_CHECK_UTIL_H): New macro, extracted from gl_PTY_H. (gl_PTY_H): Invoke it. * m4/utmp_h.m4 (gl_UTMP_H): Invoke gl_PTY_CHECK_UTIL_H and set HAVE_TERMIOS_H. (gl_UTMP_H_DEFAULTS): Require gl_PTY_H_DEFAULTS, gl_TERMIOS_H_DEFAULTS. * modules/utmp (Files): Add m4/pty_h.m4, m4/termios_h.m4. (Makefile.am): Substitute also HAVE_UTIL_H, HAVE_LIBUTIL_H, HAVE_TERMIOS_H. * lib/utmp.in.h: Test HAVE_UTIL_H, HAVE_LIBUTIL_H, HAVE_TERMIOS_H as Autoconf variables.
Bruno Haible a194861e 2023-04-13T21:25:59 getprogname: Avoid using HAVE_* macros in *.in.h files. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_PROGRAM_INVOCATION_NAME. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Require gl_STDLIB_H_DEFAULTS and gl_USE_SYSTEM_EXTENSIONS. Set HAVE_DECL_PROGRAM_INVOCATION_NAME. * modules/stdlib (Makefile.am): Substitute HAVE_DECL_PROGRAM_INVOCATION_NAME. * lib/stdlib.in.h (getprogname): Test HAVE_DECL_PROGRAM_INVOCATION_NAME as an Autoconf variable.
Bruno Haible c5a9b3ea 2023-04-13T21:12:45 selinux-h: Avoid using HAVE_* macros in *.in.h files. * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Initialize HAVE_SELINUX_SELINUX_H. * modules/selinux-h (Makefile.am): Substitute HAVE_SELINUX_SELINUX_H. * lib/se-selinux.in.h: Test HAVE_SELINUX_SELINUX_H as an Autoconf variable.
Bruno Haible 78e5c144 2023-04-13T14:26:50 ialloc, gethrxtime: Restore GCC diagnostics options. * lib/ialloc.h: Invoke _GL_INLINE_HEADER_END. * lib/xtime.h: Likewise. * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
Bruno Haible d9ed3c73 2023-04-13T14:06:12 flexmember: Fix module description (regression 2016-09-07). * modules/flexmember (Include): Add "flexmember.h".
Paul Eggert 50bae7d7 2023-04-12T15:12:47 doc: year2038 MIPS o32 nudge * doc/year2038.texi: Use more-common "o32" name for 32-bit MIPS ABI.
Bruno Haible 8ad7bc67 2023-04-12T14:49:29 Add more reminders to include <config.h>. * m4/gnulib-common.m4 (gl_COMMON): In config.h, define _GL_CONFIG_H_INCLUDED. * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of _GL_INLINE_HEADER_BEGIN. * lib/alignalloc.h: Likewise. * lib/argp-fmtstream.h: Likewise. * lib/argp.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/c-ctype.h: Likewise. * lib/count-leading-zeros.h: Likewise. * lib/count-one-bits.h: Likewise. * lib/count-trailing-zeros.h: Likewise. * lib/eealloc.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/gethrxtime.h: Likewise. * lib/gl_list.h: Likewise. * lib/gl_map.h: Likewise. * lib/gl_omap.h: Likewise. * lib/gl_openssl.h: Likewise. * lib/gl_oset.h: Likewise. * lib/gl_set.h: Likewise. * lib/gl_xlist.h: Likewise. * lib/gl_xmap.h: Likewise. * lib/gl_xomap.h: Likewise. * lib/gl_xoset.h: Likewise. * lib/gl_xset.h: Likewise. * lib/gl_xsublist.h: Likewise. * lib/glthread/cond.h: Likewise. * lib/hamt.h: Likewise. * lib/ialloc.h: Likewise. * lib/math.in.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * lib/openat.h: Likewise. * lib/pipe-filter-aux.h: Likewise. * lib/priv-set.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/savewd.h: Likewise. * lib/se-context.in.h: Likewise. * lib/se-label.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sig-handler.h: Likewise. * lib/stat-time.h: Likewise. * lib/string-desc-quotearg.h: Likewise. * lib/string-desc.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/timespec.h: Likewise. * lib/u64.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utimens.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xsize.h: Likewise. * lib/xstring-desc.h: Likewise. * lib/xtime.h: Likewise. * lib/acl.h: Check that config.h was already included. * lib/alignof.h: Likewise. * lib/argmatch.h: Likewise. * lib/argv-iter.h: Likewise. * lib/arpa_inet.in.h: Likewise. * lib/attribute.h: Likewise. * lib/backupfile.h: Likewise. * lib/base32.h: Likewise. * lib/base64.h: Likewise. * lib/basename-lgpl.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-snprintf.h: Likewise. * lib/c-stack.h: Likewise. * lib/c-strcase.h: Likewise. * lib/c-vasnprintf.h: Likewise. * lib/c-vasprintf.h: Likewise. * lib/c-vsnprintf.h: Likewise. * lib/c-xvasprintf.h: Likewise. * lib/canon-host.h: Likewise. * lib/canonicalize.h: Likewise. * lib/clean-temp.h: Likewise. * lib/concat-filename.h: Likewise. * lib/ctype.in.h: Likewise. * lib/dfa.h: Likewise. * lib/di-set.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/dirent.in.h: Likewise. * lib/dirname.h: Likewise. * lib/eloop-threshold.h: Likewise. * lib/error.in.h: Likewise. * lib/exclude.h: Likewise. * lib/fatal-signal.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/flexmember.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/fpending.h: Likewise. * lib/freadable.h: Likewise. * lib/freadahead.h: Likewise. * lib/freading.h: Likewise. * lib/fts_.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * lib/gc.h: Likewise. * lib/get_progname_of.h: Likewise. * lib/glob.in.h: Likewise. * lib/glthread/thread.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hash.h: Likewise. * lib/i-ring.h: Likewise. * lib/iconv.in.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/javaversion.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/localename.h: Likewise. * lib/malloc.in.h: Likewise. * lib/malloca.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memchr2.h: Likewise. * lib/memcmp2.h: Likewise. * lib/modechange.h: Likewise. * lib/monetary.in.h: Likewise. * lib/mountlist.h: Likewise. * lib/netdb.in.h: Likewise. * lib/obstack.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/pipe-filter.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readutmp.h: Likewise. * lib/regex-quote.h: Likewise. * lib/relocatable.h: Likewise. * lib/savedir.h: Likewise. * lib/sched.in.h: Likewise. * lib/search.in.h: Likewise. * lib/sh-quote.h: Likewise. * lib/signal.in.h: Likewise. * lib/sigpipe-die.h: Likewise. * lib/sockets.h: Likewise. * lib/spawn.in.h: Likewise. * lib/ssfmalloc.h: Likewise. * lib/stack.h: Likewise. * lib/stdalign.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * lib/strerror-override.h: Likewise. * lib/striconv.h: Likewise. * lib/striconveh.h: Likewise. * lib/striconveha.h: Likewise. * lib/string-buffer.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strnlen1.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/system-quote.h: Likewise. * lib/term-style-control.h: Likewise. * lib/termios.in.h: Likewise. * lib/textstyle.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/trim.h: Likewise. * lib/utime.in.h: Likewise. * lib/utmp.in.h: Likewise. * lib/vasnprintf.h: Likewise. * lib/verror.h: Likewise. * lib/version-etc.h: Likewise. * lib/wchar.in.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/windows-thread.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmalloca.h: Likewise. * lib/xmemdup0.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xstriconv.h: Likewise. * lib/xstriconveh.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtol-error.h: Likewise. * lib/xvasprintf.h: Likewise. * Makefile (config_h_MACROS*): New variables. (sc_check_config_h_reminder): New rule.
Paul Eggert eebb3a74 2023-04-11T14:54:20 doc: update year2038 list further Prompted by Adhemerval Zanella Netto’s email in: https://lists.gnu.org/r/bug-gnulib/2023-04/msg00083.html Also, mention 32-bit Android. * doc/year2038.texi: Mention Linux/ork1 and Android. Append "32" to powerpc and sparc names.
Bruno Haible 2b06288e 2023-04-11T19:40:15 Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings. * Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add termcap, terminfo.
Bruno Haible cc587170 2023-04-11T19:37:24 Fix some "make sc_prohibit_leading_TABs" findings. * tests/test-calloc-gnu.c: Expand tabs. * tests/test-regex.c: Likewise.
Bruno Haible d9b89953 2023-04-11T19:34:50 Makefile: Fix a syntax alert. * Makefile: Indent commands with tabs, not spaces.
Bruno Haible f92235ea 2023-04-11T02:52:16 alignasof: Ensure a correct _Alignas (regression 2023-01-15). * m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h> exists.
Paul Eggert 9a93dbc9 2023-04-11T02:46:39 Add ChangeLog entries for the last 3 commits.
Paul Eggert be7c3fa0 2023-04-10T15:15:37 doc: update list of year2038 platforms * doc/year2038.texi: Update list of platforms by adding dates and version numbers and fixing some that appear to have been misfiled. Also, list working systems and versions first, as that helps shorten the list of failing systems by saying "older versions".
Paul Eggert b4c04569 2023-04-10T15:18:19 doc: moved year2038 para up * doc/year2038.texi: Move a paragraph up, as it’s lonely at the end.
Paul Eggert 3e6b572b 2023-04-10T15:15:37 doc: document year2038 first * doc/year2038.texi: Document year2038 first, then year2038-required.
Bruno Haible d785e0f2 2023-04-10T16:41:02 doc: Clarify list of platforms for year2038 support. * doc/year2038.texi (Avoiding the year 2038 problem): List one more platform.
Bruno Haible b865fc7d 2023-04-10T14:55:42 doc: Clarify list of platforms for year2038 support. * doc/year2038.texi (Avoiding the year 2038 problem): List the platforms on which year2038-required is known to fail vs. known to succeed.
Bruno Haible fe8a82b5 2023-04-10T14:49:45 doc: Avoid ambiguous wording. * doc/posix-headers/time.texi: Say "or" not "and".
Bruno Haible 217e3599 2023-04-10T03:54:47 doc: Fix a typo. * doc/posix-headers/time.texi: Fix typo in module name.
Paul Eggert 4b604905 2023-04-09T18:16:57 doc: improve cross-refs for year 2038 issue