summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* copy-file, supersede: Fix link-time requirements.Bruno Haible2023-01-052-0/+2
| | | | | * modules/copy-file (Link): Add $(LIB_ACL). * modules/supersede (Link): Likewise.
* More systematic naming of LIB variables.Bruno Haible2023-01-052-2/+2
| | | | | | | | * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Set FILE_HAS_ACL_LIB to the same value as LIB_HAS_ACL. * modules/file-has-acl (Link): Use FILE_HAS_ACL_LIB instead of LIB_HAS_ACL. * modules/file-has-acl-tests (Makefile.am): Likewise.
* stdio: Fix error in C++ mode on Android, due to putw.Bruno Haible2023-01-031-0/+1
| | | | | | | | | * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is not declared. * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared. (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW. * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW. * doc/glibc-functions/putw.texi: Update regarding Android.
* stdio: Fix error in C++ mode on Android, due to getw.Bruno Haible2023-01-031-0/+1
| | | | | | | | * lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is not declared. * m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared. (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW. * modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
* maint: run 'make update-copyright'Simon Josefsson2023-01-012-2/+2
|
* stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)Bruno Haible2022-12-271-4/+2
| | | | | | * modules/stdnoreturn (Status): Remove. (Notice): Say that it is deprecated, not obsolete. * doc/noreturn.texi: Fix a typo.
* ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)Bruno Haible2022-12-261-4/+2
| | | | | * modules/ctime (Status): Remove. (Notice): Say that it is deprecated, not obsolete.
* largefile: sync from Autoconf masterPaul Eggert2022-12-252-9/+4
| | | | | | | | | | | | | | | | | | * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether AC_SYS_YEAR2038 is defined when this macro is defined, not when it is used, as we now define AC_SYS_YEAR2038 later. (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove. (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS) (_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE) (_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038) (_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS) (_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros. (AC_SYS_LARGEFILE): Use them. * m4/year2038.m4: Remove. All mentions removed. * modules/largefile, modules/year2038 (configure.ac-early): Do not require gl_YEAR2038_EARLY. * modules/year2038 (Depends-on): Depend on largefile. (configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.
* stdnoreturn: deprecatePaul Eggert2022-12-241-0/+6
| | | | | | | C23 says <stdnoreturn.h> is obsolescent, so deprecate the stdnoreturn module. I don't think it was being used anyway as it had too many problems. * modules/stdnoreturn: Mark as obsolete.
* asctime, ctime: deprecatePaul Eggert2022-12-211-0/+6
| | | | | | | | C23 deprecates asctime and ctime, so deprecate them in Gnulib too. * NEWS, doc/posix-functions/asctime.texi: * doc/posix-functions/ctime.texi: Mention this. * lib/time.in.h (ctime): Deprecate any ctime replacement. * modules/ctime: Now obsolete.
* explicit_bzero: implement via memset_explicitPaul Eggert2022-11-281-3/+1
| | | | | | | | * lib/explicit_bzero.c (explicit_bzero): Simplify by just calling memset_explicit. * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove. All uses removed. * modules/explicit_bzero (Depends-on): Add memset_explicit.
* read-file: use memset_explicitPaul Eggert2022-11-281-1/+1
| | | | | | | * lib/read-file.c (fread_file, read_file): Use memset_explicit instead of explicit_bzero. * modules/read-file (Depends-on): Depend on memset_explicit instead of on explicit_bzero.
* memset_explicit: new modulePaul Eggert2022-11-283-0/+47
| | | | | | | | | | | | * doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c: * m4/memset_explicit.m4, modules/memset_explicit: * modules/memset_explicit-tests, tests/test-memset_explicit.c: New files. * lib/string.in.h (memset_explict): New decl. * m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS) (gl_STRING_H_DEFAULTS): * modules/string (string.h): Support memset_explicit.
* posix_spawn tests: Fix compilation error (regression 2022-09-14).Bruno Haible2022-11-201-0/+1
| | | | | * modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define EXEEXT.
* dynarray: Rename to glibc-internal/dynarray.Bruno Haible2022-11-033-21/+21
| | | | | | | | * modules/glibc-internal/dynarray: Renamed from modules/dynarray. * modules/glibc-internal/dynarray-tests: Renamed from modules/dynarray-tests. * modules/regex (Depends-on): Update. * NEWS: Mention this change and the previous one.
* scratch_buffer: Rename to glibc-internal/scratch_buffer.Bruno Haible2022-11-035-39/+39
| | | | | | | | | | * modules/glibc-internal/scratch_buffer: Renamed from modules/scratch_buffer. * modules/glibc-internal/scratch_buffer-tests: Renamed from modules/scratch_buffer-tests. * modules/canonicalize (Depends-on): Update. * modules/canonicalize-lgpl (Depends-on): Likewise. * modules/glob (Depends-on): Likewise.
* scratch_buffer: adjust to glibc changesPaul Eggert2022-11-022-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Karl Berry in: https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html * build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h: Autoupdate. * build-aux/install-reloc (func_create_wrapper): Omit removed file scratch_buffer_dupfree.c. * config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c * lib/canonicalize-lgpl.c: Merge changes from glibc through its commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05 11:04:45 +0200. (__strdup) [!_LIBC]: New macro. (struct realpath_bufs): New type. (realpath_stk): Use it as the extra argument. All uses changed. No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR. * lib/canonicalize.c (struct realpath_bufs) (canonicalize_filename_mode_stk): Likewise. * lib/malloc/scratch_buffer_dupfree.c: Remove, since it was removed in glibc. * lib/scratch_buffer.h (scratch_buffer_dupfree) [0]: (__libc_scratch_buffer_dupfree): Remove decls. * modules/relocatable-prog-wrapper (Files): * modules/scratch_buffer (Files, lib_SOURCES): Remove lib/malloc/scratch_buffer_dupfree.c.
* relocatable-script: Relax license.Bruno Haible2022-11-011-1/+1
| | | | | * modules/relocatable-script (License): Change to GPLv2+. * build-aux/relocatable.sh.in: Change copyright header to GPLv2+.
* Update to Unicode 15.0.0.Bruno Haible2022-10-16195-195/+195
| | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (is_property_default_ignorable_code_point): Exclude 0x13439..0x1343F. (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters 0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A, 0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F, 0x1E4EC..0x1E4EF. * All the affected modules: Bump required libunistring version.
* tests: prefer stdckdint to intpropsPaul Eggert2022-10-109-9/+9
| | | | | | | | | | | * modules/chown-tests, modules/fchownat-tests: * modules/fdutimensat-tests, modules/futimens-tests: * modules/lchown-tests, modules/stat-time-tests: * modules/utime-tests, modules/utimens-tests: * modules/utimensat-tests: (Depends on): Depend on stdckint, not intprops. * tests/nap.h: Include stdckdint.h, not intprops.h. All macro uses changed.
* stat-time: prefer stdckdint to intpropsPaul Eggert2022-10-101-1/+1
| | | | | | * lib/stat-time.h: Include stdckdint.h instead of intprops.h. (stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV. * modules/stat-time (Depends-on): Depend on stdckdint, not intprops.
* xalloc: remove stray includes + dependenciesPaul Eggert2022-10-102-2/+0
| | | | | | | | These used to be needed, but are not needed now. * lib/xalloc.h: Do not include stdlib.h. [GNULIB_XALLOC]: Do not include "intprops.h". * lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX. * modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
* largefile: fix detection of time_t size on mingw32Daiki Ueno2022-09-251-1/+1
| | | | | * modules/largefile (configure.ac-early): Ensure gl_YEAR2038_EARLY is invoked before gl_YEAR2038_BODY.
* stdbool: Mostly revert last patch.Bruno Haible2022-09-251-1/+0
| | | | | * m4/c-bool.m4 (gl_C_BOOL): If stdbool.h does not exist, just err out. * modules/stdbool (Files): Remove m4/stdbool.m4.
* stdbool: Don't #include a gnulib-generated stdbool.h from config.h.Bruno Haible2022-09-251-0/+1
| | | | | | * m4/c-bool.m4 (gl_C_BOOL): Check for stdbool.h and for _Bool. If stdbool.h does not exist, don't #include <stdbool.h> but instead put the substitute code into config.h.
* time C++ tests: Fix link error on CentOS 5.Bruno Haible2022-09-171-1/+1
| | | | | * modules/time-c++-tests (Makefile.am): Link test-time-c++ against $(LIB_CLOCK_GETTIME).
* stdbool: depend on C99Paul Eggert2022-09-141-0/+3
| | | | | | | Record that stdbool depends on C99 these days. This matters only for ancient compilers that need special flags to support C99 features. * modules/stdbool (Depends-on): Add c99.
* stdalign: alignas and alignof are C23 keywordsPaul Eggert2022-09-131-2/+1
| | | | | | | | | | * m4/stdalign.m4 (gl_STDALIGN_H): Check also whether alignas and alignof are keywords and so don’t need stdalign.h, and define HAVE_C_ALIGNASOF if so. If not, arrange for config.h to #define alignas and alignof by including <stdalign.h>. * modules/stdalign: No need to include <stdalign.h>. * tests/test-stdalign.c: Do not include stdalign.h.
* assert-h: prefer to ‘verify’Paul Eggert2022-09-1369-70/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where it’s easy, prefer ‘static_assert’ to ‘verify’, as this simplifies the source by removing the need to include verify.h. Keep using ‘verify’ if verify.h is used for other reasons, or if code is shared with glibc. * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h: * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c: * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c: * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c: * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c: * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c: * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c: * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c: * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c: * tests/test-intprops.c, tests/test-libgmp.c: * tests/test-limits-h.c, tests/test-locale.c: * tests/test-pthread.c, tests/test-round2.c: * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c: * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c: * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c: * tests/test-wchar.c: Prefer static_assert to verify, and stop including verify.h. * lib/stat.c: Don’t include verify.h (this include was unnecessary). * modules/alignalloc, modules/alignof-tests, modules/argmatch: * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha: * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit: * modules/c32isgraph, modules/c32islower, modules/c32isprint: * modules/c32ispunct, modules/c32isspace, modules/c32isupper: * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs: * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf: * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map: * modules/intprops-tests, modules/libgmp-tests: * modules/limits-h-tests, modules/locale-tests, modules/malloca: * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit: * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep: * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests: * modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/round-tests, modules/roundf-tests, modules/sleep: * modules/stat, modules/stdalign-tests, modules/stdckdint-tests: * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests: * modules/strerror, modules/string-tests, modules/strtoimax: * modules/strtoumax, modules/sys_stat-tests, modules/time-tests: * modules/uchar-tests, modules/unistd-tests: * modules/unistdio/u16-u16-vasnprintf: * modules/unistdio/u16-vasnprintf: * modules/unistdio/u32-u32-vasnprintf: * modules/unistdio/u32-vasnprintf: * modules/unistdio/u8-u8-vasnprintf: * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf: * modules/utimecmp, modules/vasnprintf, modules/wchar-tests: Depend on assert-h, not verify.
* assert-h: static_assert is a keyword in C23Paul Eggert2022-09-132-1/+4
| | | | | | | | | | | | * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert keyword a la C23, and define HAVE_C_STATIC_ASSERT if so. If not, arrange for config.h to #define static_assert by including <assert.h>, and then do "#undef assert" so that the assert macro still needs an explicit include. This should be safe even on very old hosts, as assert.h has been re-includable for decades. * tests/tests-assert.c: New test. * modules/assert-h-tests (Files, Makefile.am): Add it.
* Reorganize C++ tests for stdbool and stdbool-c99.Bruno Haible2022-09-103-2/+22
| | | | | | | | | | | * tests/test-stdbool-c++.cc: Don't include <stdbool.h> if TEST_STDBOOL_H is not defined. Add a couple of simple tests, from test-stdbool.c. * tests/test-stdbool-c99-c++.cc: New file. * modules/stdbool-c99-c++-tests: New file, based on modules/stdbool-c++-tests. * modules/stdbool-c99-tests (Depends-on): Add stdbool-c99-c++-tests. Remove stdbool-c++-tests. * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
* Rely on new stdbool behaviorPaul Eggert2022-09-1017-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer the C23 style to the C99 style, since the stdbool module now supports C23. * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h: * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c: * lib/backup-internal.h, lib/backupfile.c, lib/base32.h: * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h: * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c: * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c: * lib/classpath.h, lib/clean-temp-private.h: * lib/clean-temp-simple.c, lib/clean-temp-simple.h: * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h: * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h: * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c: * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h: * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c: * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c: * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c: * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c: * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c: * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h: * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c: * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c: * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c: * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h: * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c: * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h: * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h: * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c: * lib/lchown.c, lib/localeinfo.h, lib/localename.c: * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h: * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c: * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h: * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h: * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c: * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c: * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h: * lib/priv-set.c, lib/progreloc.c, lib/propername.c: * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c: * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h: * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c: * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h: * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h: * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h: * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c: * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c: * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c: * lib/tempname.c, lib/term-style-control.c: * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c: * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h: * lib/unicase/caseprop.h, lib/unicase/invariant.h: * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c: * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c: * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c: * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c: * lib/unicase/u8-is-invariant.c, lib/unictype.in.h: * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c: * lib/unigbrk/u32-grapheme-breaks.c: * lib/unigbrk/u8-grapheme-breaks.c: * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c: * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c: * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h: * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h: * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c: * lib/xstrtod.h, lib/yesno.h: * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c: * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c: * tests/test-areadlinkat.c, tests/test-base32.c: * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c: * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c: * tests/test-dup3.c, tests/test-exclude.c: * tests/test-execute-child.c, tests/test-execute-main.c: * tests/test-execute-script.c, tests/test-explicit_bzero.c: * tests/test-fchownat.c, tests/test-fcntl-safer.c: * tests/test-fcntl.c, tests/test-fdutimensat.c: * tests/test-filenamecat.c, tests/test-floor2.c: * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c: * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h: * tests/test-hard-locale.c, tests/test-hash.c: * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c: * tests/test-immutable.c, tests/test-intprops.c: * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c: * tests/test-lstat.c, tests/test-mbmemcasecmp.c: * tests/test-mbmemcasecoll.c, tests/test-mkdir.c: * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c: * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c: * tests/test-nonblocking-pipe-main.c: * tests/test-nonblocking-socket-child.c: * tests/test-nonblocking-socket-main.c, tests/test-open.c: * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c: * tests/test-poll.c, tests/test-posix_spawn-chdir.c: * tests/test-posix_spawn-dup2-stdin.c: * tests/test-posix_spawn-dup2-stdout.c: * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c: * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c: * tests/test-quotearg.c, tests/test-readlink.c: * tests/test-readlinkat.c, tests/test-readtokens.c: * tests/test-rename.c, tests/test-renameat.c: * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c: * tests/test-select.h, tests/test-spawn-pipe-child.c: * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c: * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c: * tests/test-symlink.c, tests/test-symlinkat.c: * tests/test-system-quote-main.c: * tests/test-term-style-control-hello.c: * tests/test-term-style-control-yes.c, tests/test-timespec.c: * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c: * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c: * tests/test-utimens.c, tests/test-utimensat.c: * tests/unictype/test-categ_byname.c: * tests/unigbrk/test-uc-is-grapheme-break.c: Don’t include stdbool.h. * modules/acl, modules/xgetcwd: Don’t depend on stdbool, as these modules don’t use bool. * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl: * modules/gen-uni-tables, modules/getrandom: * modules/hash-triple-simple, modules/posix_spawn-internal: * modules/strcasestr, modules/supersede, modules/system-quote: * modules/uniconv/base, modules/uniname/uniname, modules/utime: * modules/windows-timedrwlock: Depend on stdbool, as these modules use bool.
* stdbool: upgrade from C99 to C23Paul Eggert2022-09-104-28/+66
| | | | | | | | | | | Change the stdbool module so that it now emulates C23. The module now assumes C99. The old module (which assumes C89 and emulates C99) is still available as stdbool-c99, but is deprecated. * tests/test-stdbool.c [TEST_STDBOOL_H]: Do not include stdbool.h. (WORKING_BOOL): Depend on HAVE_C_BOOL, not __STDC_VERSION__. * m4/c-bool.m4, modules/c-bool, modules/c-bool-tests: * tests/test-c-bool.c: New files.
* posix_spawn_file_actions_addclose tests: Fix mistake from 2022-09-07.Bruno Haible2022-09-091-0/+1
| | | | | * modules/posix_spawn_file_actions_addclose-tests (Files): Add m4/musl.m4.
* posix_spawn_file_actions_addclose tests: Avoid test failure on musl.Bruno Haible2022-09-071-0/+1
| | | | | | | | | | Reported by Valery Ushakov <uwe@stderr.spb.ru> in <https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>. * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke gl_MUSL_LIBC. * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the tests on musl libc.
* Fix various test link errors on MSVC.Bruno Haible2022-09-0519-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour with $(LIB_GETRANDOM). * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with $(LIB_GETRANDOM). * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link test-gc-hmac-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link test-gc-hmac-sha256 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link test-gc-hmac-sha512 with $(LIB_GETRANDOM). * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with $(LIB_GETRANDOM). * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with $(LIB_GETRANDOM). * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with $(LIB_GETRANDOM). * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with $(LIB_GETRANDOM). * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael with $(LIB_GETRANDOM). * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with $(LIB_GETRANDOM). * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with $(LIB_GETRANDOM). * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with $(LIB_GETRANDOM). * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with $(LIB_GETRANDOM). * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with $(LIB_GETRANDOM).
* glob tests: Fix link error on mingw.Bruno Haible2022-09-051-1/+1
| | | | * modules/glob-tests (Makefile.am): Link test-glob with $(LIBINTL).
* Fix compilation errors of C++ tests on Solaris 10 with Sun C++.Bruno Haible2022-09-042-2/+2
| | | | | | | * modules/string-c++-tests (Makefile.am): Link test-string-c++ with $(LIBUNISTRING). * modules/wchar-c++-tests (Makefile.am): Link test-wchar-c++ with $(LIBUNISTRING).
* sysexits: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-sysexits-c++.cc: New file. * modules/sysexits-c++-tests: New file. * modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.
* sys_utsname: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-sys_utsname-c++.cc: New file. * modules/sys_utsname-c++-tests: New file. * modules/sys_utsname-tests (Depends-on): Add sys_utsname-c++-tests.
* sys_uio: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-sys_uio-c++.cc: New file. * modules/sys_uio-c++-tests: New file. * modules/sys_uio-tests (Depends-on): Add sys_uio-c++-tests.
* sys_times: Add C++ tests.Bruno Haible2022-09-042-0/+22
| | | | | | * tests/test-sys_times-c++.cc: New file. * modules/sys_times-c++-tests: New file. * modules/sys_times-tests (Depends-on): Add sys_times-c++-tests.
* sys_file: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-sys_file-c++.cc: New file. * modules/sys_file-c++-tests: New file. * modules/sys_file-tests (Depends-on): Add sys_file-c++-tests.
* stdckdint: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-stdckdint-c++.cc: New file. * modules/stdckdint-c++-tests: New file. * modules/stdckdint-tests (Depends-on): Add stdckdint-c++-tests.
* stdalign: Add C++ tests.Bruno Haible2022-09-042-0/+18
| | | | | | * tests/test-stdalign-c++.cc: New file. * modules/stdalign-c++-tests: New file. * modules/stdalign-tests (Depends-on): Add stdalign-c++-tests.
* sched: Add C++ tests.Bruno Haible2022-09-042-0/+20
| | | | | | * tests/test-sched-c++.cc: New file. * modules/sched-c++-tests: New file. * modules/sched-tests (Depends-on): Add sched-c++-tests.
* netinet_in: Add C++ tests.Bruno Haible2022-09-032-0/+18
| | | | | | * tests/test-netinet_in-c++.cc: New file. * modules/netinet_in-c++-tests: New file. * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
* net_if: Add C++ tests.Bruno Haible2022-09-032-0/+20
| | | | | | | * tests/test-net_if-c++.cc: New file. * modules/net_if-c++-tests: New file. * modules/net_if-tests (Depends-on): Add net_if-c++-tests. * doc/posix-headers/net_if.texi: Fix documentation.
* tempname: fix multithreading, ASLR leak etc.Paul Eggert2022-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix problems with tempname and multithreading, entropy loss, and missing clock data (this last on non-GNU platforms). See analysis by Bruno Haible in: https://bugs.gnu.org/57129#149 While looking into this, I noticed that tempname can leak info derived from ASLR into publicly-visible file names, which is a no-no. Fix that too. * lib/tempname.c: Don't include stdalign.h. (HAS_CLOCK_ENTROPY): Remove. (mix_random_values): New function. (random_bits): Use it. Args are now new value address and old value, and this function now returns a success indicator. Omit old USE_GETRANDOM argument: always try getrandom now, as there is no good reason not to now that GRND_NONBLOCK is used. Caller changed. Use CLOCK_REALTIME for for ersatz entropy, as CLOCK_MONOTONIC doesn't work on some platforms. Also, mix in ersatz entropy from tv_sec and from clock (). (try_tempname_len): Do not mix in ASLR-based entropy, as the result is published to the world and ASLR should be private. Do not try to use a static var as that has issues if multithreaded. Instead, simply generate new random bits. Worry about bias only with high-quality random bits. * modules/tempname (Depends-on): Do not depend on stdalign.
* tempname: Add more tests.Bruno Haible2022-08-161-0/+3
| | | | | | | | Based on scenario described by Eli Zaretskii in <https://lists.gnu.org/archive/html/bug-gnulib/2022-08/msg00043.html>. * tests/test-tempname.c (main): Add another test. * modules/tempname-tests (Status): Mark the test as unportable.