|
3ba4dbae
|
2017-09-08T10:02:47
|
|
stddef: Avoid conflict with system-defined max_align_t.
The configure-determined HAVE_MAX_ALIGN_T may not always be accurate.
Reported by Werner Lemberg <wl@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00185.html>.
* lib/stddef.in.h (rpl_max_align_t): Renamed from max_align_t.
(max_align_t): Define as a macro.
(GNULIB_defined_max_align_t): New macro. Guards against multiple
definitions of rpl_max_align_t in different copies of gnulib-generated
<stddef.h>.
|
|
2890b021
|
2017-09-05T23:32:59
|
|
libc-config: port to MSVC
Problems reported by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00016.html
* lib/libc-config.h (__inline): Don't define if HAVE___INLINE.
(libc_hidden_proto): Stick to Standard C syntax for varargs macro.
* m4/__inline.m4: New file.
* modules/libc-config (Files): Add it.
(Depends-on): Use it.
|
|
8ffefc19
|
2017-09-05T21:14:51
|
|
glob: Use enum for __glob_pattern_type result
From a patch proposed by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-09/msg00212.html
* lib/glob_internal.h (GLOBPAT_NONE, GLOBPAT_SPECIAL)
(GLOBPAT_BACKSLASH, GLOBPAT_BRACKET): New constants.
* lib/glob_internal.h (__glob_pattern_type):
* lib/glob.c (glob):
* lib/glob_pattern_p.c (__glob_pattern_p):
Use them.
|
|
ef5de276
|
2017-09-05T18:58:50
|
|
glob: fix for use in glibc
Problem reported by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-09/msg00213.html
* lib/glob.c (DT_UNKNOWN, DT_DIR, DT_LINK):
Do not redefine if _LIBC.
|
|
064df0b0
|
2017-09-02T15:39:16
|
|
glob: fix bugs with long login names
Problem reported by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00455.html
* lib/glob.c (GET_LOGIN_NAME_MAX): Remove.
(glob): Use the same scratch buffer for both getlogin_r and
getpwnam_r. Don’t require preallocation of the login name. This
simplifies storage allocation, and corrects the handling of
long login names.
|
|
5f7d5f2b
|
2017-09-02T13:14:00
|
|
dirent: Update doc.
* doc/posix-headers/dirent.texi: More concrete list of platforms.
|
|
5db93013
|
2017-09-02T03:56:06
|
|
glob: fix getpwnam_r errno typo
* lib/glob.c (glob): Fix longstanding misuse of errno after
getpwnam_r, which returns an error number rather than setting
errno.
|
|
ae55644a
|
2017-09-02T03:37:46
|
|
glob: fix typo in recent change
* lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
Fix recently-introduced typo.
|
|
8ac17a6a
|
2017-09-02T02:05:09
|
|
glob: don't save and restore errno unnecessarily
* lib/glob.c (glob): Don't save and restore errno
merely because we have getpwnam_r.
|
|
742b1c14
|
2017-09-02T02:00:40
|
|
glob: don't assume getpwnam_r
* lib/glob.c (glob): Port recent patches to platforms
lacking getpwnam_r.
|
|
dca11d0f
|
2017-09-02T01:21:03
|
|
scratch_buffer: don’t use private glibc API
Suggested by Florian Weimer in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00004.html
* lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
* lib/scratch_buffer_grow.c: Rename to
lib/malloc/scratch_buffer_grow.c.
* lib/scratch_buffer_grow_preserve.c: Rename to
lib/malloc/scratch_buffer_grow_preserve.c.
* lib/scratch_buffer_set_array_size.c: Rename to
lib/malloc/scratch_buffer_set_array_size.c.
* lib/scratch_buffer.h: New file.
* modules/scratch_buffer (Files, Makefile.am):
Adjust to source-file renaming.
|
|
e1e84205
|
2017-09-01T15:41:45
|
|
glob: use scratch_buffer instead of extend_alloca
Much of the lib/glob.c part of this patch comes from a glibc patch
proposed by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
* lib/glob.c: Do not include <config.h>, since <libc-config.h>,
included via glob.h, does this for us now.
(__set_errno): Remove, as libc-config does this for us now.
Include <scratch_buffer.h>.
(GETPW_R_SIZE_MAX): Remove.
(glob): Use struct scratch_buffer instead of extend_alloca.
* lib/glob.in.h: Include libc-config.h rather than
including <sys/cdefs.h> conditionally.
(__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
(__glibc_unlikely, __restrict, weak_alias):
Remove, as libc-config does this for us now.
* m4/glob.m4 (gl_PREREQ_GLOB):
Remove sys/cdefs.h tests; no longer needed.
* modules/glob (Depends-on): Add libc-config, scratch_buffer.
(glob.h): Do not replace HAVE_SYS_CDEFS_H.
|
|
3866ef61
|
2017-09-01T14:42:53
|
|
scratch_buffer: new module
* lib/scratch_buffer.h, lib/scratch_buffer_grow.c:
* lib/scratch_buffer_grow_preserve.c:
* lib/scratch_buffer_set_array_size.c:
New files, copied from glibc with very minor changes that can be
copied back.
* modules/scratch_buffer: New file.
|
|
38885c86
|
2017-09-01T14:40:58
|
|
libc-config: new module
* MODULES.html.sh: Add libc-config.
* lib/cdefs.h: New file, copied from the GNU C Library with very
minor changes that can be copied back.
* lib/libc-config.h, modules/libc-config: New files.
|
|
c8e57c1a
|
2017-08-31T14:34:24
|
|
glob, backupfile: inode 0 is a valid inode number
* doc/posix-functions/readdir.texi (readdir):
* doc/posix-headers/dirent.texi (dirent.h):
Document more readdir portability issues.
* lib/backupfile.c (REAL_DIR_ENTRY): Remove.
(numbered_backup): Don’t treat inode 0 any differently from
other inode values.
* lib/glob.c (struct readdir_result): Remove skip_entry member.
(readdir_result_skip_entry, D_INO_TO_RESULT): Remove.
All uses removed.
* modules/glob (Depends-on): Remove d-ino.
|
|
b5ec983e
|
2017-08-31T14:34:24
|
|
glob: simplify symlink detection
* lib/glob.c (dirent_type): New type. Use uint_fast8_t not
uint8_t, as C99 does not require uint8_t.
(DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]:
New macros.
(struct readdir_result): Use dirent_type. Do not define skip_entry
unless it is needed; this saves a byte on platforms lacking d_ino.
(readdir_result_type, readdir_result_skip_entry):
New functions, replacing ...
(readdir_result_might_be_symlink, readdir_result_might_be_dir):
... these functions, which were removed. This makes the callers
easier to read. All callers changed.
(D_INO_TO_RESULT): Now empty if there is no d_ino.
|
|
fd1daf4e
|
2017-08-31T14:34:25
|
|
glob: match dangling symlinks
This fixes a bug I inadvertently introduced to Gnulib when I
merged glibc glob back into gnulib on 2007-10-16. This fix is
inspired by a patch proposed for glibc by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
* doc/posix-functions/glob.texi: Update list of affected platforms.
* lib/glob.c (__lstat64): New macro.
(is_dir): New function.
(glob, glob_in_dir): Match symlinks even if they are dangling.
(link_stat, link_exists_p): Remove. All uses removed.
* lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
* m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
* modules/glob (Depends-on): Remove dirfd.
* modules/glob-tests (Depends-on): Add symlink.
* tests/test-glob.c: Include errno.h, unistd.h.
(BASE): New macro.
(main): Test dangling symlinks, if symlinks are supported.
|
|
a20922f1
|
2017-08-30T22:32:23
|
|
fts-tests: tag as a longrunning-test so not included by default
* modules/fts-tests: This test takes about 20s on current systems,
and uses about 285M of space on ext4.
|
|
58c0514f
|
2017-08-30T00:16:39
|
|
renameat2: fix compilation on alpine linux
* m4/renameat.m4: Check for <linux/fs.h> presence.
* lib/renameat2.h: Only include <linux/fs.h> if present.
Reported by Assaf Gordon on Alpine Linux.
|
|
8d116e3f
|
2017-08-24T23:51:07
|
|
glob: try to port recent changes to MS-Windows
Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00170.html
* lib/glob.c (__glob_pattern_p) [!_LIBC]: Move from here ...
* lib/glob.in.h (__glob_pattern_p): ... to here.
|
|
fa96a188
|
2017-08-24T20:28:52
|
|
warnings: fix compilation with old autoconf
Autoconf older than 2.63b (such as what ships on CentOS 6) had
a bug that any AC_DEFUN'd macro name that includes shell meta-
characters causes failure due to missing shell quoting during
aclocal's use of autom4te. We can work around the problem by
using m4_defun instead (same semantics in autom4te, but no
longer traced by aclocal, so no longer tickles the shell
quoting bug).
* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
AC_DEFUN.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
(gl_MANYWARN_ALL_GCC(C++)): Likewise.
Reported-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
a103699d
|
2017-08-24T23:49:08
|
|
* doc/gnulib-intro.texi: Add comment regarding IRIX.
|
|
6c12411d
|
2017-08-24T08:10:28
|
|
autoupdate
|
|
8e0845e2
|
2017-08-24T12:12:31
|
|
glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
* modules/glob (Depends-on): Add c99.
|
|
47c634c0
|
2017-08-24T00:46:49
|
|
glob: fix typo that broke platforms lacking d_ino
This typo also hurt performance on GNU/Linux and similar hosts.
* lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
in previous change.
|
|
d93b573b
|
2017-08-23T14:45:58
|
|
flexmember: fix typo in previous patch
* lib/flexmember.h: Fix comment typo.
|
|
32107c10
|
2017-08-23T10:45:42
|
|
glob: merge from glibc with Zanella glob changes
Merge glob from glibc, with changes for glob proposed
by Adhemerval Zanella in the thread starting here:
https://sourceware.org/ml/libc-alpha/2017-08/msg01079.html
plus some fixes for this merge.
* lib/flexmember.h: Change license wording to something that
works unchanged in Glibc, since this code might be used in
Glibc and this will minimize 'diff' output.
* lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
New files, ported from glibc.
* lib/glob_pattern_p.c, lib/globfree.c, lib/glob.c [!_LIBC]:
Include <config.h> first.
* lib/glob-libc.h (_Restrict_): Remove. All uses replaced
with __restrict.
(__size_t): Remove. All uses replaced by size_t.
(size_t): Define by defining __need_size_t and including <stddef.h>.
This should work even in non-glibc platforms, where any name
pollution is OK.
Use __USE_MISC instead of __USE_BSD || __USE_GNU.
(struct stat64): Don’t worry about __GLOB_GNULIB.
(glob, globfree, glob_pattern_p): Remove macros for
__USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
case. Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
but set errno.
* lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove. All uses
removed since the glibc behavior works on null pointers.
Do not include stdio.h; old SunOS is irrelevant now.
Do not worry about GLOB_ONLY_P as we now mimic glibc here.
Include glob_internal.h.
(D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
((POSIX || WINDOWS32) && !__GNU_LIBRARY__). The latter probably
worked only coincidentally.
(attribute_hidden, __attribute_noinline__, __glibc_unlikely):
Remove macros; now done in glob.in.h.
(size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
(glob): Properly initialize glob structure with
GLOB_BRACE|GLOB_DOOFFS (bug 20707).
Remove old code using SHELL since Bash no longer
uses this.
(glob, prefix_array): Separate MS code better.
(glob, glob_in_dir): Use C99 decls before statements when glibc
does.
(glob_in_dir): Remove old Amiga and VMS code.
(globfree, __glob_pattern_type, __glob_pattern_p): Move to
separate files.
* lib/glob.in.h (attribute_hidden, __attribute_noinline__)
(__glibc_unlikely):
Move here from glob.c.
(__restrict): New macro here, replacing the _Restrict_ in glob.c.
(weak_alias): New macro.
(__size_t): Remove. All uses replaced by size_t.
* modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
* modules/flexmember (License): Now LGPLv2+, which it should have
been anyway since flexmember.h is not unlimited-license.
* modules/glob (Files): Add +lib/glob_internal.h,
lib/glob_pattern_p.c, lib/globfree.c.
(Depends-on): Remove snippet/arg-nonnull.
|
|
f320c1eb
|
2017-08-22T10:13:50
|
|
glob: port to clang's Undefined Sanitizer
Problem reported by Tim Rühsen in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00144.html
* lib/glob.c (FLEXIBLE_ARRAY_MEMBER) [_LIBC]: Define to empty.
(glob_in_dir): Do not rely on undefined behavior in accessing
struct members beyond their bounds. Use a flexible array member
instead.
|
|
b23000de
|
2017-08-21T22:20:11
|
|
) -> } -> })
|
|
efec5175
|
2017-08-21T12:38:20
|
|
vc-list-files: port to Solaris 10
* build-aux/vc-list-files: Don't assume test -e works.
|
|
b2372a54
|
2017-08-21T08:00:44
|
|
) -> }
|
|
2c309a37
|
2017-08-21T07:57:47
|
|
autoupdate
|
|
dd76853a
|
2017-08-20T17:03:55
|
|
git-version-gen: port to Solaris 10
Problem reported by Dagobert Michelsen in:
http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html
* build-aux/git-version-gen (v_from_git):
Use expr instead of shell substitution.
|
|
ec2d7255
|
2017-08-20T01:19:50
|
|
host-cpu-c-abi: Improve detection of MIPS ABI.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of
_MIPS_SIM.
|
|
5408b0e0
|
2017-08-17T22:15:10
|
|
hypot tests: Fix test failure on FreeBSD 11.0/x86.
* tests/test-hypot.h (test_function): Declare z as 'volatile'.
|
|
02a6dd29
|
2017-08-17T21:32:28
|
|
float: Fix LDBL_MIN value on FreeBSD/x86.
* lib/float.in.h (LDBL_MIN) [__FreeBSD__]: Add more precision.
|
|
299d6d5f
|
2017-08-17T14:17:58
|
|
random: Fix test compilation failure on Cygwin 1.5.25.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
declared.
* modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
(setstate): Declare also if HAVE_DECL_SETSTATE is 0.
* doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
* doc/posix-functions/random.texi: Likewise.
* doc/posix-functions/setstate.texi: Likewise.
* doc/posix-functions/srandom.texi: Likewise.
|
|
daba2833
|
2017-08-17T01:59:11
|
|
stdnoreturn: Fix test compilation failure on Cygwin.
* m4/stdnoreturn.m4 (gl_STDNORETURN_H): On Cygwin, use gnulib's
<stdnoreturn.h> replacement.
* lib/stdnoreturn.in.h (noreturn): Treat Cygwin like MSVC.
* doc/posix-headers/stdnoreturn.texi: Mention the Cygwin problem.
|
|
b1efc4ac
|
2017-08-16T13:59:54
|
|
cloexec: spelling fixes in comments
|
|
9241177c
|
2017-08-16T20:35:42
|
|
thread: Fix conflict with pthread_sigmask module.
* lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if
it's defined as a macro.
* modules/thread (Depends-on): Add pthread_sigmask.
|
|
6980ecee
|
2017-08-16T08:34:41
|
|
rename: port better to NetBSD
* doc/posix-functions/rename.texi (rename): NetBSD 7
does not have the link-count bug.
* m4/rename.m4 (gl_FUNC_RENAME): Don’t consider NetBSD to be
broken merely because rename ("a", "b") removes "a" when the two
names are hard links to the same file.
|
|
bf9412ab
|
2017-08-16T11:25:10
|
|
iconv_open, uni*: Add support for VPATH builds with OpenBSD 'make'.
* modules/iconv_open (Makefile.am): In the rules that use gperf, prefix
the target file names with '$(srcdir)/'.
* modules/unicase/locale-language (Makefile.am): Likewise.
* modules/unicase/special-casing (Makefile.am): Likewise.
* modules/unictype/bidiclass-byname (Makefile.am): Likewise.
* modules/unictype/category-byname (Makefile.am): Likewise.
* modules/unictype/combining-class-byname (Makefile.am): Likewise.
* modules/unictype/joininggroup-byname (Makefile.am): Likewise.
* modules/unictype/joiningtype-byname (Makefile.am): Likewise.
* modules/unictype/property-byname (Makefile.am): Likewise.
* modules/unictype/scripts (Makefile.am): Likewise.
* modules/uninorm/composition (Makefile.am): Likewise.
|
|
47f5e07e
|
2017-08-16T11:04:30
|
|
nonblocking-socket tests: Fix failure on OpenBSD 6.0.
* tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE): Increase
value for OpenBSD.
|
|
60151d8e
|
2017-08-16T10:13:42
|
|
rename, renameat: Update doc regarding NetBSD.
* doc/posix-functions/rename.texi: Clarify that when using
-D_XOPEN_SOURCE=500 on NetBSD 7.0, the hard link bug is gone.
* doc/posix-functions/renameat.texi: Be more precise about NetBSD
version.
|
|
9abc0840
|
2017-08-15T17:09:35
|
|
renameat2: port better to macOS
* lib/renameat2.c (renameat2): Use renameatx_np if available.
|
|
6536b952
|
2017-08-15T16:47:22
|
|
futimens: don’t assume struct timespec layout
* m4/futimens.m4 (gl_FUNC_FUTIMENS):
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT):
* tests/test-fdutimensat.c (main):
* tests/test-futimens.h (test_futimens):
* tests/test-lutimens.h (test_lutimens):
* tests/test-utimens.h (test_utimens):
* tests/test-utimensat.c (main):
Don’t assume that struct timespec is a two-member structure in
tv_sec, tv_nsec order. Although this is true on all platforms we
know about, POSIX does not guarantee it.
|
|
9a6c7d3f
|
2017-08-15T15:53:50
|
|
rename: document+test NetBSD rename
Test failure reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00104.html
This is an area where NetBSD is better-behaved than POSIX,
so allow the NetBSD behavior in tests.
* doc/posix-functions/rename.texi:
* doc/posix-functions/renameat.texi: Document NetBSD behavior.
* tests/test-rename.h (test_rename): Allow NetBSD behavior.
|
|
13d3759b
|
2017-08-15T22:03:48
|
|
renameat: Ensure declaration in <stdio.h> on NetBSD.
* lib/stdio.in.h: Include <unistd,h> also on NetBSD.
* doc/posix-functions/renameat.texi: Mention this problem.
|
|
a1971db1
|
2017-08-15T21:18:44
|
|
duplocale: Work around NetBSD 7.0 bug.
* m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test against the NetBSD 7.0 bug.
* lib/duplocale.c: Add comment about NetBSD problem.
* doc/posix-functions/duplocale.texi: Mention the NetBSD problem.
|
|
a71158ab
|
2017-08-15T20:23:00
|
|
duplocale tests: Verify use with *_l functions.
* modules/duplocale-tests (configure.ac): Test for uselocale and
some *_l functions.
* tests/test-duplocale.c (test_with_uselocale): New function, extracted
from main.
(get_locale_dependent_values_from, test_with_locale_parameter): New
functions.
(main): Test both test_with_uselocale and test_with_locale_parameter.
|
|
e94fc417
|
2017-08-15T00:31:15
|
|
extensions: Enable NetBSD specific extensions.
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE.
|
|
0b8ab8f4
|
2017-08-15T00:48:25
|
|
open, openat: Update doc about O_CLOEXEC.
* doc/posix-functions/open.texi: More concrete list of platforms.
* doc/posix-functions/openat.texi: Likewise.
|
|
990fa9d5
|
2017-08-14T13:04:46
|
|
open: support O_CLOEXEC
* 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'.
|
|
825e198d
|
2017-08-13T11:03:40
|
|
* lib/reallocarray.c: Fix layout.
|
|
aa459ef4
|
2017-08-13T10:55:55
|
|
reallocarray: minor fixes
* doc/glibc-functions/reallocarray.texi: Update version numbers.
* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Don't trust _cv_ contents.
* modules/reallocarray (License): Change from GPL to LGPL.
* tests/test-reallocarray.c (main): Fix ENOMEM typo.
Indent properly and don't use tabs.
|
|
98756762
|
2017-08-13T10:13:33
|
|
reallocarray: New module
reallocarray is a new function in glibc 2.26 to safely allocate an array
of memory locations with integer overflow protection.
* MODULES.html.sh: Add reallocarray.
* doc/glibc-functions/reallocarray.texi: Documentation for reallocarray.
* lib/reallocarray.c: New file to implement module reallocarray.
* lib/stdlib.in.h: Add function declarations for reallocarray.
* m4/reallocarray.m4: New file.
* m4/stdlib_h.m4: Declare reallocarray.
* modules/reallocarray: New file.
* modules/reallocarray-test: New file.
* modules/stdlib: Coerce stdlib.h to export reallocarray.
* tests/test-reallocarray.c: New test.
|
|
0474f8e6
|
2017-08-12T11:34:50
|
|
dirent-safer: fix cloexec race
* lib/opendir-safer.c: Include fcntl.h instead of unistd-safer.h.
(opendir_safer): Use F_DUPFD_CLOEXEC.
* modules/dirent-safer (Depends-on): Add fcntl. Remove unistd-safer.
* tests/test-dirent-safer.c: Do not include unistd-safer.h,
as it is no longer a prerequisite. Use F_DUPFD_CLOEXEC
instead of dup_safer.
|
|
b1f55699
|
2017-08-12T11:20:41
|
|
fts: fix cloexec races
* lib/fts.c [!_LIBC]: Do not include dirent--.h, unistd--.h, cloexec.h.
(opendirat, diropen): Use O_CLOEXEC instead of set_cloexec_flag.
(fts_build): Use F_DUPD_CLOEXEC rinstad of set_cloexec_flag.
(fd_ring_check): Set cloexec flag on new file descriptors.
(fts_build, fd_ring_check): While we’re at it, make sure the
resulting file descriptor is not 0, 1, or 2, since that is easy.
* modules/fts (Depends-on): Remove cloexec, dirent-safer, dup,
fcntl-safer, unistd-safer. Add fcntl.
|
|
3fae50e0
|
2017-08-11T20:43:35
|
|
fts tests: Fix link error.
Reported by Tom G. Christensen in
https://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00078.html
* modules/fts-tests (Makefile.am): Link test-fts against LIBINTL.
|
|
8af35ddc
|
2017-08-10T06:06:06
|
|
fts: port recent changes to CentOS 6
Problem reported by Tom G. Christensen in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00064.html
* lib/fts.c (fsword): New type.
(struct dev_type, filesystem_type): Use it.
* m4/fts.m4 (gl_FUNC_FTS_CORE): Check for __fsword_t.
Also, check for f_type only if fstatfs and sys/vfs.h work.
|
|
009e65cc
|
2017-08-09T15:56:01
|
|
autoupdate
|
|
5befc656
|
2017-08-09T11:30:36
|
|
tempname: do not depend on secure_getenv
Excess dependency noted by Eli Zaretskii (Bug#28023#17).
* lib/tempname.c (__secure_getenv) [!_LIBC]: Remove; unused.
* modules/tempname (Depends-on): Remove secure_getenv.
|
|
f88e6fc6
|
2017-08-08T11:07:06
|
|
extensions: add _OPENBSD_SOURCE
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
|
|
aae6a422
|
2017-08-07T22:08:13
|
|
manywarnings: Add support for C++.
* build-aux/g++-warning.spec: New file.
* m4/manywarnings-c++.m4: New file.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that
redirects to manywarnings-c++.m4.
* modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
|
|
ddbba9b3
|
2017-08-07T17:32:18
|
|
manywarnings: Add support for C++.
* build-aux/g++-warning.spec: New file.
* m4/manywarnings-c++.m4: New file.
* modules/manywarnings (Files): Add it.
|
|
d93aa1d5
|
2017-08-06T23:24:10
|
|
git-version-gen: another fix for tags with "-"
* build-aux/git-version-gen: Improve fix for tags containing "-".
Suggested by Markus Armbruster in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00034.html
|
|
461664a6
|
2017-08-07T00:40:41
|
|
warnings, manywarnings: Add support for multiple languages, not just C.
* warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from
gl_UNKNOWN_WARNINGS_ARE_ERRORS.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to
gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG).
(gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization
of the current language. If C++ is the current language, modify
WARN_CXXFLAGS instead of WARN_CFLAGS.
* manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from
gl_MANYWARN_ALL_GCC.
(gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
|
|
cbc70020
|
2017-08-06T09:21:05
|
|
git-version-gen: port better to older Git
Work even if the hash contains more than 4 digits.
|
|
875d7469
|
2017-08-06T08:26:03
|
|
git-version-gen: Fix for tags containing '-'
Really old versions of git-describe (before v1.5.0, Feb 2007) don't
have the number of commits in their long format output, i.e. where
modern 'git describe --abbrev=4 --match="v*"' prints
"v0.1-1494-g124b9", they print "v0.1-1494-g124b9". git-version-gen
recognizes both patterns, and normalizes the old format to the new
one.
Unfortunately, this normalization code gets confused when the tag
contains '-'. Reproducer:
$ git-tag -m test v0.2-rc1
$ build-aux/git-version-gen .tarball-version; echo
build-aux/git-version-gen: WARNING: git rev-list failed
UNKNOWN
We take exact tag "v0.2-rc1" for the old format, extract the presumed
tag "v0.2" from it, then run "git rev-list v0.2..HEAD" to count
commits since tha tag. Fails, because tag "v0.2" does not exist.
* git-version-gen: We could perhaps drop support for versions from more
than a decade ago. But tightening the pattern match is easy enough,
so do that. Still breaks when you use version tags ending in something
matching -g????, but you arguably get what you deserve then.
|
|
124b93cd
|
2017-08-05T11:45:10
|
|
valgrind-tests: use ls, and cache
* m4/valgrind-tests.m4: Test ls, not bash.
Problem reported by Reuben Thomas.
Also, cache the result so that it can be overridden.
|
|
9cfe2a39
|
2017-08-04T15:14:59
|
|
manywarnings: port to 64-bit GCC builds of Emacs
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe
object size rather than hardwiring 2147483647. This is needed to
build GNU Emacs, which has one conditional (and used
only-in-theory) call to malloc with a literal greater than
2147483647.
|
|
7c6893ba
|
2017-08-04T11:57:20
|
|
Relax the license of some modules with no runtime code.
|
|
ac2fdcad
|
2017-08-03T16:28:18
|
|
renameat2: port to RHEL 7 + NFS
* lib/renameat2.c (renameat2) [SYS_renameat2]:
Port to RHEL 7 + NFS. Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00082.html
|
|
123f3ec7
|
2017-08-02T11:06:33
|
|
renameat2: port to non-renameat platforms
Problem reported for MSVC-2015 by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00001.html
* lib/renameat2.c [!HAVE_RENAMEAT]: Include <sys/stat.h> here too.
(renameat2) [!HAVE_RENAMEAT]: Fix typo in arg passing.
|
|
dbeec5dc
|
2017-08-01T09:52:40
|
|
manywarnings: port to 32-bit GCC bug
Problem reported by Pino Toscano in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00150.html
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1,
not 2**63 - 1, to work around the following GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
|
|
324b7783
|
2017-07-30T17:05:06
|
|
backupfile: new function to validate backup suffix
* lib/backupfile.c (set_simple_backup_suffix): New function.
Also, reject suffixes containing "/".
(backupfile_internal): Use it.
|
|
b2a1529e
|
2017-07-30T15:38:56
|
|
canonicalize: fix EOVERFLOW commentary
Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00147.html
* lib/canonicalize.c (canonicalize_filename_mode):
* lib/canonicalize-lgpl.c (__realpath): Fix comments.
|
|
1dc82a77
|
2017-07-30T13:06:41
|
|
Don't interpret EOVERFLOW to mean nonexistence
* lib/fts.c (fts_stat): If lstat fails, report its errno, which
may be EOVERFLOW; this is likely more useful than reporting the
stat errno.
* lib/glob.c (link_stat): Rename from link_exists2_p and
return -1/0 instead of 0/1. Caller changed.
* lib/glob.c (link_exists_p):
* lib/renameat2.c (rename_noreplace, renameat2):
* lib/tempname.c (try_nocreate):
If errno == EOVERFLOW then the directory entry exists, so do not
act as if it does not exist.
|
|
b6ac7d13
|
2017-07-30T10:53:32
|
|
backup-rename: new module
It is like backupfile, except it avoids some race conditions,
and it does not output to stderr or exit.
* MODULES.html.sh: Add backup-rename.
* lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c:
* modules/backup-rename: New files.
* lib/backupfile.c: Turn this into an internals file, which
contains code common to backupfile and backup_rename. Do not
include argmatch.h or xalloc.h: include xalloc-oversized.h.
Include renameat2.h and fcntl.h.
(BACKUP_NOMEM): New constant.
(numbered_backup): New args BASE_OFFSET and *DIRPP. Do not exit
on memory exhaustion; just return BACKUP_NOMEM. Caller changed.
(backupfile_internal): Rename from find_backup_file_name.
Support new arg RENAME.
(backup_args, backup_types, get_version, xget_version):
Move to lib/backup-find.c.
* lib/backupfile.h (backup_file_rename): New decl.
* modules/backupfile (Files): Add lib/backup-internal.h,
lib/backup-find.c.
(Depends-on): Add dirfd, fcntl, renameat2.
(lib_SOURCES): Add backup-find.c.
|
|
d274292d
|
2017-07-30T10:53:32
|
|
renameat2: port better to older Solaris
* lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
Add goto to use a label, to silence picky compilers.
|
|
f668e12f
|
2017-07-30T10:53:32
|
|
fts-tests: port to gcc -Wwrite-strings
* tests/test-fts.c (base, base_d): New static vars.
(argv, remove_tree, main): Use them.
|
|
c2dce527
|
2017-07-30T13:54:08
|
|
relocatable-lib{,-lgpl}: improve documentation
* doc/relocatable-maint.texi: Document use of relocatable-lib{,-lgpl}.
Various other updates.
|
|
1e8195cc
|
2017-07-30T13:34:44
|
|
relocatable-lib{,-lgpl}: add Valgrind suppressions
* lib/relocatable.valgrind: New file.
* modules/relocatable-lib (Files): Add relocatable.valgrind.
* modules/relocatable-lib-lgpl: Likewise.
|
|
c402c78a
|
2017-07-30T13:16:11
|
|
relocatable: Make the license on the sources the GPL.
* lib/relocatable.h, lib/relocatable.c: Change the copyright notice from
LGPL, which was a special case so that the relocatable source files
could be used without gnulib-tool, to GPL. They can still be used under
the LGPL, using the --lgpl option to gnulib-tool.
|
|
97d98703
|
2017-07-30T12:39:01
|
|
host-cpu-c-abi: Detect ILP32 ABI on IA-64 HP-UX.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Distinguish ia64-ilp32
from ia64. For arm64, test only __aarch64__, as __ARM_64BIT_STATE and
__ARM_PCS_AAPCS64 are not reliable indicators: they are not defined on
Ubuntu 14.04 (gcc 4.8.4) and Debian 8 (gcc 4.9.2).
|
|
f42d5af5
|
2017-07-27T18:02:18
|
|
faccessat: document AT_SYMLINK_NOFOLLOW issue
* doc/posix-functions/faccessat.texi: Modernize platform list.
Document AT_SYMLINK_NOFOLLOW limitation.
|
|
a6749d96
|
2017-07-27T16:36:03
|
|
renameat2: port to Solaris 10
* lib/renameat2.c (rename_noreplace): Use lstat, not faccessat
with AT_SYMLINK_NOFOLLOW (which is not portable).
(renameat): Undef before using, to avoid endless recursion when
the replacement renameat calls renameat2 which calls the
replacement renameat.
(renameat2): Use lstatat, not faccessat with AT_SYMLINK_NOFOLLOW.
* modules/renameat2 (Depends-on): Remove faccessat.
* modules/renameat-tests (test_renameat_LDADD):
* modules/renameat2-tests (test_renameat2_LDADD):
Remove $(LIB_EACCESS).
|
|
ec046e66
|
2017-07-27T12:08:39
|
|
renameat2: new module
Although the Linux syscall renameat2 is not in glibc (yet?), it is
useful to have access to its RENAME_NOREPLACE flag.
* MODULES.html.sh (func_all_modules): Add renameat2.
* lib/renameat2.c, lib/renameat2.h, modules/renameat2:
* modules/renameat2-tests, tests/test-renameat2.c: New files.
* lib/renameat.c (renameat): Move most of the implementation
to renameat2, and just call renameat2.
* modules/renameat (Files): Remove lib/at-func2.c.
(Depends-on): Depend only on renameat2.
(Include): Remove <fcntl.h>.
* modules/renameat-tests (test_renameat_LDADD): Add $(LIB_EACCESS),
since renameat (via renameat2) might use faccessat.
|
|
e97dce1b
|
2017-07-27T13:47:23
|
|
vc-list-files: Adjust the script to support git worktrees
Git's worktree feature creates a ".git" which refers to references from
the original (main) repository. This makes vc-list-files to fail for
worktrees since it checks for both file's existence and the file being a
directory. Checking for existence should be okay in this case, since the
script doesn't touch anything within ".git" directly. Instead, it
invokes git commands, which work from within a worktree nicely.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Message-Id: <0ad867fe1a1e0999e6666ef75398630f28e78e35.1501156018.git.eskultet@redhat.com>
|
|
e20e3451
|
2017-07-26T11:57:37
|
|
maint: bring MODULES.html.sh up to date
Somehow a few months ago we stopped updating MODULES.html.sh.
I don’t recall explicitly deciding this, so I updated it now.
Alternatively I suppose we could remove it.
* MODULES.html.sh: Add builtin-expect, c99, ctime, explicit_bzero,
localtime, localtime-buffer, noreturn, nstrftime, strftime-fixes,
truncate, utime, utime-h, windows-stat-inodes,
windows-stat-override, windows-stat-timespec, year2038. Sort.
|
|
e8b8e656
|
2017-07-26T11:33:49
|
|
fprintftime: fix build-break caused by recent renaming
* lib/fprintftime.c: Include "nstrftime.c", not the now-renamed
"strftime.c".
* modules/fprintftime: Depend directly on nstrftime.
|
|
f7795760
|
2017-07-26T09:12:29
|
|
regex: work with GCC7's -Werror=implicit-fallthrough=
* lib/regex_internal.h (FALLTHROUGH): New macro.
* lib/regcomp.c (peek_token_bracket, parse_expression):
* lib/regexec.c (check_node_accept): Use it.
|
|
e66b0b94
|
2017-07-25T00:00:19
|
|
fts: simplify fts_build
* lib/fts.c (fts_build): Simplify, and be lazier about
calling leaf_optimization.
|
|
b446700e
|
2017-07-24T23:54:00
|
|
fts: three levels of leaf optimization
* lib/fts.c (enum leaf_optimization): New type with three values.
(S_MAGIC_AFS): New macro. Sort them.
(leaf_optimization): Rename from leaf_optimization_applies, and
return enum leaf_optimization instead of bool. All uses changed.
Add cases for unknown type and for AFS.
(fts_build): Don’t rely on link counts if NO_LEAF_OPTIMIZATION.
|
|
2649851d
|
2017-07-24T23:44:05
|
|
fts: cache dirent_inode_sort_may_be_useful too
* lib/fts.c (struct dev_type): New struct.
(DEV_TYPE_HT_INITIAL_SIZE): New constant.
(dev_type_hash, dev_type_compare, filesystem_type): New functions.
(dirent_inode_sort_may_be_useful, leaf_optimization_applies):
Now takes FTSENT const *, not int. All uses changed. Use
filesystem_type to cache.
(link_count_optimize_ok): Remove. Caller changed to use
leaf_optimization_applies, which now uses shared cache.
|
|
f7eb1b99
|
2017-07-24T23:28:26
|
|
fts: introduce MIN_DIR_NLINK
* lib/fts.c (MIN_DIR_NLINK): New constant.
Use it instead of 2, whenever we are talking about link counts.
|
|
9c7ef4ee
|
2017-07-24T23:21:57
|
|
fts: nlink_t signedness fixups
* lib/fts.c (fts_open): Set rootparent n_dirs_remaining to -1
so that root need not be a special case later.
(fts_read): Remove now-redundant test for fts_level.
Do not assume that nlink_t is signed.
(fts_build): Remove useless decrement of nlinks.
(fts_stat): Avoid unlikely signed integer overflow later, if
nlink_t is signed.
|
|
b7363b49
|
2017-07-24T23:12:59
|
|
fts-tests: new module
* modules/fts-tests, tests/test-fts.c: New files.
|
|
06c7d3b6
|
2017-07-24T10:34:25
|
|
Rename module 'strftime' to 'nstrftime'.
* NEWS: Mention the change.
|
|
a742bdb3
|
2017-07-24T01:19:36
|
|
Rename module 'strftime' to 'nstrftime'.
* m4/nstrftime.m4: Renamed from m4/strftime.m4.
* lib/nstrftime.c: Renamed from lib/strftime.c.
* modules/nstrftime: Renamed from modules/strftime.
(Files, Makefile.am): Update.
* tests/test-nstrftime.c: Renamed from tests/test-strftime.c.
Fix comment.
* modules/nstrftime-tests: Renamed from modules/strftime-tests.
(Files, Makefile.am): Update.
* modules/strftime: New file, an obsolete indirection.
* doc/posix-functions/strftime.texi: Update reference.
* config/srclist.txt: Update info.
|