| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* 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
|
|
|
|
| |
* lib/fopen.c (rpl_fopen): Mark open_direction as used.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
|
|
|
|
| |
* tests/test-hamt.c (main): Finish with exit code 0.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* modules/fchdir-tests (Depends-on): Add dup.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 (func_emit_autoconf_snippets): Avoid sh syntax
'if ! variable', that does not work with Solaris /bin/sh.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
|
|
|
|
| |
* tests/test-expm1.h (test_function): Mark y as 'volatile'.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tests/test-dfa-match-aux.c: Include unistd.h.
* modules/dfa-tests (Depends-on): Add unistd.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* lib/select.c (rpl_select): Fail if nfds is out-of-range.
* lib/pselect.c (pselect): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* 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/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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency
also when WINDOWS_64_BIT_OFF_T is 0.
|
|
|
|
|
| |
* lib/system-quote.c (system_quote): Allocate enough space for the
result.
|
|
|
|
|
|
| |
* tests/test-unicodeio.c: Include localcharset.h.
(main): Handle C locales whose encoding is CP1252 or similar.
* modules/unicodeio-tests (Depends-on): Add localcharset.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* modules/unictype/category-none (configure.ac): Remove
gl_LIBUNISTRING_MODULE invocation.
(Makefile.am): Compile unictype/categ_none.c always.
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
Use AS_IF when the body contains Autoconf macros that could
conceivably require something.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* doc/manywarnings.texi: Bring doc up to date for GCC 12.
|
|
|
|
|
|
| |
* 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’.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Set
gl_use_winpthreads_default to 'no' by default.
(gl_AVOID_WINPTHREAD): Update comments.
|
|
|
|
|
| |
* tests/test-posixtm.c (T): On native Windows, disable test cases that
would fail.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* modules/posixtm-tests (Depends-on): Add stpcpy.
|
|
|
|
|
| |
* tests/test-readtokens.sh: Transform CRLF to LF in the output, before
comparing with the expected output.
|
|
|
|
|
| |
* tests/test-parse-duration.sh: Transform CRLF to LF in the output,
before analyzing the output.
|
|
|
|
|
| |
* tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the
output, before comparing with the expected output.
|
|
|
|
|
| |
* m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
"guessing no".
|