| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Adhemerval Zanella in:
https://sourceware.org/pipermail/libc-alpha/2020-December/121182.html
* lib/canonicalize-lgpl.c, lib/canonicalize.c:
Include intprops.h.
(NARROW_ADDRESSES): New constant.
* lib/canonicalize-lgpl.c (realpath_stk):m
* lib/canonicalize.c (canonicalize_filename_mode_stk):
Work even if strlen (END) does not fit in idx_t, or if adding
N to it overflows.
* modules/canonicalize, modules/canonicalize-lgpl (Depends-on):
Add intprops.
|
|
|
|
|
| |
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In
acl_is_expected_elfclass, use 'expr', not 'test'.
|
|
|
|
| |
* lib/ptsname_r.c (__ptsname_r): Reduce the scope of variable 'err'.
|
|
|
|
|
|
| |
* gnulib-tool (func_remove_if_blocks): New function.
(func_modules_add_dummy): Use it to eliminate all conditional statements
from the automake snippet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I misunderstood the glibc source code. Deduced from
Adhemerval Zanella’s proposed glibc patch in:
https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html
* doc/posix-functions/faccessat.texi: It is not a problem.
* lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c:
(FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed.
* lib/faccessat.c: Revert to simpler version now that
LSTAT_FOLLOWS_SLASHED_SYMLINK must be false.
* m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW):
Remove. All uses removed.
* modules/canonicalize, modules/canonicalize-lgpl (Files):
Remove m4/faccessat.m4.
|
|
|
|
|
|
| |
* lib/canonicalize-lgpl.c: Use "defined FUNC_REALPATH_WORKS" in
case preprocessor is picky. Reported by Adhemerval Zanella in:
https://sourceware.org/pipermail/libc-alpha/2020-December/121130.html
|
|
|
|
|
|
|
|
|
|
|
| |
* config/srclist.txt: Adjust accordingly.
* lib/canonicalize-lgpl.c (realpath_stk):
* lib/canonicalize.c (canonicalize_filename_mode_stk):
Simplify by using scratch_buffer_dupfree.
* lib/malloc/scratch_buffer.h (scratch_buffer_dupfree): New function.
* lib/malloc/scratch_buffer_dupfree.c: New file.
* modules/scratch_buffer (Files, Depends-on):
Add malloc/scratch_buffer_dupfree.c.
|
|
|
|
|
|
|
| |
It doesn’t seem to be needed any more; at least, I couldn’t
reproduce the circa-2013 problem. Perhaps the recent
--conditional-dependencies fixes have removed the need for it.
* m4/glibc21.m4: Remove. All uses removed.
|
|
|
|
|
|
|
|
| |
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00236.html>.
* gnulib-tool (func_emit_tests_Makefile_am): Handle conditional
dependencies like func_emit_lib_Makefile_am.
|
|
|
|
|
| |
* lib/execvpe.c: Include <stdbool.h>.
* modules/execvpe (Depends-on): Add stdbool.
|
|
|
|
|
|
| |
* tests/test-execlp-main.c: New file.
* tests/test-execlp.sh: New file.
* modules/execlp-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execlp.c: New file.
* m4/execlp.m4: New file.
* modules/execlp: New file.
* doc/posix-functions/execlp.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
| |
* tests/test-execle-main.c: New file.
* tests/test-execle.sh: New file.
* modules/execle-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execle.c: New file.
* m4/execle.m4: New file.
* modules/execle: New file.
* doc/posix-functions/execle.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
| |
* tests/test-execl-main.c: New file.
* tests/test-execl.sh: New file.
* modules/execl-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execl.c: New file.
* m4/execl.m4: New file.
* modules/execl: New file.
* doc/posix-functions/execl.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
| |
* tests/test-execv-main.c: New file.
* tests/test-execv.sh: New file.
* modules/execv-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execv.c: New file.
* m4/execv.m4: New file.
* modules/execv: New file.
* doc/posix-functions/execv.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
| |
* tests/test-execvp-main.c: New file.
* tests/test-execvp.sh: New file.
* modules/execvp-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execvp.c: New file.
* m4/execvp.m4: New file.
* modules/execvp: New file.
* doc/posix-functions/execvp.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
| |
* tests/test-execvpe-main.c: New file.
* tests/test-execvpe.sh: New file.
* modules/execvpe-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execvpe.c: New file.
* m4/execvpe.m4: New file.
* modules/execvpe: New file.
* doc/glibc-functions/execvpe.texi: Mention the Windows problems and the
new module.
|
|
|
|
|
|
|
| |
* tests/test-exec-child.c: New file.
* tests/test-execve-main.c: New file.
* tests/test-execve.sh: New file.
* modules/execve-tests: New file.
|
|
|
|
|
|
|
|
| |
* lib/execve.c: New file.
* m4/execve.m4: New file.
* modules/execve: New file.
* doc/posix-functions/execve.texi: Mention more Windows problems and the
new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp,
execvpe): Add declarations for the new modules.
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp,
execv, execve, execvp, execvpe are declared.
(gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE,
REPLACE_EXEC*.
* modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE,
REPLACE_EXEC*.
* tests/test-unistd-c++.cc: Check the signature of execl, execle,
execlp, execv, execve, execvp, execvpe.
|
|
|
|
| |
* lib/stack.h: Fix typo in comments.
|
|
|
|
| |
* lib/bitset/base.h: Include <stdlib.h>.
|
|
|
|
|
|
| |
* lib/idx.h: Change license notice to match what should be in glibc.
gnulib-tool will change it as appropriate anyway, so this is just
to simplify syncing with glibc.
|
|
|
|
| |
* MODULES.html.sh (func_all_modules): Do s/free/free-posix/.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_stat.in.h (mkdir): Conditionalize through GNULIB_MKDIR and
GNULIB_MDA_MKDIR. Also support GNULIB_POSIXCHECK.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_MKDIR,
GNULIB_MDA_MKDIR.
* modules/sys_stat (Makefile.am): Substitute GNULIB_MKDIR,
GNULIB_MDA_MKDIR.
* modules/mkdir (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
* doc/posix-functions/mkdir.texi: Mention also the 'sys_stat' module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/fcntl.in.h (creat, open): Conditionalize each of the Windows
oldnames workarounds through a GNULIB_MDA_<func> symbol.
* lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
* lib/search.in.h (lfind, lsearch): Likewise.
* lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
Likewise.
* lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
* lib/string.in.h (memccpy, strdup): Likewise.
* lib/sys_stat.in.h (chmod, umask): Likewise.
* lib/time.in.h (tzset): Likewise.
* lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
read, rmdir, swab, unlink, write): Likewise.
* lib/utime.in.h (utime): Likewise.
* lib/wchar.in.h (wcsdup): Likewise.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
GNULIB_MDA_<func> symbols.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
* m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
* modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
symbols.
* modules/math (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/utime-h (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pacify GCC. Some of these problems were reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2020-12/msg00217.html
* lib/canonicalize-lgpl.c, lib/canonicalize.c:
Sort shared include directives, for consistency.
(IF_LINT): New macro.
(suffix_requires_dir_check): Mark with _GL_ATTRIBUTE_PURE.
* lib/canonicalize-lgpl.c (GCC_LINT, _GL_ATTRIBUTE_PURE) [_LIBC]:
New macros.
(realpath_stk): Suppress bogus -Wmaybe-uninitialized warning.
* lib/canonicalize.c (canonicalize_filename_mode_stk):
Omit unused local. Suppress bogus -Wmaybe-uninitialized warning.
|
|
|
|
|
|
| |
* lib/spawn-pipe.c (SPAWN_PIPE_IMPL_AVOID_POSIX_SPAWN): New macro.
(create_pipe): Use it to decide among the two possible implementations.
* modules/spawn-pipe (Depends-on): Add posix_spawnattr_setpgroup.
|
|
|
|
|
| |
* lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
* modules/unistd-safer (Depends-on): Add pipe-posix.
|
|
|
|
|
| |
* lib/execute.c (EXECUTE_IMPL_AVOID_POSIX_SPAWN): New macro.
(execute): Use it to decide among the two possible implementations.
|
|
|
|
|
|
|
|
|
|
| |
This merges the changes proposed for glibc in:
https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html
https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html
* lib/canonicalize-lgpl.c: Include idx.h and filename.h
unconditionally.
(idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME)
(ISSLASH) [_LIBC]: Remove.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
close_inheritable_handles, memiszero, sigisempty, open_handle, do_open,
do_dup2, do_close): New functions.
(__spawni): Implement on native Windows.
* modules/posix_spawn-internal (Depends-on): Add filename,
concat-filename, findprog-in, malloca, windows-spawn.
* doc/posix-functions/posix_spawn.texi: Update.
* doc/posix-functions/posix_spawnp.texi: Likewise.
|
|
|
|
|
|
|
| |
* lib/windows-spawn.h (convert_CreateProcess_error): New declaration.
* lib/windows-spawn.c (convert_CreateProcess_error): New function,
extracted from spawnpvech.
(spawnpvech): Use it.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/windows-spawn.h: Include <stdbool.h>.
(struct inheritable_handles): New type.
(init_inheritable_handles, compose_handles_block,
free_inheritable_handles): New declarations.
* lib/windows-spawn.c (init_inheritable_handles, compose_handles_block):
New functions, based on spawnvech.
(free_inheritable_handles): New function.
(spawnpvech): Use them.
|
|
|
|
|
|
|
| |
* lib/windows-spawn.h (compose_envblock): New declaration.
* lib/windows-spawn.c (compose_envblock): New function, extracted from
spawnpvech.
(spawnpvech): Use it.
|
|
|
|
|
|
|
| |
* lib/windows-spawn.h (compose_command): New declaration.
* lib/windows-spawn.c (compose_command): New function, extracted from
spawnpvech.
(spawnpvech): Use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-posix_spawn-open1.c (DATA_FILENAME): Treat native Windows
like Cygwin.
* tests/test-posix_spawn-dup2-stdin.c (main): Don't assume the signals
SIGHUP and SIGPIPE. On native Windows, don't call
posix_spawnattr_setsigmask.
* tests/test-posix_spawn-dup2-stdout.c (main): Likewise.
* tests/test-posix_spawn-fchdir.c (main): Likewise.
* tests/test-posix_spawn-chdir.c (test): Likewise. Accept the child
output from Cygwin's 'pwd' program.
* tests/test-posix_spawn-script.c (main): On native Windows, skip the
executable-shell-script part of the test.
* tests/test-posix_spawnp-script.c (main): Likewise.
* modules/posix_spawn-tests (Depends-on): Add freopen, waitpid.
(configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
(Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
* modules/posix_spawnp-tests (Depends-on): Add waitpid.
(configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
(Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
* modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Don't
test the POSIX_SPAWN_PORTED conditional.
* modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
Define the POSIX_SPAWN_PORTED conditional here.
|
|
|
|
| |
* m4/sh-filename.m4 (gl_SH_FILENAME): Treat native Windows like Cygwin.
|
|
|
|
|
|
|
| |
This propagates an idea first used in canonicalize-lgpl.
* lib/careadlinkat.c (GCC_BOGUS_WRETURN_LOCAL_ADDR):
New macro.
(careadlinkat): Use it.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lib/linkat.c: Include eloop-threshold.h.
Do not include sys/param.h.
(MAXSYMLINKS): Remove.
(link_follow, linkat_follow): Use __eloop_threshold instead
of MAXSYMLINKS.
* m4/linkat.m4 (gl_FUNC_LINKAT): Omit sys/param.h check.
* modules/linkat (Depends-on): Add eloop-threshold. Sort.
|
|
|
|
|
|
| |
* lib/canonicalize-lgpl.c [!_LIBC]: Include eloop-threshold.h.
(MAXSYMLINKS, __eloop_threshold): Remove.
* modules/canonicalize-lgpl (Depends-on): Add eloop-threshold.
|
|
|
|
|
| |
* config/srclist.txt: Add a comment about it.
* lib/eloop-threshold.h, modules/eloop-threshold: New files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A proper faccessat doesn't have the EOVERFLOW problem, and can be
more efficient as it needn't gather data from the filesystem to
fill in struct stat. So use stat only if faccessat is absent,
or when checking for symlink loops in canonicalize.c.
* lib/canonicalize-lgpl.c, lib/canonicalize.c:
Include fcntl.h, for AT_EACCESS.
(FACCESSAT_NEVER_EOVERFLOWS): Default to false.
(file_accessible): New function, based on faccessat but with
a fallback to stat and with an EOVERFLOW workaround.
(dir_check): Use it.
(dir_suffix): New static constant.
* lib/canonicalize-lgpl.c (FACCESSAT_NEVER_EOVERFLOWS) [_LIBC]:
Use __ASSUME_FACCESSAT2 to set FACCESSAT_NEVER_EOVERFLOWS
(__faccessat) [!_LIBC]: Define.
(realpath_stk): Use dir_suffix now.
* lib/canonicalize.c (canonicalize_filename_mode_stk):
If logical, don't check each component's existence; just check
at the end, as that's enough.
* m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
(gl_CANONICALIZE_LGPL_SEPARATE):
Require gl_FUNC_FACCESSAT_EOVERFLOW,
gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and check for faccessat.
(gl_CANONICALIZE_LGPL_SEPARATE): Do not check for readlink,
as the code does not use HAVE_READLINK.
* modules/canonicalize, modules/canonicalize-lgpl (Files):
Add m4/faccessat.m4, m4/lstat.m4.
(Depends-on): Add fcntl-lh.
|