summaryrefslogtreecommitdiff
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Warn against bogus TZ settingsPaul Eggert2023-05-071-0/+6
| | | | | * doc/parse-datetime.texi (Specifying time zone rules): Warn against TZ="UTC=5".
* dirfd: Add tests.Bruno Haible2023-05-051-0/+6
| | | | | * tests/test-dirfd.c: New file. * modules/dirfd-tests: New file.
* dirfd: Fix bogus override (regression 2023-04-26).Bruno Haible2023-05-051-0/+7
| | | | | | | Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00040.html>. * m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistake in last change.
* c32swidth: Add tests.Bruno Haible2023-05-041-0/+4
| | | | | * tests/test-c32swidth.c: New file, based on tests/test-c32width.c. * modules/c32swidth-tests: New file.
* c32swidth: New module.Bruno Haible2023-05-041-0/+13
| | | | | | | | | | | | * lib/uchar.in.h (c32swidth): New declaration. * lib/wcswidth-impl.h: Use macros FUNC, UNIT, CHARACTER_WIDTH. * lib/wcswidth.c: Define FUNC, UNIT, CHARACTER_WIDTH before including wcswidth-impl.h. * lib/c32swidth.c: New file. * modules/c32swidth: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32SWIDTH. * modules/uchar (Makefile.am): Substitute GNULIB_C32SWIDTH.
* wcswidth: Fix result in case of overflow.Bruno Haible2023-05-041-0/+6
| | | | | * lib/wcswidth-impl.h (wcswidth): Continue searching for a non-printing wide character after the total width has become > INT_MAX.
* wcswidth: Relax license.Bruno Haible2023-05-041-0/+7
| | | | | | * modules/wcswidth (License): Change to LGPLv2+. * lib/wcswidth.c: Update license notice. * lib/wcswidth-impl.h: Likewise.
* c32width: Relax license.Bruno Haible2023-05-041-0/+6
| | | | | * modules/c32width (License): Change to LGPLv2+. * lib/c32width.c: Update license notice.
* c32to*: Relax license.Bruno Haible2023-05-041-0/+7
| | | | | | | | * modules/c32tolower (License): Change to LGPLv2+. * modules/c32toupper (License): Likewise. * lib/c32tolower.c: Update license notice. * lib/c32toupper.c: Likewise. * lib/c32to-impl.h: Likewise.
* unicase/tolower, unicase/toupper: Relax license.Bruno Haible2023-05-041-0/+11
| | | | | | | | | | | | * lib/gen-uni-tables.c (output_simple_mapping): Bump copyright year. For unicase/tolower.h and unicase/toupper.h, use the LGPLv2+. * lib/unicase/tolower.h: Regenerated. * lib/unicase/toupper.h: Likewise. * lib/unicase/simple-mapping.h: Update license notice. * lib/unicase/tolower.c: Likewise. * lib/unicase/toupper.c: Likewise. * modules/unicase/tolower (License): Change to LGPLv2+. * modules/unicase/toupper (License): Likewise.
* unicase/base: Relax license.Bruno Haible2023-05-041-0/+6
| | | | | * modules/unicase/base (License): Change to LGPLv2+. * lib/unicase.in.h: Update license notice.
* c32is*: Relax license.Bruno Haible2023-05-041-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/c32isalnum (License): Change to LGPLv2+. * modules/c32isalpha (License): Likewise. * modules/c32isblank (License): Likewise. * modules/c32iscntrl (License): Likewise. * modules/c32isdigit (License): Likewise. * modules/c32isgraph (License): Likewise. * modules/c32islower (License): Likewise. * modules/c32isprint (License): Likewise. * modules/c32ispunct (License): Likewise. * modules/c32isspace (License): Likewise. * modules/c32isupper (License): Likewise. * modules/c32isxdigit (License): Likewise. * lib/c32isalnum.c: Update license notice. * lib/c32isalpha.c: Likewise. * lib/c32isblank.c: Likewise. * lib/c32iscntrl.c: Likewise. * lib/c32isdigit.c: Likewise. * lib/c32isgraph.c: Likewise. * lib/c32islower.c: Likewise. * lib/c32isprint.c: Likewise. * lib/c32ispunct.c: Likewise. * lib/c32isspace.c: Likewise. * lib/c32isupper.c: Likewise. * lib/c32isxdigit.c: Likewise. * lib/c32is-impl.h: Likewise.
* unictype/ctype-*: Relax license.Bruno Haible2023-05-041-0/+20
| | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (output_predicate): Bump copyright year. For unictype/ctype_*, use the LGPLv2+. * lib/unictype/ctype_*.h: Regenerated. * lib/unictype/ctype_*.c: Update license notice. * modules/unictype/ctype-alnum (License): Change to LGPLv2+. * modules/unictype/ctype-alpha (License): Likewise. * modules/unictype/ctype-blank (License): Likewise. * modules/unictype/ctype-cntrl (License): Likewise. * modules/unictype/ctype-digit (License): Likewise. * modules/unictype/ctype-graph (License): Likewise. * modules/unictype/ctype-lower (License): Likewise. * modules/unictype/ctype-print (License): Likewise. * modules/unictype/ctype-punct (License): Likewise. * modules/unictype/ctype-space (License): Likewise. * modules/unictype/ctype-upper (License): Likewise. * modules/unictype/ctype-xdigit (License): Likewise.
* c32width: Add tests.Bruno Haible2023-05-041-0/+4
| | | | | * tests/test-c32width.c: New file, based on tests/test-wcwidth.c. * modules/c32width-tests: New file.
* c32width: New module.Bruno Haible2023-05-041-0/+10
| | | | | | | | | * lib/uchar.in.h (c32width): New declaration. * lib/c32width.c: New file, based on lib/c32is-impl.h. * modules/c32width: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32WIDTH. * modules/uchar (Makefile.am): Substitute GNULIB_C32WIDTH.
* doc: Mention macOS wcwidth bug.Bruno Haible2023-05-041-0/+6
| | | | | * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Mention macOS bugs. * doc/posix-functions/wcwidth.texi: Update regarding macOS.
* vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.Bruno Haible2023-05-031-0/+13
| | | | | | | | | | | | * lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves, ignore the '0' flag if a precision is specified and the conversion is one of d, i, o, u, x, X, b, B. * tests/test-vasnprintf-posix.c (test_function): Update expected results accordingly. * tests/test-vasprintf-posix.c (test_function): Likewise. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnwprintf-posix.c (test_function): Likewise.
* mktime: include <intprops.h>Paul Eggert2023-05-021-0/+7
| | | | | | * lib/mktime.c: Include <intprops.h> again, fixing a typo noted by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2023-05/msg00014.html
* fopen: Silence a gcc warning.Bruno Haible2023-05-021-0/+5
| | | | * lib/fopen.c (rpl_fopen): Mark open_direction as used.
* extern-inline: port to pccPaul Eggert2023-05-011-0/+5
| | | | | | * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to pcc 1.2.0.DEVEL 20220331, which doesn’t support extern inline even though it claims to be GCC 4.3 and to support C11.
* regex: prefer C23 style overflow checkingPaul Eggert2023-05-011-0/+6
| | | | | | | * lib/regex_internal.h: Include stdckdint.h. * lib/regexec.c (re_search_2_stub): * modules/regex (Depends-on): Add stdckdint. Prefer stdckdint.h to intprops.h macros.
* dynarray: prefer C23 style overflow checkingPaul Eggert2023-05-011-0/+10
| | | | | | | | | | | * lib/malloc/dynarray_emplace_enlarge.c, lib/malloc/dynarray_resize.c: Include stdckdint.h, not intprops.h. * lib/malloc/dynarray_emplace_enlarge.c: (__libc_dynarray_emplace_enlarge): * lib/malloc/dynarray_resize.c (__libc_dynarray_resize): Prefer stdckdint.h to intprops.h macros. * modules/glibc-internal/dynarray (Depends-on): Depend on stdckdint, not intprops.
* mktime: prefer C23 style overflow checkingPaul Eggert2023-05-011-0/+8
| | | | | | | | | Prefer stdckdint.h macros to intprops.h macros where either will do, as this is the C23 standard. Also, it ports around a pcc bug. * config/srclist.txt: Comment out mktime.c. * lib/mktime.c: Include stdckdint.h, not intprops.h. (__mktime_internal): Prefer stdckdint.h to intprops.h macros. * modules/mktime (Depends-on): Add stdckdint.
* limits-h: port to pccPaul Eggert2023-05-011-0/+8
| | | | | | | * doc/posix-headers/limits.texi: Document the issue. * lib/limits.in.h (MB_LEN_MAX): New macro, if not already defined. * m4/limits-h.m4 (gl_LIMITS_H): Test for MB_LEN_MAX. * tests/test-limits-h.c: Check that it’s positive.
* year2038-recommended: new modulePaul Eggert2023-04-291-0/+19
| | | | | | | | | | | | | | | | | | Remove year2038-required and largefile-required, replacing the former with year2038-recommended and simply removing the latter. This syncs with Autoconf master. * MODULES.html.sh, NEWS, doc/largefile.texi: * all-modules (exclude): Exclude year2038-recommended, not -required. * doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi: * doc/year2038.texi: Mention this. * m4/largefile.m4: Sync from Autoconf. Override existing macros if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if AC_SYS_LARGEFILE_REQUIRED is not defined. * modules/largefile-required, modules/year2038-required: Removed. * modules/year2038: Do not depend on largefile; simply use m4/largefile.m4, since we shouldn’t need the extra goodies largefile supplies. * modules/year2038-recommended: New module.
* stdio: Avoid different configure results in different testdirs.Bruno Haible2023-04-291-0/+9
| | | | | | | | * m4/stdio_h.m4 (gl_STDIO_H_EARLY): New macro, extracted from gl_STDIO_H. (gl_STDIO_H): Move the code that sets __USE_MINGW_ANSI_STDIO to gl_STDIO_H_EARLY. * modules/stdio (configure.ac-early): New section.
* stdbool tests: Avoid compilation error with Sun C on Solaris 10.Bruno Haible2023-04-291-0/+5
| | | | * tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
* hamt tests: Fix test failure with Sun C on Solaris 10/SPARC.Bruno Haible2023-04-291-0/+5
| | | | * tests/test-hamt.c (main): Finish with exit code 0.
* localeconv: Work around a mingw bug.Bruno Haible2023-04-281-0/+11
| | | | | | | | | | * m4/localeconv.m4 (gl_FUNC_LOCALECONV): Test whether fields of type 'char' are filled correctly. (gl_PREREQ_LOCALECONV): Test whether 'struct lconv' has the int_{p,n}_* members. * lib/localeconv.c (FIX_CHAR_VALUE): New macro. (localeconv): Replace negative field values with CHAR_MAX. * doc/posix-functions/localeconv.texi: Mention the mingw bug.
* stdlib: Fix error when cross-compiling (regression 2023-04-04).Bruno Haible2023-04-271-1/+1
|
* stdlib: Fix error when cross-compiling.Bruno Haible2023-04-271-0/+7
| | | | | | | Reported by Pierre Labastie <pierre.labastie@neuf.fr> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00220.html>. * m4/stdlib_h.m4 (gl_STDLIB_H): Provide a 4th argument to AC_RUN_IFELSE.
* freopen-safer: pacify GCC 13Paul Eggert2023-04-261-0/+5
| | | | * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
* fdopendir: Fix fd leak and test failure on native Windows.Bruno Haible2023-04-271-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* fchdir tests: Fix test failure on native Windows.Bruno Haible2023-04-271-0/+5
| | | | * modules/fchdir-tests (Depends-on): Add dup.
* fclose: Make last change more maintainable.Bruno Haible2023-04-261-0/+13
| | | | | | | | | | | | * 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.
* gnulib-tool: For conditional dependencies, generate portable sh code.Po Lu2023-04-261-0/+8
| | | | | | * 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.
* expm1 tests: Avoid test failure on 32-bit mingw.Bruno Haible2023-04-261-0/+5
| | | | * tests/test-expm1.h (test_function): Mark y as 'volatile'.
* poll tests: Avoid test failure on native Windows.Bruno Haible2023-04-251-0/+8
| | | | | | | * 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.
* dfa tests: Fix compilation error (regression 2023-04-22).Bruno Haible2023-04-251-0/+6
| | | | | * tests/test-dfa-match-aux.c: Include unistd.h. * modules/dfa-tests (Depends-on): Add unistd.
* tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13.Bruno Haible2023-04-251-0/+12
| | | | | | | | | | | * 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.
* select, pselect: Fix test failure on native Windows.Bruno Haible2023-04-241-0/+6
| | | | | * lib/select.c (rpl_select): Fail if nfds is out-of-range. * lib/pselect.c (pselect): Likewise.
* fclose: pacify gcc -Wanalyzer-file-leakPaul Eggert2023-04-241-0/+13
| | | | | | | | | | | | | | 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.
* unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-varPaul Eggert2023-04-241-0/+5
| | | | | | * 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.
* tests: suppress some unwanted -fanalyzer checkingPaul Eggert2023-04-241-0/+9
| | | | | | | | * 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.
* ftell, ftello: Fix recognition of pipes on native Windows.Bruno Haible2023-04-241-0/+10
| | | | | | | | | * 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.
* lseek: Fix module dependencies (regression 2021-11-15).Bruno Haible2023-04-241-0/+6
| | | | | * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency also when WINDOWS_64_BIT_OFF_T is 0.
* system-quote: Fix memory overrun bug on native Windows.Bruno Haible2023-04-241-0/+6
| | | | | * lib/system-quote.c (system_quote): Allocate enough space for the result.
* unicodeio tests: Avoid test failures on native Windows.Bruno Haible2023-04-241-0/+7
| | | | | | * tests/test-unicodeio.c: Include localcharset.h. (main): Handle C locales whose encoding is CP1252 or similar. * modules/unicodeio-tests (Depends-on): Add localcharset.
* *sprintf tests: Avoid test failures on mingw 10.Bruno Haible2023-04-241-0/+9
| | | | | | | | * 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.
* Improve quoting of AS_HELP_STRING's first argument.Bruno Haible2023-04-241-0/+22
| | | | | | | | | | | | | | | | | | | | | * 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.