| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
In normal usage, clock resolution is given in seconds, but the
code was mistakenly using inverse seconds and calling it
“resolution”. Fix this, partly by renaming two identifiers.
The old names will be kept for a bit, to ease transition.
* lib/timespec.h (TIMESPEC_HZ, LOG10_TIMESPEC_HZ):
New constants, replacing TIMESPEC_RESOLUTION and
LOG10_TIMESPEC_RESOLUTION, which are now obsolescent.
All uses changed.
|
|
|
|
|
|
| |
* lib/mktime.c, lib/timegm.c [_LIBC]:
Include mktime-internal.h (a small file just for glibc)
instead of using a typedef.
|
|
|
|
|
| |
* lib/intprops.h (_GL_BINARY_OP_OVERFLOW):
Use _GL_INT_CONVERT rather than reinventing it.
|
|
|
|
| |
* tests/test-posix_spawn3.c (parent_main): Fix typo in comment.
|
|
|
|
|
|
| |
* tests/test-posix_spawn_file_actions_addchdir.c: New file.
* tests/test-posix_spawn4.c: New file.
* modules/posix_spawn_file_actions_addchdir-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Eric Blake in
<https://lists.gnu.org/archive/html/bug-findutils/2018-09/msg00007.html>.
* lib/spawn.in.h (posix_spawn_file_actions_addchdir): New declaration.
* lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_chdir' and
union member 'chdir_action'.
* lib/spawn_faction_addchdir.c: New file.
* lib/spawni.c (__spawni): Implement the spawn_do_chdir action.
* lib/spawn_faction_addclose.c: Test REPLACE_POSIX_SPAWN instead of
HAVE_WORKING_POSIX_SPAWN.
* lib/spawn_faction_adddup2.c: Likewise.
* lib/spawn_faction_addopen.c: Likewise.
* m4/posix_spawn_faction_addchdir.m4: New file.
* m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
'posix_spawn_file_actions_addchdir' is present and whether
posix_spawn_file_actions_addchdir_np exists. Define REPLACE_POSIX_SPAWN
instead of HAVE_WORKING_POSIX_SPAWN.
* m4/spawn_h.m4 (gl_SPAWN_H): Test whether
posix_spawn_file_actions_addchdir is declared.
(gl_SPAWN_H_DEFAULTS): Initialize
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
* modules/spawn (Makefile.am): Substitute
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
* modules/posix_spawn_file_actions_addchdir: New file.
* modules/posix_spawn_file_actions_addclose (Depends-on,
configure.ac): Test also REPLACE_POSIX_SPAWN.
* modules/posix_spawn_file_actions_adddup2 (Depends-on,
configure.ac): Likewise.
* modules/posix_spawn_file_actions_addopen (Depends-on,
configure.ac): Likewise.
* tests/test-spawn-c++.cc (posix_spawn_file_actions_addchdir): Check
signature.
* doc/posix-functions/posix_spawn.texi: Mention the new module.
* doc/posix-functions/posix_spawnp.texi: Likewise.
|
| |
|
|
|
|
|
|
| |
* m4/stddef_h.m4 (gl_STDDEF_H): When testing for max_align_t, test also
the value of __alignof__ (max_align_t).
* doc/posix-headers/stddef.texi: Mention the issue.
|
|
|
|
|
|
| |
* lib/fcntl.c (rpl_fcntl): For F_DUPFD_CLOEXEC, don't even try the
system fcntl.
* doc/posix-functions/fcntl.texi: Document the issue.
|
|
|
|
|
|
| |
* tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback
definition.
* modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'.
|
|
|
|
|
|
| |
* tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback
definition.
* modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.
|
|
|
|
|
| |
* tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition.
* modules/count-one-bits-tests (Depends-on): Add 'limits-h'.
|
|
|
|
|
|
|
| |
* lib/xstrtol.c: Don't include intprops.h.
(ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
* modules/xstrtol (Depends-on): Remove 'intprops'.
* modules/xstrtoll (Depends-on): Add 'limits-h'.
|
|
|
|
|
|
|
| |
* lib/strtol.c (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove macros.
(ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
* modules/strtoll (Depends-on): Add limits-h.
* modules/strtoull (Depends-on): Likewise.
|
|
|
|
|
| |
* tests/test-intprops.c (verify_stmt): New macro.
(VERIFY, main): Use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define also for
IRIX and for GCC.
(WORD_BIT, LONG_BIT): Define.
* m4/limits-h.m4 (gl_LIMITS_H): Set LIMITS_H to non-empty also when
<limits.h> does not define LLONG_MAX or WORD_BIT.
* tests/test-limits-h.c (TYPE_SIGNED, TYPE_WIDTH, TYPE_MINIMUM,
TYPE_MAXIMUM): New macros, from intprops.h.
Add tests for CHAR_BIT, WORD_BIT, LONG_BIT, <type>_MIN, and <type>_MAX.
* doc/posix-headers/limits.texi: Document what the 'limits-h' module
provides.
|
|
|
|
|
|
|
|
|
| |
Reported by Frank Busse <f.busse@imperial.ac.uk> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00018.html>.
* lib/fcntl.c (rpl_fcntl): For actions that don't take an argument,
don't consume an argument. For actions that take an 'int' argument,
consume an 'int' argument.
|
|
|
|
|
|
|
|
|
|
| |
Based on a bug report to the Cygwin list:
https://cygwin.com/ml/cygwin/2018-05/msg00321.html
* doc/posix-functions/environ.texi (environ): Assigning NULL to
environ is a glibc extension.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Reported by Antoine Luong <antoine.luong@c-s.fr> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00008.html>.
* gnulib-tool (func_import): For the tests, set a dotfirst flag.
(func_emit_lib_Makefile_am): Consider the dotfirst flag.
(func_emit_tests_Makefile_am): Don't consider the dotfirst flag.
|
|
|
|
|
|
|
|
| |
Problem reported by Alexandre Oliva in:
https://sourceware.org/bugzilla/show_bug.cgi?id=16346
* lib/mktime.c (__mktime_internal): Access *OFFSET only once,
to avoid an unlikely race if the compiler delays a load and
if this cascades into a signed integer overflow.
|
|
|
|
|
|
|
|
|
| |
* lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
Now long int, not time_t, since long int is the longstanding type
for this in glibc and there is no need to change it even if time_t
becomes 64 bits - even int would do, though this would be a change
to the glibc generated code. When this change is merged into
glibc, it should simplify the time_t vs time64_t situation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move code around to make a merge to glibc easier to audit.
This should not change behavior.
* lib/mktime.c: Include more standard files unconditionally.
(NEED_MKTIME_INTERNAL, NEED_MKTIME_WINDOWS)
(NEED_MKTIME_WORKING): Give default values to pacify -Wundef,
which glibc uses. Default NEED_MKTIME_WORKING to DEBUG_MKTIME, to
simplify later conditionals; default the others to zero. In uses
of these conditionals, explicitly spell out how _LIBC affects
things, so it’s easier to review from a glibc viewpoint.
(my_tzset, __tzset) [!_LIBC]: New function and macro, to better
compartmentalize tzset issues. Move system-dependent tzsettish
code here from mktime.
(mktime): Move tzsettish code to my_tzset, and move
localtime_offset to within mktime so that it doesn’t
need a separate ifdef.
* lib/mktime-internal.h (__gmtime_r, __localtime_r, __mktime_internal):
Move these macros here from lib/mktime.c and lib/gmtime.c.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This makes EXPR_SIGNED (e) easier to use, as it no longer
evaluates the expression E. Formerly, E was required to be free
of side effects.
* lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT)
(EXPR_SIGNED, TYPE_WIDTH, _GL_INT_MINIMUM, _GL_INT_MAXIMUM)
(_GL_SIGNED_INT_MAXIMUM): Do not evaluate the expression arg.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reported by Sergio Durigan Junior <sergiodj@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>.
Based on a patch by Paul Eggert.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation
guesses for all GNU systems.
|
| |
|
| |
|
|
|
|
|
| |
* m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro.
* m4/glob.m4 (gl_GLOB): Invoke it.
|
|
|
|
|
| |
* m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
|
|
|
|
|
| |
* m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
* m4/stdint.m4 (gl_STDINT_H): Invoke it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* lib/glob.c (_GL_ARG_NONNULL): Define to empty.
|
|
|
|
|
|
|
|
| |
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
* m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed.
* m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE.
|
|
|
|
|
|
|
|
| |
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>.
* m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro
in config.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Andy Moreton <andrewjmoreton@gmail.com> in
<https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00468.html>.
Solution proposed by Eli Zaretskii.
* lib/getaddrinfo.c (GetProcAddress): Cast result to 'void *' first.
* lib/gettimeofday.c (GetProcAddress): Likewise.
* lib/link.c (GetProcAddress): Likewise.
* lib/physmem.c (GetProcAddress): Likewise.
* lib/poll.c (GetProcAddress): Likewise.
* lib/select.c (GetProcAddress): Likewise.
* lib/stat-w32.c (GetProcAddress): Likewise.
|
|
|
|
|
|
| |
Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> again.
* lib/globfree.c: Include <libc-config.h>.
|
|
|
|
|
|
|
|
| |
Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00096.html>.
* lib/glob_pattern_p.c: Include <libc-config.h>.
* modules/glob (Depends-on): Add libc-config.
|
|
|
|
|
| |
* tests/test-scratch-buffer.c: New file.
* modules/scratch_buffer-tests: New file.
|
|
|
|
|
|
|
|
| |
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00082.html>.
* lib/scratch_buffer.h: Include <libc-config.h> first. Add
double-inclusion guard.
|
|
|
|
|
| |
* m4/glob_h.m4: Revert to previous state.
* modules/glob-h: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
This works around a problem reported by Reuben Thomas in:
http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
This workaround always builds glob.h, even on platforms that
do not need it; perhaps this could be improved someday.
* m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
is always created now.
* modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
|
| |
|
|
|
|
|
| |
* m4/monetary_h.m4 (gl_MONETARY_H): Define through AC_DEFUN_ONCE.
(gl_MONETARY_H_BODY): Inline into gl_MONETARY_H. Remove macro.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Jeroen Meijer <jjgmeijer@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
and by Paul J. Lucas <paul@lucasmail.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
* m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
(gl_FNMATCH_H_GNU): New macro.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Require gl_FNMATCH_H_GNU.
|
| |
|