summaryrefslogtreecommitdiff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* year2038-recommended: new modulePaul Eggert2023-04-291-0/+6
| | | | | | | | | | | | | | | | | | 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.
* call_once: New module, separate from mtx.Bruno Haible2023-03-251-0/+4
| | | | | | | | | | | | | | | | | | | * lib/threads.in.h (call_once): Declare as part of module 'call_once', not module 'mtx'. * lib/call_once.c: New file, extracted from lib/mtx.c. * lib/mtx.c (call_once): Remove function. * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize GNULIB_CALL_ONCE. * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE. * modules/call_once: New file, based on modules/mtx. * modules/threads (Depends-on): Add call_once. * tests/test-threads-c++.cc: Update accordingly. * modules/call_once-tests: New file, based on modules/mtx-tests. * modules/mtx-tests (Files): Remove tests/test-call_once.c. (Makefile.am): Don't compile test-call_once. * doc/posix-functions/call_once.texi: Document that the relevant module is now 'call_once'. * NEWS: Mention the change.
* maint: improve notice of time changePaul Eggert2023-03-101-0/+2
|
* time-h: Renamed from time.Bruno Haible2023-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/time-h: Renamed from modules/time. * tests/test-time-h.c: Renamed from tests/test-time.c. * modules/time-h-tests: Renamed from modules/time-tests. Update. * tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc. * tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc. * modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update. * modules/cond (Depends-on): Update. * modules/ctime (Depends-on): Likewise. * modules/localtime (Depends-on): Likewise. * modules/mktime (Depends-on): Likewise. * modules/nanosleep (Depends-on): Likewise. * modules/parse-datetime (Depends-on): Likewise. * modules/posixcheck (Depends-on): Likewise. * modules/pthread-h (Depends-on): Likewise. * modules/stat-time (Depends-on): Likewise. * modules/stat-time-tests (Depends-on): Likewise. * modules/strftime-fixes (Depends-on): Likewise. * modules/strptime (Depends-on): Likewise. * modules/sys_stat (Depends-on): Likewise. * modules/tempname (Depends-on): Likewise. * modules/threads-h (Depends-on): Likewise. * modules/time_r (Depends-on): Likewise. * modules/time_rz (Depends-on): Likewise. * modules/timegm (Depends-on): Likewise. * modules/timespec (Depends-on): Likewise. * modules/timespec_get (Depends-on): Likewise. * modules/timespec_getres (Depends-on): Likewise. * modules/tzset (Depends-on): Likewise. * modules/usleep-tests (Depends-on): Likewise. * modules/utime (Depends-on): Likewise. * modules/utimecmp (Depends-on): Likewise. * modules/utimens (Depends-on): Likewise. * modules/windows-cond (Depends-on): Likewise. * modules/windows-timedmutex (Depends-on): Likewise. * modules/windows-timedrecmutex (Depends-on): Likewise. * modules/windows-timedrwlock (Depends-on): Likewise. * modules/xnanosleep (Depends-on): Likewise. * doc/posix-headers/time.texi: Update. * NEWS: Mention the change.
* nullptr: rename from c-nullptrPaul Eggert2023-02-071-0/+2
| | | | | | | | | | * NEWS, doc/gnulib.texi: Mention this. * m4/nullptr.m4: Rename from m4/c-nullptr.m4. (gl_NULLPTR): Rename from gl_C_NULLPTR. * modules/nullptr: Rename from modules/nullptr. * modules/nullptr-c++-tests: Rename from modules/c-nullptr-c++-tests. * modules/nullptr-tests: Rename from modules/c-nullptr-tests. All uses changed.
* Update NEWS.Bruno Haible2023-01-301-0/+7
| | | | * NEWS: Update for qcopy-acl change on 2023-01-13.
* getprogname: Move declaration from "getprogname.h" to <stdlib.h>.Bruno Haible2023-01-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib/stdlib.in.h (getprogname): New declaration. * lib/getprogname.h: Add deprecation warning. (getprogname): Remove declaration. * lib/getprogname.c: Include <stdlib.h> instead of getprogname.h. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared. (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME. (gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME. * m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME. (gl_FUNC_GETPROGNAME): Remove code that was moved to gl_PREREQ_GETPROGNAME. * modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and HAVE_GETPROGNAME. * modules/getprogname (Depends-on): Add stdlib. (configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME. (Makefile.am): Don't compile getprogname.c if not needed. (Include): List <stdlib.h> instead of getprogname.h. * tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h. * NEWS: Mention the change. * lib/argmatch.c: Don't include getprogname.h. * lib/c-stack.c: Likewise. * lib/error.c: Likewise. * lib/git-merge-changelog.c: Likewise.
* alignasof: new modulePaul Eggert2023-01-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This splits off support for the C23 keywords alignas and alignof, from the now-deprecated stdalign module. The latter now merely provides C11 support. * MODULES.html.sh, NEWS, doc/gnulib.texi: * doc/posix-headers/stdalign.texi: Document the change. * lib/stdalign.in.h: Remove most of the definitions (which are now supplied by the alignasof module), leaving only __alignas_is_defined and __alignof_is_defined. * modules/alignasof, modules/alignasof-tests: New files. * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with most of the contents of the old gl_STDALIGN_H. Do not define __alignas_is_defined or __alignof_is_defined. (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work. * modules/alignalloc, modules/alignof, modules/argp: * modules/crypto/md4-buffer, modules/crypto/md5-buffer: * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer: * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer: * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/stddef-tests, modules/sys_socket: Depend on alignasof, not stdalign. * modules/stdalign: Deprecate. Depend on alignasof. * modules/stdalign-tests: Move most contents to the new module alignasof-tests, and depend on that.
* timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB. All uses changed. * NEWS: Mention the change
* setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. All uses changed. * NEWS: Mention the change
* setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB. All uses changed. * NEWS: Mention the change.
* select: Rename LIB_SELECT to SELECT_LIB.Bruno Haible2023-01-071-0/+2
| | | | | | * m4/select.m4: Rename LIB_SELECT to SELECT_LIB. All uses changed. * NEWS: Mention the change.
* sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB. All uses changed. * NEWS: Mention the change.
* pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | | * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB. All uses changed. * NEWS: Mention the change.
* posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB. All uses changed. * NEWS: Mention the change.
* poll: Rename LIB_POLL to POLL_LIB.Bruno Haible2023-01-071-0/+2
| | | | | | * m4/poll.m4: Rename LIB_POLL to POLL_LIB. All uses changed. * NEWS: Mention the change.
* nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB. All uses changed. * NEWS: Mention the change.
* mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.Bruno Haible2023-01-071-0/+2
| | | | | | * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB. All uses changed. * NEWS: Mention the change.
* hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | | * modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB. All uses changed. * NEWS: Mention the change.
* getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB. All uses changed. * NEWS: Mention the change.
* getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB. All uses changed. * NEWS: Mention the change.
* gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB. All uses changed. * NEWS: Mention the change.
* fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB. All uses changed. * NEWS: Mention the change.
* euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN. All uses changed. * NEWS: Mention the change.
* duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB. All uses changed. * NEWS: Mention the change.
* clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.Bruno Haible2023-01-071-0/+3
| | | | | | * m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB. All uses changed. * NEWS: Mention the change.
* file-has-acl: don’t bother setting LIB_HAS_ACLPaul Eggert2023-01-061-0/+2
| | | | | * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Don’t set LIB_HAS_ACL. I think only Coreutils and Tar used it, and I’ve updated them.
* largefile: sync from Autoconf masterPaul Eggert2022-12-251-0/+5
| | | | | | | | | | | | | | | | | | * 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/+3
| | | | | | | 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/+3
| | | | | | | | 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.
* dynarray: Rename to glibc-internal/dynarray.Bruno Haible2022-11-031-0/+4
| | | | | | | | * 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: Document last change.Bruno Haible2022-11-031-0/+2
| | | | * NEWS: Mention last change.
* stdbool: upgrade from C99 to C23Paul Eggert2022-09-101-0/+4
| | | | | | | | | | | 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.
* bootstrap: Obey another environment variable GNULIB_REFDIR.Bruno Haible2022-07-241-0/+6
| | | | | | | | | | | * build-aux/bootstrap (usage): Document option --gnulib-refdir and environment variable GNULIB_REFDIR. Accept option --gnulib-refdir. When GNULIB_SRCDIR is specified, verify that it denotes a directory. Use $GNULIB_REFDIR, not $GNULIB_SRCDIR, as argument to git's --reference option. Improve an error message. * NEWS: Mention the change.
* NEWS: Document Automake 1.14 requirement here too.Ben Pfaff2022-03-131-0/+2
| | | | | It had been documented there before for the Automake 1.11 requirement. * NEWS: Mention the change.
* fts: revert change to use AT_NO_AUTOMOUNTPaul Eggert2022-03-101-2/+1
| | | | | | * NEWS: Don’t mention AT_NO_AUTOMOUNT. * lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as it has no effect with fstatat.
* statat: now obsoletePaul Eggert2022-03-091-0/+3
| | | | | | | | | * lib/openat.h (statat, lstatat): Now deprecated. All uses removed, and replaced with fstatat. * modules/statat: Mark as obsolete, because it’s confusing: it’s not clear whether it should use AT_NO_AUTOMOUNT, which is implied by stat and by lstat, but not by fstatat. * tests/test-statat.c: Disable deprecated-declarations warnings.
* stack: also update stack_size to return idx_tPaul Eggert2022-01-051-0/+3
| | | | * lib/stack.h (_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
* base32, base64: prefer signed to unsigned integersPaul Eggert2021-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h. Include intprops.h, verify.h. * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8) (base32_decode_ctx, base32_decode_alloc_ctx): * lib/base32.h (struct base32_decode_context): * lib/base64.c (base64_encode_fast, base64_encode) (base64_encode_alloc, get_4, decode_4, base64_decode_ctx) (base64_decode_alloc_ctx): * lib/base64.h (struct base64_decode_context): * tests/test-base32.c (main): * tests/test-base64.c (main): Prefer signed to unsigned integers. * lib/base32.c (base32_encode_alloc): * lib/base64.c (base64_encode_alloc): Use simpler and more-direct check for overflow, removing a TODO. * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h. * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
* gnulib-common: update for C2x 2020-12-11 draftPaul Eggert2021-07-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use blessed-by-draft-standard way to test for [[__deprecated__]] etc.; this is supported by GCC 11 and the fallback code should work fine with GCC 10 and earlier, clang, etc. * NEWS, doc/attribute.texi: Mention that DEPRECATED etc. must now come first. * lib/fflush.c, lib/unistr.in.h: Do not include unused-parameter.h. All uses of _GL_UNUSED_PARAMETER (after parameters) replaced by _GL_ATTRIBUTE_MAYBE_UNUSED (before parameters). Although perhaps we need a shorter name for _GL_ATTRIBUTE_MAYBE_UNUSED, that should probably be in gnulib-common.m4, due to the ubiquity of this issue. And perhaps the snippet/unused-parameter module should be marked obsolete since it's no longer compatible with its old use. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro _GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in deciding whether to use C2x attributes like [[__deprecated__]]. (_GL_ATTRIBUTE_MAYBE_UNUSED): Fall back on _GL_ATTRIBUTE_UNUSED. (_GL_ATTRIBUTE_UNUSED): New macro, for labels where C2x [[maybe_unused]] do not work. (_GL_UNUSED, _GL_UNUSED_LABEL): Use it. * modules/fflush, modules/unistr/base (Depends-on): Remove snippet/unused-parameter. * modules/fflush (selinux/selinux.h, selinux/context.h) (selinux/label.h): Do not use $(UNUSED_PARAMETER). Remove useless chmod a-x.
* year2038: support glibc 2.34 _TIME_BITS=64Paul Eggert2021-07-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit, defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit. Apps must define both macros. Gnulib applications that use either the largefile or the year2038 modules will want this behavior; largefile because it deals with the off_t and ino_t components of struct stat already, and so should also deal with time_t. * NEWS, doc/largefile.texi, doc/posix-headers/time.texi: Mention this. * m4/largefile.m4: Override two macros even in Autoconf 2.70 and later. (_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in case some other Gnulib macro has #defined it. (AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs. Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64. * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro. (gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this macro is designed to be used directly instead of being AC_REQUIREd. It takes an argument specifying whether 64-bit is required. Set _TIME_BITS=64 if this makes a difference in time_t width when setting _FILE_OFFSET_BITS=64. Do not warn about 32-bit time_t more than once. * modules/largefile (Files): Add year2038.m4. (Depends-on): Require gl_YEAR2038_EARLY.
* gnulib-tool: Stop doing license notice replacements.Bruno Haible2021-06-041-0/+6
| | | | | | | | | | | * gnulib-tool: Don't document --more-symlinks and --more-hardlinks any more. (do_copyrights): Remove variable. (func_import): Don't perform license updates on imported files any more. * pygnulib/GLInfo.py: Don't document --more-symlinks any more. * doc/gnulib-intro.texi (Copyright): Document the new situation. * doc/gnulib.texi (Module description): Likewise. * NEWS: Mention the change.
* fatal-signal: Remove dependency upon xalloc.Bruno Haible2021-03-221-0/+3
| | | | | | | | | | | | | | | * lib/fatal-signal.h (at_fatal_signal): Change return type to 'int'. * lib/fatal-signal.c: Don't include xalloc.h. (at_fatal_signal): Return an error indicator. * modules/fatal-signal (Depends-on): Remove xalloc. * NEWS: Mention the change. * lib/term-style-control.c: Include xalloc.h. (ensure_other_signal_handlers): Test return value of at_fatal_signal. * lib/clean-temp.c (do_init_clean_temp): Likewise. * lib/wait-process.c (register_slave_subprocess): Likewise. * modules/term-style-control (Depends-on): Add xalloc-die. * modules/clean-temp (Depends-on): Likewise. * modules/wait-process (Depends-on): Likewise.
* diacrit: removePaul Eggert2021-03-211-0/+2
| | | | | * MODULES.html.sh (func_all_modules), NEWS: Remove diacrit. * lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
* Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE.Bruno Haible2021-03-071-0/+4
| | | | | | | | | | * lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * lib/wcwidth.c: Likewise. * tests/test-wcwidth.c: Likewise. * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * NEWS: Document the change.
* parse-datetime2: new modulePaul Eggert2021-03-011-0/+5
| | | | | | | | | | | | | | | | | | | | This splits the old parse-datetime into two parts; the first is parse-datetime2 which supports all the new bells and whistles, the second is parse-datetime, which reverts to its original intent. This avoids some bogus diagnostics when build GNU Tar with gcc -flto -fanalyze and with --enable-gcc-warnings. And it slims down the executable a bit. * NEWS: Mention this. * lib/parse-datetime.y (parser_control) [!GNULIB_PARSE_DATETIME2]: Omit parse_datetime_debug member. (debugging): New function. Use it everywhere the old code would load parse_datetime_debug. (parse_datetime_body): New static function, with the body of the old parse_datetime2. Set pc.parse_datetime_debug only if GNULIB_PARSE_DATETIME2. (parse_datetime2, parse_datetime): Use this new function. (parse_datetime2) [!GNULIB_PARSE_DATETIME2]: Remove.
* Don't execute scripts without '#!' marker through /bin/sh.Bruno Haible2020-12-241-0/+7
| | | | | | | | | | | | | This reflects the change done in glibc through <https://sourceware.org/bugzilla/show_bug.cgi?id=13134> and <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d96de9634a334af16c0ac711074c15ac1762b23c>. * lib/spawni.c (internal_function): Remove macro. (script_execute): Remove function. (__spawni): Don't invoke script_execute. * lib/execute.c (execute): Disable the ENOEXEC handling. * lib/spawn-pipe.c (create_pipe): Likewise. * NEWS: Mention the change.
* free-posix: New module, renamed from 'free'.Bruno Haible2020-12-191-0/+2
| | | | | | | | | | | | | | | * modules/free-posix: Renamed from modules/free. (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX, not GNULIB_FREE. * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not GNULIB_FREE. * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE. * doc/posix-functions/free.texi: Mention the module 'free-posix' and what it does. * NEWS: Mention that module 'free' no longer exists. * modules/canonicalize (Depends-on): Add free-posix. Remove free. * modules/canonicalize-lgpl (Depends-on): Likewise.
* findprog-in: Allow overriding the current directory.Bruno Haible2020-12-141-0/+5
| | | | | | | | | * lib/findprog.h (find_in_given_path): Add directory argument. * lib/findprog-in.c (find_in_given_path): Likewise. * lib/execute.c (execute): Update caller. * lib/spawn-pipe.c (create_pipe): Likewise. * lib/windows-spawn.c (spawnpvech): Likewise. * NEWS: Mention the change.
* sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.Bruno Haible2020-12-121-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/sh-quote.h (shell_quote_argv): Does not need write access to the elements of argv. * lib/sh-quote.c (shell_quote_argv): Likewise. * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and the return type. * lib/windows-spawn.c (prepare_spawn): Likewise. * lib/os2-spawn.h (prepare_spawn): Likewise. * lib/os2-spawn.c (prepare_spawn): Likewise. * lib/execute.h (execute): Does not need write access to the elements of prog_argv. * lib/execute.c (execute): Likewise. * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi): Likewise. * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in, create_pipe_out): Likewise. * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create): Likewise. * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise. * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise. * lib/javaexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/javaexec.c (execute_java_class): Update variable types and remove casts to 'char *'. * lib/csharpexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update variable types and remove casts to 'char *'. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present, is_jikes_present): Update variable types and remove casts to 'char *'. * lib/javaversion.c (execute_and_read_line): Does not need write access to the elements of prog_argv. * lib/csharpcomp.c (compile_csharp_using_mono, compile_csharp_using_sscli): Update variable types and remove casts to 'char *'. * tests/test-sh-quote.c (main): Update variable types and remove casts to 'char *'. * tests/test-execute-main.c (main): Update variable types and remove casts to 'char *'. * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and remove casts to 'char *'. * NEWS: Mention the changes.