]> Savannah Git Hosting - gnulib.git/log
gnulib.git
7 years agoFix warning "`gl_HOST_CPU_C_ABI' was expanded before it was required".
Bruno Haible [Tue, 3 Oct 2017 23:22:57 +0000 (01:22 +0200)]
Fix warning "`gl_HOST_CPU_C_ABI' was expanded before it was required".

* modules/host-cpu-c-abi (configure.ac): Require, don't invoke
gl_HOST_CPU_C_ABI.

7 years agodoc: warn about misuse of strncpy and wcsncpy.
Bruno Haible [Tue, 3 Oct 2017 20:01:42 +0000 (22:01 +0200)]
doc: warn about misuse of strncpy and wcsncpy.

* doc/posix-functions/strcpy.texi: Describe requirements on prior
memory allocation.
* doc/posix-functions/wcscpy.texi: Likewise.
* doc/posix-functions/strncpy.texi: Describe what this function is not
useful for.
* doc/posix-functions/wcsncpy.texi: Likewise.

7 years agofsuage: fix typo in previous change
Paul Eggert [Mon, 2 Oct 2017 16:13:21 +0000 (09:13 -0700)]
fsuage: fix typo in previous change

* lib/fsusage.c: Remove stray include of full-read.h.
Problem reported by Sam Steingold for macOS (Bug#28669).

7 years agofsusage: remove SVR2 support
Paul Eggert [Mon, 2 Oct 2017 03:35:53 +0000 (20:35 -0700)]
fsusage: remove SVR2 support

SVR2 was obsolete by 1986 and is no longer supported by anybody,
and its code was getting in the way of use of this module by
Emacs, which has its own ‘read’ function anyway.
* lib/fsusage.c: Do not include sys/filsys.h.
(get_fs_usage): Remove SVR2-specific code.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE):
Do not test for sys/filsys.h or set STAT_READ_FILSYS.
* modules/fsusage (Depends-on): Do not depend on full-read.

7 years agoSimplify autoupdate of licenses
Paul Eggert [Mon, 2 Oct 2017 01:11:44 +0000 (18:11 -0700)]
Simplify autoupdate of licenses

* config/srclistvars.sh (GNUWWWLICENSES): Move to a more-typical
place.

7 years agoautoupdate
Paul Eggert [Mon, 2 Oct 2017 01:10:37 +0000 (18:10 -0700)]
autoupdate

7 years agovma-iter: Add support for GNU/Hurd.
Bruno Haible [Sun, 1 Oct 2017 17:36:22 +0000 (19:36 +0200)]
vma-iter: Add support for GNU/Hurd.

* lib/vma-iter.c: Treat GNU/Hurd like Linux.
* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.

7 years agovma-iter: Make it work on 32-bit Solaris with module 'largefile'.
Bruno Haible [Sat, 30 Sep 2017 16:16:03 +0000 (18:16 +0200)]
vma-iter: Make it work on 32-bit Solaris with module 'largefile'.

* modules/vma-iter: Don't test for sys/procfs.h, as this test would
fail when module 'largefile' is in use.
* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't test HAVE_SYS_PROCFS_H.
* lib/vma-iter.c: Undefine _FILE_OFFSET_BITS early.
Don't test HAVE_SYS_PROCFS_H.

7 years agohavelib: Make it work for CC="gcc -m32" (regression from 2017-02-19).
Bruno Haible [Sat, 30 Sep 2017 13:59:27 +0000 (15:59 +0200)]
havelib: Make it work for CC="gcc -m32" (regression from 2017-02-19).

* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Require gl_HOST_CPU_C_ABI.
When $CC produces 32-bit code, set acl_libdirstem to 'lib', not 'lib64'.
* modules/havelib (Depends-on): Add host-cpu-c-abi.

7 years agouniname/uniname: Don't assume C99 compiler (regression from 2015-02-16).
Bruno Haible [Sat, 30 Sep 2017 12:22:53 +0000 (14:22 +0200)]
uniname/uniname: Don't assume C99 compiler (regression from 2015-02-16).

* lib/uniname/uniname.c (unicode_name_character): Add braces around
scope of local variables.

7 years agostring: code style
Bruno Haible [Thu, 28 Sep 2017 11:09:34 +0000 (13:09 +0200)]
string: code style

* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Reorder list of
substitutable variables.
* modules/string (Makefile.am): Likewise.

7 years agouniname/uniname-tests: Tighten code.
Bruno Haible [Tue, 26 Sep 2017 23:59:12 +0000 (01:59 +0200)]
uniname/uniname-tests: Tighten code.

* tests/uniname/test-uninames.c (fill_names, fill_aliases): Merge two
local variables into one.

7 years agovma-iter: Improvements for Linux and BSD platforms.
Bruno Haible [Tue, 26 Sep 2017 17:48:39 +0000 (19:48 +0200)]
vma-iter: Improvements for Linux and BSD platforms.

- Add support for DragonFly BSD.
- Make it more reliable on Linux, GNU/kFreeBSD, FreeBSD, NetBSD.

* lib/vma-iter.c (struct rofile, rof_open, rof_peekchar, rof_close):
Read the entire file into memory in a single system call.
(vma_iterate): Update. Read from /proc on DragonFly BSD like on FreeBSD.
* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on DragonFly BSD.

7 years agovma-iter: Provide the protection flags on FreeBSD.
Bruno Haible [Tue, 26 Sep 2017 15:03:48 +0000 (17:03 +0200)]
vma-iter: Provide the protection flags on FreeBSD.

* lib/vma-iter.c (vma_iterate) [FreeBSD]: When reading from /proc,
skip three fields between the addresses and the protection flags.

7 years agoglob: remove bogus extern decl
Paul Eggert [Tue, 26 Sep 2017 18:02:26 +0000 (11:02 -0700)]
glob: remove bogus extern decl

* lib/glob.c (__glob_pattern_type): Remove now-spurious
extern declaration.  Problem reported by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-09/msg00972.html

7 years agouniname/uniname-tests: integer overflow fix
Paul Eggert [Tue, 26 Sep 2017 01:26:25 +0000 (18:26 -0700)]
uniname/uniname-tests: integer overflow fix

* tests/uniname/test-uninames.c (fill_names, fill_aliases):
Check for integer overflow.

7 years agoduplocale-tests: fix unlikely crash
Paul Eggert [Tue, 26 Sep 2017 01:22:59 +0000 (18:22 -0700)]
duplocale-tests: fix unlikely crash

* tests/test-duplocale.c (get_locale_dependent_values):
Don’t crash with absurdly long month names.

7 years agomaint: fix overflow checking in nap.h
Paul Eggert [Tue, 26 Sep 2017 01:20:44 +0000 (18:20 -0700)]
maint: fix overflow checking in nap.h

* modules/chown-tests:
* modules/fchownat-tests, modules/fdutimensat-tests:
* modules/futimens-tests, modules/lchown-tests:
* modules/stat-time-tests, modules/utime-tests:
* modules/utimens-tests, modules/utimensat-tests:
Depend on intprops.
* tests/nap.h: Include intprops.h.
(diff_timespec): Handle overflow properly.

7 years agosys_types: update URL
Paul Eggert [Tue, 26 Sep 2017 01:14:01 +0000 (18:14 -0700)]
sys_types: update URL

* m4/sys_types_h.m4: Use https: URL.

7 years agoparse-datetime: fix dependency
Paul Eggert [Tue, 26 Sep 2017 01:12:06 +0000 (18:12 -0700)]
parse-datetime: fix dependency

* modules/parse-datetime (Depends-on): Depend
on nstrftime, not strftime.

7 years agoparse-datetime, posixtm: avoid uninit access
Paul Eggert [Tue, 26 Sep 2017 01:11:25 +0000 (18:11 -0700)]
parse-datetime, posixtm: avoid uninit access

* lib/parse-datetime.y (parse_datetime2):
* lib/posixtm.c (posixtime):
Do not access uninitialized storage, even though the resulting
value is never used.

7 years agovma-iter: Improvements for BSD platforms.
Bruno Haible [Mon, 25 Sep 2017 19:31:25 +0000 (21:31 +0200)]
vma-iter: Improvements for BSD platforms.

- Add support for GNU/kFreeBSD.
- Make it work on FreeBSD and NetBSD even when /proc is not mounted.
- Speed up on OpenBSD.

* lib/vma-iter.c (struct rofile, rof*): Define also on GNU/kFreeBSD.
(vma_iterate_bsd): New function.
(vma_iterate): Use it as fallback on FreeBSD and NetBSD. Use it as
first choice on OpenBSD. Treat GNU/kFreeBSD like Linux.
* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
* modules/vma-iter (configure.ac): Require AC_C_INLINE.

7 years agoautoupdate
Karl Berry [Sun, 24 Sep 2017 16:20:14 +0000 (09:20 -0700)]
autoupdate

7 years agostrfmon_l: New module.
Bruno Haible [Sat, 23 Sep 2017 10:22:17 +0000 (12:22 +0200)]
strfmon_l: New module.

* modules/strfmon_l: New file.
* lib/strfmon_l.c: New file.
* m4/strfmon_l.m4: New file.
* doc/posix-functions/strfmon_l.texi: Mention the new module.
* modules/strfmon_l-tests: New file.
* tests/test-strfmon_l.c: New file.

7 years agomonetary: New module.
Bruno Haible [Sat, 23 Sep 2017 07:26:48 +0000 (09:26 +0200)]
monetary: New module.

* modules/monetary: New file.
* lib/monetary.in.h: New file.
* m4/monetary_h.m4: New file.
* doc/posix-headers/monetary.texi: Mention the new module.
* modules/monetary-tests: New file.
* tests/test-monetary.c: New file.
* modules/monetary-c++-tests: New file.
* tests/test-monetary-c++.cc: New file.
* modules/duplocale-tests (configure.ac): Use AC_CHECK_HEADERS_ONCE.

7 years agoduplocale tests: Fix test crash on Linux/x86.
Bruno Haible [Sat, 23 Sep 2017 14:01:33 +0000 (16:01 +0200)]
duplocale tests: Fix test crash on Linux/x86.

* tests/test-duplocale.c (test_with_uselocale): Disconnect the mixed2
locale from the current thread before freeing it.

7 years agoautoupdate
Karl Berry [Fri, 22 Sep 2017 23:10:23 +0000 (16:10 -0700)]
autoupdate

7 years agomktime: port to OpenVMS
Paul Eggert [Fri, 22 Sep 2017 04:39:59 +0000 (21:39 -0700)]
mktime: port to OpenVMS

Problem reported by John E. Malmberg in:
https://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00100.html
* m4/mktime.m4 (TIME_T_IS_SIGNED): Default to 0.

7 years agoautoupdate
Karl Berry [Thu, 21 Sep 2017 13:57:16 +0000 (06:57 -0700)]
autoupdate

7 years agoautoupdate
Karl Berry [Wed, 20 Sep 2017 23:12:51 +0000 (16:12 -0700)]
autoupdate

7 years ago* build-aux/bootstrap: fix HTTPS typo in comment
Paul Eggert [Tue, 19 Sep 2017 08:17:50 +0000 (01:17 -0700)]
* build-aux/bootstrap: fix HTTPS typo in comment

7 years agom4/manywarnings.m4: fix comment typo: s/reqirs/requires/
Jim Meyering [Sun, 17 Sep 2017 19:09:34 +0000 (12:09 -0700)]
m4/manywarnings.m4: fix comment typo: s/reqirs/requires/

7 years agomanywarnings: port to GCC on 64-bit MS-Windows
Paul Eggert [Sun, 17 Sep 2017 06:21:43 +0000 (23:21 -0700)]
manywarnings: port to GCC on 64-bit MS-Windows

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Work better if
LONG_MAX < PTRDIFF_MAX.  Problem reported by Richard Copley in:
https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00392.html

7 years agoautoupdate
Paul Eggert [Sun, 17 Sep 2017 00:53:10 +0000 (17:53 -0700)]
autoupdate

7 years agoautoupdate
Karl Berry [Thu, 14 Sep 2017 20:37:36 +0000 (13:37 -0700)]
autoupdate

7 years agoall: Replace many more http URLs by https URLs. Update stale URLs.
Bruno Haible [Wed, 13 Sep 2017 22:35:56 +0000 (00:35 +0200)]
all: Replace many more http URLs by https URLs. Update stale URLs.

* users.txt: Remove mention of 'newts'.
* lib/localename.c: Update comment about LANG_SOTHO.

7 years agoautoupdate
Karl Berry [Wed, 13 Sep 2017 20:27:36 +0000 (13:27 -0700)]
autoupdate

7 years agoall: prefer https: URLs
Paul Eggert [Wed, 13 Sep 2017 07:48:18 +0000 (00:48 -0700)]
all: prefer https: URLs

7 years agodoc: Prefer https URLs where possible.
Bruno Haible [Wed, 13 Sep 2017 01:17:45 +0000 (03:17 +0200)]
doc: Prefer https URLs where possible.

* doc/**/*.texi: Use https URLs instead of http URLs where possible.
* doc/ld-output-def.texi: Remove unavailable URL.

7 years agomaintainer-makefile: FTP -> HTTPS
Paul Eggert [Tue, 12 Sep 2017 23:36:27 +0000 (16:36 -0700)]
maintainer-makefile: FTP -> HTTPS

* top/maint.mk (url_dir_list, ftp-gnu): Use HTTPS protocol instead
of FTP, which is planned to be decommissioned on 2017-11-01.

7 years agolibc-config: Fix __GNUC_PREREQ macro.
Tim Rühsen [Tue, 12 Sep 2017 12:27:24 +0000 (14:27 +0200)]
libc-config: Fix __GNUC_PREREQ macro.

* lib/libc-config.h (__GNUC_PREREQ): Use __GNUC_MINOR__, not
__GNUC_MINOR.

7 years agognulib-tool.py: follow gnulib-tool changes, part 14
Bruno Haible [Sat, 9 Sep 2017 12:40:10 +0000 (14:40 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 14

Follow gnulib-tool change
2015-08-20  Daiki Ueno  <ueno@gnu.org>
gnulib-tool: don't transform binary files with sed

7 years agognulib-tool.py: follow gnulib-tool changes, part 13
Bruno Haible [Sat, 9 Sep 2017 12:18:56 +0000 (14:18 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 13

Follow gnulib-tool change
2015-06-01  Pádraig Brady  <P@draigBrady.com>
gnulib-tool: concatenate lib_SOURCES to a single line

7 years agognulib-tool.py: Keep substitution order like in gnulib-tool.
Bruno Haible [Sat, 9 Sep 2017 12:16:35 +0000 (14:16 +0200)]
gnulib-tool.py: Keep substitution order like in gnulib-tool.

This should be a no-op change. Just for easier parallel maintenance
with gnulib-tool.

7 years agognulib-tool.py: Define and use two new global functions.
Bruno Haible [Sat, 9 Sep 2017 10:48:58 +0000 (12:48 +0200)]
gnulib-tool.py: Define and use two new global functions.

* pygnulib/constants.py (remove_backslash_newline, combine_lines): New
functions.

7 years agognulib-tool.py: Remove unused function nlcount.
Bruno Haible [Sat, 9 Sep 2017 10:27:40 +0000 (12:27 +0200)]
gnulib-tool.py: Remove unused function nlcount.

7 years agognulib-tool.py: Fix subend function.
Bruno Haible [Sat, 9 Sep 2017 10:01:28 +0000 (12:01 +0200)]
gnulib-tool.py: Fix subend function.

Make subend('a','b','Laura') return 'Laurb' instead of 'bL'.

7 years agognulib-tool.py: follow gnulib-tool changes, part 12
Bruno Haible [Sat, 9 Sep 2017 08:25:09 +0000 (10:25 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 12

Follow gnulib-tool change
2015-02-03  Pádraig Brady  <P@draigBrady.com>
gnulib-tool: fix handling of patch(1) diagnostics

7 years agognulib-tool.py: follow gnulib-tool changes, part 11
Bruno Haible [Sat, 9 Sep 2017 08:21:00 +0000 (10:21 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 11

Follow gnulib-tool change
2014-12-02  KO Myung-Hun  <komh78@gmail.com>
gnulib-tool: recognize x:* as an absolute path

7 years agognulib-tool.py: follow gnulib-tool changes, part 10
Bruno Haible [Fri, 8 Sep 2017 23:36:16 +0000 (01:36 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 10

Follow gnulib-tool change
2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
gnulib-tool: Use same options as build-aux/bootstrap to download PO files.

7 years agognulib-tool.py: follow gnulib-tool changes, part 9
Bruno Haible [Fri, 8 Sep 2017 23:26:20 +0000 (01:26 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 9

Follow gnulib-tool change
2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
Fallback to wget when rsync of PO files fails.

7 years agognulib-tool.py: follow gnulib-tool changes, part 8
Bruno Haible [Fri, 8 Sep 2017 23:16:46 +0000 (01:16 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 8

Follow gnulib-tool change
2014-05-27  Sylvain Beucler  <beuc@beuc.net>.
gnulib-tool: wget translations using --no-verbose rather than --quiet

7 years agognulib-tool.py: follow gnulib-tool changes, part 7
Bruno Haible [Fri, 8 Sep 2017 23:09:45 +0000 (01:09 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 7

Follow gnulib-tool change
2014-05-27  Sylvain Beucler  <beuc@beuc.net>
gnulib-tool: adjust translation wget to avoid a https redirection

7 years agognulib-tool.py: follow gnulib-tool changes, part 6
Bruno Haible [Fri, 8 Sep 2017 23:06:34 +0000 (01:06 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 6

Follow gnulib-tool change
2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
deps: require Automake >= 1.9.6 in generated Makefile fragments

7 years agognulib-tool.py: follow gnulib-tool changes, part 5
Bruno Haible [Fri, 8 Sep 2017 23:04:08 +0000 (01:04 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 5

Follow gnulib-tool change
2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
Assume gnulib is checked out from Git, not CVS

7 years agognulib-tool.py: follow gnulib-tool changes, part 4
Bruno Haible [Fri, 8 Sep 2017 22:49:56 +0000 (00:49 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 4

Follow gnulib-tool change
2013-01-05  Paul Eggert  <eggert@cs.ucla.edu>
gnulib-tool: fix incompatibility with autopoint 0.18.2

7 years agognulib-tool.py: follow gnulib-tool changes, part 3
Bruno Haible [Fri, 8 Sep 2017 22:32:50 +0000 (00:32 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 3

Follow gnulib-tool change
2012-08-26  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Remove no-op option --no-changelog.

* pygnulib/constants.py: Remove FILES dictionary.
* pygnulib/*: Update.

7 years agognulib-tool.py: follow gnulib-tool changes, part 2
Bruno Haible [Fri, 8 Sep 2017 22:03:44 +0000 (00:03 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 2

Follow gnulib-tool change
2012-08-13  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix persistence of --witness-c-macro option.

7 years agognulib-tool.py: follow gnulib-tool changes, part 1
Bruno Haible [Fri, 8 Sep 2017 21:59:29 +0000 (23:59 +0200)]
gnulib-tool.py: follow gnulib-tool changes, part 1

Follow gnulib-tool change
2012-06-21  Bruno Haible  <bruno@clisp.org>
gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.

7 years agognulib-tool.py: Fix typo in rsync invocation.
Bruno Haible [Fri, 8 Sep 2017 23:21:26 +0000 (01:21 +0200)]
gnulib-tool.py: Fix typo in rsync invocation.

7 years agognulib-tool.py: Fix typo in wget invocation.
Bruno Haible [Fri, 8 Sep 2017 23:31:54 +0000 (01:31 +0200)]
gnulib-tool.py: Fix typo in wget invocation.

7 years agognulib-tool.py: Bump copyright years up to 2017.
Bruno Haible [Fri, 8 Sep 2017 22:38:56 +0000 (00:38 +0200)]
gnulib-tool.py: Bump copyright years up to 2017.

7 years agognulib-tool.py: Accept option --dir instead of --destdir.
Bruno Haible [Fri, 8 Sep 2017 21:45:39 +0000 (23:45 +0200)]
gnulib-tool.py: Accept option --dir instead of --destdir.

7 years agognulib-tool: Simplify commit from 2015-08-20.
Bruno Haible [Sat, 9 Sep 2017 12:34:53 +0000 (14:34 +0200)]
gnulib-tool: Simplify commit from 2015-08-20.

* gnulib-tool (func_add_or_update): Remove local variable
is_binary_file.

7 years ago* lib/fts.c: Fix XFS comments.
Paul Eggert [Fri, 8 Sep 2017 16:35:53 +0000 (09:35 -0700)]
* lib/fts.c: Fix XFS comments.

7 years ago[pygnulib] autopep8 (fixing indentation, style, etc.)
Dmitry Selyutin [Fri, 8 Sep 2017 15:34:58 +0000 (18:34 +0300)]
[pygnulib] autopep8 (fixing indentation, style, etc.)

7 years agognulib-tool.py: fix exception handling
Dmitry Selyutin [Tue, 5 Sep 2017 20:33:50 +0000 (23:33 +0300)]
gnulib-tool.py: fix exception handling

7 years agognulib-tool.py: fix errors on building wget2; use UTF-8 in subprocess
Dmitry Selyutin [Tue, 5 Sep 2017 07:04:18 +0000 (10:04 +0300)]
gnulib-tool.py: fix errors on building wget2; use UTF-8 in subprocess

7 years ago[pygnulib] .gitignore
Dmitry Selyutin [Mon, 21 Aug 2017 18:40:46 +0000 (21:40 +0300)]
[pygnulib] .gitignore

7 years ago[pygnulib] initial merge (including some small bug fixes)
Dmitry Selyutin [Sun, 20 Aug 2017 08:17:58 +0000 (11:17 +0300)]
[pygnulib] initial merge (including some small bug fixes)

7 years agostddef: Avoid conflict with system-defined max_align_t.
Bruno Haible [Fri, 8 Sep 2017 08:02:47 +0000 (10:02 +0200)]
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>.

7 years agolibc-config: port to MSVC
Paul Eggert [Wed, 6 Sep 2017 06:32:59 +0000 (23:32 -0700)]
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.

7 years agoglob: Use enum for __glob_pattern_type result
Paul Eggert [Wed, 6 Sep 2017 04:14:51 +0000 (21:14 -0700)]
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.

7 years agoglob: fix for use in glibc
Paul Eggert [Wed, 6 Sep 2017 01:58:50 +0000 (18:58 -0700)]
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.

7 years agoglob: fix bugs with long login names
Paul Eggert [Sat, 2 Sep 2017 22:39:16 +0000 (15:39 -0700)]
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.

7 years agodirent: Update doc.
Bruno Haible [Sat, 2 Sep 2017 11:14:00 +0000 (13:14 +0200)]
dirent: Update doc.

* doc/posix-headers/dirent.texi: More concrete list of platforms.

7 years agoglob: fix getpwnam_r errno typo
Paul Eggert [Sat, 2 Sep 2017 10:56:06 +0000 (03:56 -0700)]
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.

7 years agoglob: fix typo in recent change
Paul Eggert [Sat, 2 Sep 2017 10:37:46 +0000 (03:37 -0700)]
glob: fix typo in recent change

* lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
Fix recently-introduced typo.

7 years agoglob: don't save and restore errno unnecessarily
Paul Eggert [Sat, 2 Sep 2017 09:05:09 +0000 (02:05 -0700)]
glob: don't save and restore errno unnecessarily

* lib/glob.c (glob): Don't save and restore errno
merely because we have getpwnam_r.

7 years agoglob: don't assume getpwnam_r
Paul Eggert [Sat, 2 Sep 2017 09:00:40 +0000 (02:00 -0700)]
glob: don't assume getpwnam_r

* lib/glob.c (glob): Port recent patches to platforms
lacking getpwnam_r.

7 years agoscratch_buffer: don’t use private glibc API
Paul Eggert [Sat, 2 Sep 2017 08:21:03 +0000 (01:21 -0700)]
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.

7 years agoglob: use scratch_buffer instead of extend_alloca
Paul Eggert [Fri, 1 Sep 2017 22:41:45 +0000 (15:41 -0700)]
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.

7 years agoscratch_buffer: new module
Paul Eggert [Fri, 1 Sep 2017 21:42:53 +0000 (14:42 -0700)]
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.

7 years agolibc-config: new module
Paul Eggert [Fri, 1 Sep 2017 21:40:58 +0000 (14:40 -0700)]
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.

7 years agoglob: match dangling symlinks
Paul Eggert [Thu, 31 Aug 2017 21:34:25 +0000 (14:34 -0700)]
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.

7 years agoglob, backupfile: inode 0 is a valid inode number
Paul Eggert [Thu, 31 Aug 2017 21:34:24 +0000 (14:34 -0700)]
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.

7 years agoglob: simplify symlink detection
Paul Eggert [Thu, 31 Aug 2017 21:34:24 +0000 (14:34 -0700)]
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.

7 years agofts-tests: tag as a longrunning-test so not included by default
Pádraig Brady [Thu, 31 Aug 2017 05:32:23 +0000 (22:32 -0700)]
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.

7 years agorenameat2: fix compilation on alpine linux
Pádraig Brady [Wed, 30 Aug 2017 07:16:39 +0000 (00:16 -0700)]
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.

7 years agoglob: try to port recent changes to MS-Windows
Paul Eggert [Fri, 25 Aug 2017 06:51:07 +0000 (23:51 -0700)]
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.

7 years agowarnings: fix compilation with old autoconf
Eric Blake [Fri, 25 Aug 2017 01:28:52 +0000 (20:28 -0500)]
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>
7 years ago* doc/gnulib-intro.texi: Add comment regarding IRIX.
Bruno Haible [Thu, 24 Aug 2017 21:49:08 +0000 (23:49 +0200)]
* doc/gnulib-intro.texi: Add comment regarding IRIX.

7 years agoautoupdate
Karl Berry [Thu, 24 Aug 2017 15:10:28 +0000 (08:10 -0700)]
autoupdate

7 years agoglob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
Bruno Haible [Thu, 24 Aug 2017 10:12:31 +0000 (12:12 +0200)]
glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.

* modules/glob (Depends-on): Add c99.

7 years agoglob: fix typo that broke platforms lacking d_ino
Paul Eggert [Thu, 24 Aug 2017 07:46:49 +0000 (00:46 -0700)]
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.

7 years agoflexmember: fix typo in previous patch
Paul Eggert [Wed, 23 Aug 2017 21:45:58 +0000 (14:45 -0700)]
flexmember: fix typo in previous patch

* lib/flexmember.h: Fix comment typo.

7 years agoglob: merge from glibc with Zanella glob changes
Paul Eggert [Wed, 23 Aug 2017 17:45:42 +0000 (10:45 -0700)]
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.

7 years agoglob: port to clang's Undefined Sanitizer
Paul Eggert [Tue, 22 Aug 2017 17:13:50 +0000 (10:13 -0700)]
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.

7 years ago) -> } -> })
Bruno Haible [Mon, 21 Aug 2017 20:20:11 +0000 (22:20 +0200)]
) -> } -> })

7 years agovc-list-files: port to Solaris 10
Paul Eggert [Mon, 21 Aug 2017 19:38:20 +0000 (12:38 -0700)]
vc-list-files: port to Solaris 10

* build-aux/vc-list-files: Don't assume test -e works.