summaryrefslogtreecommitdiff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* spawn-pipe: Allow caller to specify directory for the subprocess.Bruno Haible2020-12-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi): Add directory argument. * lib/spawn-pipe.c: Include canonicalize.h, filename.h, findprog.h. (create_pipe): Add directory argument. If specified, resolve the program file name and make it absolute, first. Pass the directory to spawnpvech and posix_spawn_file_actions_addchdir. (create_pipe_bidi, create_pipe_in, create_pipe_out): Add directory argument. * modules/spawn-pipe (Depends-on): Add canonicalize, filename, findprog-in, posix_spawn, posix_spawn_file_actions_addchdir. * tests/test-spawn-pipe-main.c (test_pipe): Update. * NEWS: Mention the change. * lib/csharpcomp.c (compile_csharp_using_mono, compile_csharp_using_sscli): Update. * lib/javacomp.c (is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present, is_gcj_43): Update. * lib/javaversion.c (execute_and_read_line): Update. * lib/pipe-filter-gi.c (pipe_filter_gi_create): Update. * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Update.
* execute: Allow caller to specify directory for the subprocess.Bruno Haible2020-12-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | * lib/execute.h (execute): Add directory argument. * lib/execute.c: Include canonicalize.h, filename.h, findprog.h. (execute): Add directory argument. If specified, resolve the program file name and make it absolute, first. Pass the directory to spawnpvech and posix_spawn_file_actions_addchdir. * modules/execute (Depends-on): Add canonicalize, filename, findprog-in, posix_spawn, posix_spawn_file_actions_addchdir. * tests/test-execute-main.c: Add test for passing a directory. * tests/test-execute-child.c: Likewise. * tests/test-execute.sh: Update. * modules/execute-tests (Depends-on): Add mkdir. * NEWS: Mention the change. * lib/csharpcomp.c (compile_csharp_using_sscli): Update. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_javac_present, is_jikes_present): Update. * lib/javaexec.c (execute_java_class): Update.
* hash: Rename hash_delete to hash_remove.Bruno Haible2020-10-171-0/+4
| | | | | | | | | | * lib/hash.h (hash_remove): Renamed from hash_delete. (hash_delete): New declaration. * lib/hash.c (hash_remove): Renamed from hash_delete. (hash_delete): New function. * tests/test-hash.c (main): Update. * lib/fts-cycle.c (leave_dir): Likewise. * NEWS: Mention the change.
* diffseq: new option NOTE_ORDEREDPaul Eggert2020-08-241-0/+5
| | | | | | | | | Problem reported by Phil Sainty <https://bugs.gnu.org/42931>. * NEWS: Mention this. * lib/diffseq.h (NOTE_ORDERED): New macro. (IF_LINT2): Remove; no longer needed. (compareseq): If (!NOTE_ORDERED), recurse on the smaller subproblem and iterate to do the larger.
* Assume autoconf >= 2.64.Bruno Haible2020-08-161-0/+2
| | | | | | | | | | | | | | | | | | | | * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64. * DEPENDENCIES: Require Autoconf 2.64 or newer. * NEWS: Mention the changed requirement. * m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros. * m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros. * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed variables. * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise. * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise. * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise. (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++), gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)): Likewise. * m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly. * m4/libunistring.m4 (gl_LIBUNISTRING): Likewise. * m4/configmake.m4: Update comment.
* libtextstyle[-optional]: Allow requesting a minimum version.Bruno Haible2020-08-011-0/+9
| | | | | | | | | | | | * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Allow an optional argument. (gl_LIBTEXTSTYLE_NEWEST_VERSION, gl_LIBTEXTSTYLE_INITIALIZE, gl_LIBTEXTSTYLE_SEARCH): New macros. * modules/libtextstyle (configure.ac): Don't invoke gl_LIBTEXTSTYLE. * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Allow an optional argument. Invoke, not require, gl_LIBTEXTSTYLE. * modules/libtextstyle-optional (configure.ac): Don't invoke gl_LIBTEXTSTYLE_OPTIONAL. * NEWS: Mention the changes.
* clean-temp: Don't force deletion of temporary files on native Windows.Bruno Haible2020-06-281-0/+4
| | | | | | | | * lib/clean-temp.h (open_temp, fopen_temp): Add delete_on_close argument. * lib/clean-temp.c (open_temp, fopen_temp): Likewise. * NEWS: Mention the change. * lib/javacomp.c (write_temp_file): Update.
* tempname et al.: Fix link errors on MSVC (regression from 2020-05-31).Bruno Haible2020-06-271-0/+13
| | | | | | | | | | | | | | | | | * modules/tempname (Link): New section. * modules/mkdtemp (Link): Likewise. * modules/clean-temp (Link): Likewise. * modules/mkstemp (Link): Likewise. * modules/stdlib-safer (Link): Likewise. * modules/mkstemps (Link): Likewise. * modules/mkostemp (Link): Likewise. * modules/mkostemps (Link): Likewise. * modules/tmpfile (Link): Likewise. * modules/tmpfile-safer (Link): Likewise. * modules/javacomp (Link): Add $(LIB_GETRANDOM). * modules/argv-iter-tests (Makefile.am): Link test-argv-iter with $(LIB_GETRANDOM). * NEWS: Mention the changes.
* read-file: add flags to modify reading behaviorDaiki Ueno2020-05-271-0/+5
| | | | | | | | | | | * lib/read-file.h (RF_BINARY): New define. (fread_file, read_file): Take FLAGS argument. (read_binary_file): Remove. * lib/read-file.c (internal_read_file): Merge into ... (read_file): ... here. * modules/read-file-tests (Files): Add "tests/macros.h". * tests/test-read-file.c (main): Refactor using ASSERT macro. * NEWS: Mention this change.
* getdate: Remove deprecated module.Bruno Haible2020-04-281-0/+7
| | | | | | | * modules/getdate: Remove file. * doc/getdate.texi: Remove file. * lib/getdate.h: Remove file. * NEWS: Mention the removal.
* realloc: Remove deprecated module.Bruno Haible2020-04-281-0/+3
| | | | | * modules/realloc: Remove file. * NEWS: Mention the removal.
* calloc: Remove deprecated module.Bruno Haible2020-04-281-0/+3
| | | | | * modules/calloc: Remove file. * NEWS: Mention the removal.
* malloc: Remove deprecated module.Bruno Haible2020-04-281-0/+3
| | | | | * modules/malloc: Remove file. * NEWS: Mention the removal.
* fnmatch-posix: Remove deprecated module.Bruno Haible2020-04-281-0/+3
| | | | | | * modules/fnmatch-posix: Remove file. * MODULES.html.sh (Enhancements for POSIX:2008 functions): Update. * NEWS: Mention the removal.
* pipe: Remove deprecated module.Bruno Haible2020-04-281-0/+6
| | | | | | * modules/pipe: Remove file. * lib/pipe.h: Remove file. * NEWS: Mention the removal.
* getopt: Remove deprecated module.Bruno Haible2020-04-281-0/+5
| | | | | * modules/getopt: Remove file. * NEWS: Mention the removal.
* remove-dest-slash: Remove deprecated module.Bruno Haible2020-04-281-0/+3
| | | | | | | * modules/rename-dest-slash: Remove file. * MODULES.html.sh (Compatibility checks for POSIX:2008 functions): Update. * NEWS: Mention the removal.
* unictype/bidicategory-*: Remove deprecated modules.Bruno Haible2020-04-281-0/+3
| | | | | | | | | | * modules/unictype/bidicategory-all: Remove file. * modules/unictype/bidicategory-byname: Remove file. * modules/unictype/bidicategory-name: Remove file. * modules/unictype/bidicategory-of: Remove file. * modules/unictype/bidicategory-test: Remove file. * MODULES.html.sh (Unicode string functions): Update. * NEWS: Mention the removals.
* dosname: Change IS_RELATIVE_FILE_NAME.Bruno Haible2020-03-281-0/+3
| | | | | | * lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS, change the definition so that IS_RELATIVE_FILE_NAME("c:") is false. * NEWS: Mention the change.
* filename: Copy some definitions from module 'dosname'.Bruno Haible2020-03-281-0/+5
| | | | | | | | | | | | | | | | | * lib/filename.h: Include <string.h>, for IS_FILE_NAME_WITH_DIR. (HAS_DEVICE): Document macro. (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New macro. (IS_ABSOLUTE_FILE_NAME): Consider FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE. (IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR): New macros. (IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Define as deprecated aliases. * lib/relocatable.c (IS_FILE_NAME_WITH_DIR): Renamed from IS_PATH_WITH_DIR. (DllMain): Update. * lib/progreloc.c (IS_FILE_NAME_WITH_DIR): Renamed from IS_PATH_WITH_DIR. (find_executable): Update. * NEWS: Document the deprecations.
* Update NEWS.Bruno Haible2020-02-221-0/+10
| | | | * NEWS: Mention the last change.
* fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinksPaul Eggert2020-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that they act like chmod on non-symlinks. * NEWS: * doc/glibc-functions/lchmod.texi (lchmod): * doc/posix-functions/fchmodat.texi (fchmodat): Mention this. * lib/fchmodat.c: Define __need_system_sys_stat_h before including config.h, and undef it after including sys/stat.h the first time. Include fcntl.h, stdio.h, unistd.h, intprops.h, and include sys/stat.h a second time after defining orig_fchmodat. (orig_fchmodat) [HAVE_FCHMODAT]: New function. (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug. * lib/lchmod.c: New file. * lib/sys_stat.in.h (fchmodat, lchmod): Support replacing these functions. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists, test that AT_SYMLINK_NOFOLLOW works on non-symlinks. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat. Test that lchmod works on non-symlinks. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0. * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd. (Depends-on, configure.ac): Check REPLACE_FCHMODAT too. * modules/lchmod (Files): Add lib/lchmod.c. (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd. (configure.ac): Compile lchmod.c if needed. (lib_SOURCES): Add lchmod.c. * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT and REPLACE_LCHMOD. * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h. (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
* crypto/gc-pbkdf2: New module.Simon Josefsson2020-01-151-0/+2
| | | | | | | | | | | * MODULES.html.sh (func_all_modules): Add gc-pbkdf2. * NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2. * lib/gc-pbkdf2.c: New file. * lib/gc-pbkdf2-sha1.c: Use new interface. * lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add. * modules/crypto/gc-pbkdf2: New file. * modules/crypto/gc-pbkdf2-tests: New file. * tests/test-gc-pbkdf2.c: New file.
* dfa: prefer ptrdiff_t for API, tooPaul Eggert2019-12-121-0/+2
| | | | | | | | | | | | | Also, use ‘idx_t’ for ptrdiff_t values that must be nonnegative, but do this only for internal use for now. * NEWS: Mention the API change. * lib/dfa.c (idx_t, IDX_MAX): New type and max value, for internal use for now. Use them instead of ptrdiff_t and PTRDIFF_MAX for values known to be nonnegative. (dfaparse, dfaexec_mb, dfaexec_sb, dfaexec_noop, dfaexec): Prefer idx_t or ptrdiff_t to size_t for API. * lib/dfa.h (dfaparse, dfacomp, dfaexec): Prefer ptrdiff_t to size_t for API.
* dfa: update commentary for previous changePaul Eggert2019-12-111-0/+4
| | | | | * NEWS: Mention the change. * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments.
* doc: Document that ISO C or POSIX substitutes are supported in C++ mode.Bruno Haible2019-12-111-0/+6
| | | | | | * doc/gnulib-intro.texi (Various Kinds of Modules): Document that ISO C and POSIX substitutes are supported in C++ mode. * NEWS: Likewise.
* Reword NEWS entry.Bruno Haible2019-12-071-9/+8
| | | | * NEWS: Reword the latest NEWS entry.
* Move xstrtol_fatal to a new xstrtol-error modulePino Toscano2019-12-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The xstrtol module provides a xstrtol_fatal function which uses other modules suitable mostly for command line handling (e.g. gettext, getopt), and that are completely unused when using only xstrto* functions. Furthermore, xstrtol_fatal is used only in the xstrtol-tests (within gnulib itself). As solution, move the xstrtol_fatal to a new xstrtol-error module, making xstrtol-tests depend on it. Since the prototype of xstrtol_fatal is automatically provided by xstrtol.h, it is very difficult to know whether anyone is actually using it, so add a note about this in NEWS. * lib/xstrtol.h: Stop including <getopt.h>. (xstrtol_fatal): Move ... * lib/xstrtol-error.h: ... here. New file. * lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h. * tests/test-xstrtol.c: Likewise. * modules/xstrtol (Files): Remove lib/xstrtol-error.c. (Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h. (Makefile.am): Remove xstrtol-error.c from lib_SOURCES. * modules/xstrtol-error: New file. * modules/xstrtol-tests (Depends-on): Add xstrtol-error. * MODULES.html.sh: Add xstrtol-error. * NEWS: Document the change.
* verify: remove verify_truePaul Eggert2019-05-091-0/+2
| | | | | | * NEWS: Mention this. * lib/verify.h (verify_true): Remove. * tests/test-verify.c (item): Test verify_expr, not verify_true.
* fatal-signal: Pass the signal number to the action.Bruno Haible2019-03-161-0/+3
| | | | | | | | | | | | * lib/fatal-signal.h (at_fatal_signal): Change the signature. * lib/fatal-signal.c (action_t): Take the signal number as parameter. (fatal_signal_handler): Pass the signal number to the action. * lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the signal number as parameter. (create_temp_dir): Update. * lib/wait-process.c (cleanup_slaves_action): New function. (register_slave_subprocess): Update at_fatal_signal invocation. * NEWS: Mention the change.
* gnulib-tool: Improve handling of multiple --local-dir options.Bruno Haible2019-02-141-0/+4
| | | | | | | | | | | | | | | | | * doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir options work. * gnulib-tool (func_path_prepend): Remove function. (func_path_foreach): Make IFS handling more robust. (local_gnulib_path): Collect --local-dir values using func_path_append, not func_path_prepend. (func_determine_path_separator): Make IFS handling more robust. (func_lookup_file_cb): New function. (func_lookup_file): Rewritten to use func_lookup_file_cb instead of func_lookup_local_file. Apply the patches in the reverse order of their origin in $local_gnulib_path. (func_count_relative_local_gnulib_path): Make IFS handling more robust. * NEWS: Mention that the first --local-dir option is the one with highest priority.
* dtoastr,ftoastr,ldtoastr: port to c-strtod changesPaul Eggert2019-02-021-0/+4
| | | | | | | | | | | | | | | Decouple these modules from c-strtod. Nowadays it’s reasonable to assume the C99 signatures for strtod and strtold. Programs that require stricter adherence to C99 should also use the strtod and strtold modules as needed, and we no longer need the HAVE_C99_STRTOLD macro. * NEWS: Mention this. * lib/ftoastr.c (STRTOF) [LENGTH == 3]: Assume strtold. * m4/c-strtod.m4 (gl_C_STRTOLD): Do not define HAVE_C99_STRTOLD. * modules/dtoastr, modules/ftoastr, modules/ldtoastr: (Files): Remove m4/c-strtod.m4. (configure.ac): Do not require gl_C99_STRTOLD, which no longer exists.
* diacrit: Mark deprecated.Bruno Haible2019-01-211-0/+3
| | | | | * modules/diacrit (Status, Notice): Mark as deprecated. * NEWS: Mention it.
* Clarify meaning of 'Link' section in module description.Bruno Haible2019-01-041-0/+4
| | | | | | * doc/gnulib.texi (Module description): Clarify the meaning of the 'Link' section versus the one of the dependencies. * NEWS: Mention the change.
* backupfile: new dir_fd argsPaul Eggert2018-10-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | New module opendirat with code taken from fts. Use this module to let backupfile use a directory file descriptor. * NEWS: Document the incompatible change. * lib/backup-find.c (find_backup_file_name): * lib/backup-rename.c (backup_file_rename): New arg DIR_FD. * lib/backupfile.c: Include stdint.h, for SIZE_MAX. (SIZE_MAX): Remove. Include opendirat.h rather than dirent--.h. (check_extension): New args DIR_FD and BASE_MAX. All callers changed. (numbered_backup): New args DIR_FD and PNEW_FD. All callers changed. (backupfile_internal): New arg DIR_FD. All callers changed. * lib/fts.c: Include opendirat.h. (opendirat): Move to opendirat.c. * lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files. * modules/backupfile (Depends-on): Remove dirfd, opendir. Add opendirat. * modules/fts (Depends-on): Remove fdopendir, openat-safer. Add opendirat.
* Mention changed minimum requirements for Automake and Autoconf.Bruno Haible2018-10-231-0/+2
| | | | * NEWS: Mention the new minimum requirements.
* getpass: Move declaration to <unistd.h>.Bruno Haible2018-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * lib/unistd.in.h (getpass): New declaration. * lib/getpass.h: Replace with a stub that just includes <unistd.h>. * m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE. Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared. (gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS. On glibc systems, don't set REPLACE_GETPASS to 1. * modules/getpass (Depends-on): Add 'unistd'. (configure.ac): Test also REPLACE_GETPASS. Define a module indicator. (Include): Specify <unistd.h> instead of "getpass.h". * modules/getpass-gnu (Depends-on): Merely depend on 'getpass'. (configure.ac): Sync with the configure.ac section of modules/getpass. (Include): Specify <unistd.h> instead of "getpass.h". * m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS, REPLACE_GETPASS. * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS, REPLACE_GETPASS. * tests/test-unistd-c++.cc: Test also the declaration of 'getpass'. * doc/glibc-functions/getpass.texi: A length limit exists also on uClibc and musl. * NEWS: Mention the change.
* hard-locale: simplify by removing hard-locale.m4Paul Eggert2018-07-171-0/+2
| | | | | | * m4/hard-locale.m4: Remove. * modules/hard-locale (Files): Remove m4/hard-locale.m4. (configure.ac): Do not call gl_HARD_LOCALE.
* renameatu: rename from renameat2Paul Eggert2018-07-051-0/+4
| | | | | | | | | | | | | | | | | | | | It's looking like Glibc will add a renameat2 function that is incompatible with Gnulib renameat2; see: https://sourceware.org/ml/libc-alpha/2018-07/msg00064.html To help avoid future confusion, rename renameat2 to something else. Use the name 'renameatu', as the Gnulib function is close to the Glibc function. Perhaps someday there will also be a renameat2 Gnulib module, which mimicks the future glibc renameat2, but that can wait as nobody seems to need such a module now. * NEWS: Mention this. * lib/renameatu.c: Rename from lib/renameat2.c. * lib/renameatu.h: Rename from lib/renameat2.h. * modules/renameat2: Rename from modules/renameatu. * modules/renameat2-tests: Rename from modules/renameat2-tests. All uses of "renameat2" in identifiers or file name changed to "renameatu", except for two instances in lib/renameatu.c that deal with the Linux kernel's renameat2 syscall.
* chdir-safer: remove this modulePaul Eggert2017-12-301-0/+3
| | | | | | | * MODULES.html.sh (func_all_modules): Remove chdir-safer. * NEWS: Document removal. * lib/chdir-safer.c, lib/chdir-safer.h, m4/afs.m4, m4/chdir-safer.m4: * modules/chdir-safer: Remove these files.
* posixtm: remove PDS_LEADING_YEARPaul Eggert2017-11-241-0/+6
| | | | | | | | | | | | | | | | | This changes the API slightly, in a hopefully-innocuous way. Without this change the code had undefined behavior when a caller specified neither PDS_LEADING_YEAR nor PDS_TRAILING_YEAR. Problem reported by Pádraig Brady in: https://lists.gnu.org/r/bug-gnulib/2017-11/msg00048.html * NEWS: Mention this. * lib/posixtm.c (posix_time_parse): Treat the absence of PDS_TRAILING_YEAR as if PDS_LEADING_YEAR were present. * lib/posixtm.h (PDS_LEADING_YEAR): Remove (actually, leave it present, but define it as zero, for compatibility with existing source code). All other PDS_* values moved up. * tests/test-posixtm.c (LY): New macro. (T): Use it. Do not expect a particular numeric encoding for PDS_CENTURY etc.
* open: support O_CLOEXECPaul Eggert2017-08-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS, doc/posix-functions/open.texi: * doc/posix-functions/openat.texi: Document this. * lib/fcntl.in.h (O_CLOEXEC): Default to a nonzero value. (GNULIB_defined_O_CLOEXEC): New symbol. * lib/open.c: Include cloexec.h. (open): Support O_CLOEXEC. * lib/openat.c: Include cloexec.h. (rpl_openat): Support O_CLOEXEC. * lib/popen-safer.c: Do not include cloexec.h. (open_noinherit): Remove. (popen_safer): Use O_CLOEXEC instead of set_cloexec_flag. * lib/save-cwd.c: Do not include cloexec.h. (save_cwd): Use O_CLOEXEC instead of set_cloexec_flag. * m4/open-cloexec.m4: New file. * m4/open.m4 (gl_FUNC_OPEN): Require gl_PREPROC_O_CLOEXEC. Replace 'open' if O_CLOEXEC is not present. * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_PREPROC_O_CLOEXEC. Replace 'openat' if O_CLOEXEC is not present. * modules/freopen (Depends-on): Depend on 'open' if replacing freopen. * modules/open (Files): Add m4/open-cloexec.m4. (Depends-on): Depend on cloexec if replacing 'open'. * modules/openat (Files): Add m4/open-cloexec.m4. (Depends-on): Depend on cloexec if replacing openat. * modules/popen-safer (Depends-on): Remove cloexec. * modules/save-cwd (Depends-on): Remove cloexec, and add fd-safer-flag and 'open'.
* Rename module 'strftime' to 'nstrftime'.Bruno Haible2017-07-241-0/+2
| | | | * NEWS: Mention the change.
* closeout: don’t close stderr when sanitizingPaul Eggert2017-05-191-0/+4
| | | | | | | * NEWS: Document this. * lib/closeout.c (__has_feature): New macro, if not already defined. (SANITIZE_ADDRESS): New constant. (close_stdout): Don’t close stderr if sanitizing addresses.
* xbinary-io: rename from xsetmodePaul Eggert2017-02-161-3/+2
| | | | | | | | | | | | | | | | | | This patch is taken from suggestions by Bruno Haible in: http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00060.html http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00061.html * lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL, not ENOTTY, when it is an inappropriate device. * lib/binary-io.h (SET_BINARY): Resurrect. * lib/xbinary-io.c: Rename from lib/xsetmode.c. (xset_binary_mode_error): Rename from xsetmode_error. * lib/xbinary-io.h: Rename from lib/xsetmode.h. (xset_binary_mode): Rename from xsetmode. All uses changed. * modules/xbinary-io: Rename from modules/xsetmode. Update file names. * tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name. * NEWS: Update to match revised behavior.
* xsetmode: new modulePaul Eggert2017-02-151-0/+4
| | | | | | | | | | | | | This is to fix a problem noted by Eric Blake. Code was using xfreopen to change files to binary mode, but this fails for stdout when in append mode. Such code should use xsetmode instead. * NEWS: Document incompatible changes to binary-io module. * lib/binary-io.c (__gl_setmode_check) [__DJGPP__ || __EMX__]: New function. * lib/binary-io.h (__gl_setmode): Rename from set_binary_mode. (set_binary_mode): New function, which also checks for tty. * lib/xsetmode.c, lib/xsetmode.h, modules/xsetmode: New files.