]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 years agolchmod: Ensure declaration on HP-UX.
Bruno Haible [Sat, 8 Feb 2020 20:22:15 +0000 (21:22 +0100)]
lchmod: Ensure declaration on HP-UX.

* lib/sys_stat.in.h (lchown): Declare also on HP-UX.
* doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.

5 years agofchmodat: Strengthen tests.
Bruno Haible [Sat, 8 Feb 2020 19:47:58 +0000 (20:47 +0100)]
fchmodat: Strengthen tests.

* tests/test-fchmodat.c (BASE): New macro.
(main): Use it, to avoid conflicts with other unit tests. Verify that
fchmodat changed the file permission bits.

5 years agofchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
Bruno Haible [Sat, 8 Feb 2020 19:41:20 +0000 (20:41 +0100)]
fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).

* lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
'#undef __need_system_sys_stat_h'.

5 years agofchmodat: Improve cross-compilation guesses.
Bruno Haible [Sat, 8 Feb 2020 19:38:01 +0000 (20:38 +0100)]
fchmodat: Improve cross-compilation guesses.

* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When
cross-compiling, guess depending on the platform.
* doc/posix-functions/fchmodat.texi: Clarify.

5 years agoFix compilation errors in a testdir created with --with-c++-tests.
Bruno Haible [Sat, 8 Feb 2020 16:39:26 +0000 (17:39 +0100)]
Fix compilation errors in a testdir created with --with-c++-tests.

* lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
since it does not work any more with g++ >= 4.4.

5 years agodoc: Update for glibc 2.31.
Bruno Haible [Sat, 8 Feb 2020 14:54:25 +0000 (15:54 +0100)]
doc: Update for glibc 2.31.

* doc/glibc-functions/pthread_clockjoin_np.texi: New file.
* doc/gnulib.texi: Include it.
* doc/pastposix-functions/h_errno.texi: Update.
* doc/posix-functions/*.texi: Likewise.

5 years agomountlist: consider smb3 file systems as remote
Kenneth D'souza [Sat, 8 Feb 2020 13:54:35 +0000 (13:54 +0000)]
mountlist: consider smb3 file systems as remote

* lib/mountlist.c (ME_REMOTE): Recognize file systems of type
"smb3" as remote.

5 years agofchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks
Paul Eggert [Sat, 8 Feb 2020 00:34:12 +0000 (16:34 -0800)]
fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks

Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
they act like chmod on non-symlinks.
* NEWS:
* doc/glibc-functions/lchmod.texi (lchmod):
* doc/posix-functions/fchmodat.texi (fchmodat):
Mention this.
* lib/fchmodat.c: Define __need_system_sys_stat_h before including
config.h, and undef it after including sys/stat.h the first time.
Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
sys/stat.h a second time after defining orig_fchmodat.
(orig_fchmodat) [HAVE_FCHMODAT]: New function.
(fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
* lib/lchmod.c: New file.
* lib/sys_stat.in.h (fchmodat, lchmod):
Support replacing these functions.
* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
* m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
Test that lchmod works on non-symlinks.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
* modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
(Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
* modules/lchmod (Files): Add lib/lchmod.c.
(Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
(configure.ac): Compile lchmod.c if needed.
(lib_SOURCES): Add lchmod.c.
* modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
and REPLACE_LCHMOD.
* tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
(main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.

5 years ago* lib/mountlist.c: fix formatting
Paul Eggert [Wed, 5 Feb 2020 21:45:50 +0000 (13:45 -0800)]
* lib/mountlist.c: fix formatting

5 years agomountlist: Consider AFS filesystems as remote
Marc Dionne [Wed, 5 Feb 2020 21:35:12 +0000 (13:35 -0800)]
mountlist: Consider AFS filesystems as remote

df --local relies on the ME_REMOTE macro to determine if a given
mount entry should be considered "local".  There is special logic
for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
kernel's kafs module or AuriStorFS is treated as a local mount.
* lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
(OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.

Copyright-paperwork-exempt: yes

5 years agoPort _Noreturn to older Clang
Paul Eggert [Mon, 3 Feb 2020 21:20:09 +0000 (13:20 -0800)]
Port _Noreturn to older Clang

Problem reported by Jeffery Walton in:
https://lists.gnu.org/r/bug-gnulib/2020-02/msg00013.html
* lib/_Noreturn.h (_Noreturn):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
Assume _Noreturn works in Clang 3.5 and later.
It is documented to work in Clang 3.5:
http://releases.llvm.org/3.5.0/tools/clang/docs/AttributeReference.html
and is not documented in Clang 3.4:
https://releases.llvm.org/3.4/tools/clang/docs/LanguageExtensions.html
Apple sets __clang_version__ to a different value, so use
__apple_build_version__ there.  See:
https://lists.gnu.org/r/bug-gnulib/2020-02/msg00017.html

5 years agotest-canonicalize: avoid an unused function warning
Pádraig Brady [Tue, 4 Feb 2020 00:57:12 +0000 (00:57 +0000)]
test-canonicalize: avoid an unused function warning

* tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
with the same guard as that used to protect usage of the null_ptr
function, so that one doesn't get a -Wunused warning
about the function being defined but unused.
* tests/test-canonicalize-lgpl.c: Likewise.

5 years agolibc-config: port to Apple’s Clang variant
Paul Eggert [Tue, 4 Feb 2020 03:01:22 +0000 (19:01 -0800)]
libc-config: port to Apple’s Clang variant

* lib/libc-config.h (__glibc_clang_prereq):
Port to Apple’s Clang variant, which uses a different
numbering scheme for __clang_major__.

5 years agoDocument the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
Bruno Haible [Sun, 2 Feb 2020 18:25:05 +0000 (19:25 +0100)]
Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.

* doc/containers.texi: Document these new modules.

5 years agoomap-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:08:15 +0000 (19:08 +0100)]
omap-c++: Add tests.

* tests/test-omap-c++.cc: New file.
* modules/omap-c++-tests: New file.

5 years agoomap-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:07:17 +0000 (19:07 +0100)]
omap-c++: New module.

* lib/gl_omap.hh: New file, based on lib/gl_omap.h.
* modules/omap-c++: New file.

5 years agomap-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:06:33 +0000 (19:06 +0100)]
map-c++: Add tests.

* tests/test-map-c++.cc: New file.
* modules/map-c++-tests: New file.

5 years agomap-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:05:19 +0000 (19:05 +0100)]
map-c++: New module.

* lib/gl_map.hh: New file, based on lib/gl_map.h.
* modules/map-c++: New file.

5 years agooset-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:04:19 +0000 (19:04 +0100)]
oset-c++: Add tests.

* tests/test-oset-c++.cc: New file.
* modules/oset-c++-tests: New file.

5 years agooset-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:03:39 +0000 (19:03 +0100)]
oset-c++: New module.

* lib/gl_oset.hh: New file, based on lib/gl_oset.h.
* modules/oset-c++: New file.

5 years agoset-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:02:10 +0000 (19:02 +0100)]
set-c++: Add tests.

* tests/test-set-c++.cc: New file.
* modules/set-c++-tests: New file.

5 years agoset-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:01:38 +0000 (19:01 +0100)]
set-c++: New module.

* lib/gl_set.hh: New file, based on lib/gl_set.h.
* modules/set-c++: New file.

5 years agolist-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:00:11 +0000 (19:00 +0100)]
list-c++: Add tests.

* tests/test-list-c++.cc: New file.
* modules/list-c++-tests: New file.

5 years agolist-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 17:59:00 +0000 (18:59 +0100)]
list-c++: New module.

* lib/gl_list.hh: New file, based on lib/gl_list.h.
* modules/list-c++: New file.

5 years agoxalloc: Fix compilation error in C++ mode on FreeBSD 12.
Bruno Haible [Sun, 2 Feb 2020 17:16:55 +0000 (18:16 +0100)]
xalloc: Fix compilation error in C++ mode on FreeBSD 12.

* lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before
'_Noreturn'.
* lib/sigpipe-die.h (sigpipe_die): Likewise.

5 years agoread-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
Pádraig Brady [Sun, 2 Feb 2020 16:06:48 +0000 (16:06 +0000)]
read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX

On x86_64 with glibc-2.30, gcc 9.2 is giving:
  error: argument 2 value '18446744073709551615'
  exceeds maximum object size 9223372036854775807
  [-Werror=alloc-size-larger-than=]
The details of this restriction are discussed at:
https://stackoverflow.com/q/42574890/4421
* lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/

5 years agosysctl.h: avoid including on glibc
Pádraig Brady [Sun, 2 Feb 2020 15:24:02 +0000 (15:24 +0000)]
sysctl.h: avoid including on glibc

* lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
glibc deprecated this header since v2.30.
* lib/physmem.c: Likewise.

5 years agolist, set, oset, map, omap: Avoid imperative voice in documentation.
Bruno Haible [Sun, 2 Feb 2020 12:31:11 +0000 (13:31 +0100)]
list, set, oset, map, omap: Avoid imperative voice in documentation.

* lib/gl_map.h: Use descriptive sentences instead of imperative voice
in the specification of functions.
* lib/gl_omap.h: Likewise.

5 years agolist, set, oset, map, omap: Avoid imperative voice in documentation.
Bruno Haible [Sun, 2 Feb 2020 12:15:34 +0000 (13:15 +0100)]
list, set, oset, map, omap: Avoid imperative voice in documentation.

* lib/gl_list.h: Use descriptive sentences instead of imperative voice
in the specification of functions.
* lib/gl_set.h: Likewise.
* lib/gl_oset.h: Likewise.
* lib/gl_map.h: Likewise.
* lib/gl_omap.h: Likewise.
* lib/gl_*.h: Likewise.

5 years agoansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.
Bruno Haible [Sat, 1 Feb 2020 14:51:26 +0000 (15:51 +0100)]
ansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.

* m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Determine CXXFLAGS like AC_PROG_CXX
does.

5 years agoautoupdate
Karl Berry [Thu, 30 Jan 2020 16:15:36 +0000 (08:15 -0800)]
autoupdate

5 years agoarray-map, hash-map, linkedhash-map: Fix module description.
Bruno Haible [Thu, 30 Jan 2020 03:13:36 +0000 (04:13 +0100)]
array-map, hash-map, linkedhash-map: Fix module description.

* modules/array-map (Description): Fix description.
* modules/hash-map (Description): Likewise.
* modules/linkedhash-map (Description): Likewise.

5 years agodfa: do not depend on isblank
Paul Eggert [Thu, 30 Jan 2020 00:47:51 +0000 (16:47 -0800)]
dfa: do not depend on isblank

This removes a difference between Gawk dfa.c and Gnulib dfa.c.
* lib/dfa.c (isblank): Define if neither system nor Gnulib does.
* modules/dfa (Depends-on): Remove isblank.
* modules/isblank: Add a module indicator, for lib/dfa.c.

5 years agodfa: do not assume 64-bit int
Paul Eggert [Wed, 29 Jan 2020 18:58:26 +0000 (10:58 -0800)]
dfa: do not assume 64-bit int

Problem reported for VAX/VMS C (!) by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2020-01/msg00173.html
* lib/dfa.c (CHARCLASS_PAIR): Bring back this macro.
(CHARCLASS_WORD_BITS, charclass_word) [!UINT_LEAST64_MAX]:
Fall back to 32-bit words.
(CHARCLASS_INIT): Go back to having 8 32-bit args instead
of 4 64-bit args.  All uses changed.

5 years agoregex: remove limits-h dependency
Paul Eggert [Mon, 27 Jan 2020 21:07:22 +0000 (13:07 -0800)]
regex: remove limits-h dependency

* modules/regex (Depends-on): Remove limits-h, since the
code no longer depends on ULONG_WIDTH already being defined.

5 years agoregex: port to non-GCC pre-IEC-60559
Paul Eggert [Mon, 27 Jan 2020 21:00:57 +0000 (13:00 -0800)]
regex: port to non-GCC pre-IEC-60559

Problem reported by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2020-01/msg00154.html
* lib/regex_internal.h (ULONG_WIDTH): Make this usable in #if.

5 years agoc32isxdigit: Add tests.
Bruno Haible [Sat, 25 Jan 2020 23:05:08 +0000 (00:05 +0100)]
c32isxdigit: Add tests.

* tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c.
* tests/test-c32isxdigit.sh: New file.
* modules/c32isxdigit-tests: New file.

5 years agoc32isxdigit: New module.
Bruno Haible [Sat, 25 Jan 2020 23:04:38 +0000 (00:04 +0100)]
c32isxdigit: New module.

* lib/c32isxdigit.c: New file.
* modules/c32isxdigit: New file.
* doc/posix-functions/iswxdigit.texi: Mention the new module.

5 years agoc32isupper: Add tests.
Bruno Haible [Sat, 25 Jan 2020 23:03:23 +0000 (00:03 +0100)]
c32isupper: Add tests.

* tests/test-c32isupper.c: New file.
* tests/test-c32isupper.sh: New file.
* modules/c32isupper-tests: New file.

5 years agoc32isupper: New module.
Bruno Haible [Sat, 25 Jan 2020 23:02:50 +0000 (00:02 +0100)]
c32isupper: New module.

* lib/c32isupper.c: New file.
* modules/c32isupper: New file.
* doc/posix-functions/iswupper.texi: Mention the new module.

5 years agoc32isspace: Add tests.
Bruno Haible [Sat, 25 Jan 2020 23:01:21 +0000 (00:01 +0100)]
c32isspace: Add tests.

* tests/test-c32isspace.c: New file.
* tests/test-c32isspace.sh: New file.
* modules/c32isspace-tests: New file.

5 years agoc32isspace: New module.
Bruno Haible [Sat, 25 Jan 2020 23:00:47 +0000 (00:00 +0100)]
c32isspace: New module.

* lib/c32isspace.c: New file.
* modules/c32isspace: New file.
* doc/posix-functions/iswspace.texi: Mention the new module.

5 years agoc32ispunct: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:59:52 +0000 (23:59 +0100)]
c32ispunct: Add tests.

* tests/test-c32ispunct.c: New file.
* tests/test-c32ispunct.sh: New file.
* modules/c32ispunct-tests: New file.

5 years agoc32ispunct: New module.
Bruno Haible [Sat, 25 Jan 2020 22:59:18 +0000 (23:59 +0100)]
c32ispunct: New module.

* lib/c32ispunct.c: New file.
* modules/c32ispunct: New file.
* doc/posix-functions/iswpunct.texi: Mention the new module.

5 years agoc32isprint: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:58:19 +0000 (23:58 +0100)]
c32isprint: Add tests.

* tests/test-c32isprint.c: New file.
* tests/test-c32isprint.sh: New file.
* modules/c32isprint-tests: New file.

5 years agoc32isprint: New module.
Bruno Haible [Sat, 25 Jan 2020 22:57:50 +0000 (23:57 +0100)]
c32isprint: New module.

* lib/c32isprint.c: New file.
* modules/c32isprint: New file.
* doc/posix-functions/iswprint.texi: Mention the new module.

5 years agoc32islower: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:56:52 +0000 (23:56 +0100)]
c32islower: Add tests.

* tests/test-c32islower.c: New file.
* tests/test-c32islower.sh: New file.
* modules/c32islower-tests: New file.

5 years agoc32islower: New module.
Bruno Haible [Sat, 25 Jan 2020 22:56:13 +0000 (23:56 +0100)]
c32islower: New module.

* lib/c32islower.c: New file.
* modules/c32islower: New file.
* doc/posix-functions/iswlower.texi: Mention the new module.

5 years agoc32isgraph: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:55:15 +0000 (23:55 +0100)]
c32isgraph: Add tests.

* tests/test-c32isgraph.c: New file.
* tests/test-c32isgraph.sh: New file.
* modules/c32isgraph-tests: New file.

5 years agoc32isgraph: New module.
Bruno Haible [Sat, 25 Jan 2020 22:54:38 +0000 (23:54 +0100)]
c32isgraph: New module.

* lib/c32isgraph.c: New file.
* modules/c32isgraph: New file.
* doc/posix-functions/iswgraph.texi: Mention the new module.

5 years agoc32isdigit: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:53:20 +0000 (23:53 +0100)]
c32isdigit: Add tests.

* tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c.
* tests/test-c32isdigit.sh: New file.
* modules/c32isdigit-tests: New file.

5 years agoc32isdigit: New module.
Bruno Haible [Sat, 25 Jan 2020 22:52:46 +0000 (23:52 +0100)]
c32isdigit: New module.

* lib/c32isdigit.c: New file.
* modules/c32isdigit: New file.
* doc/posix-functions/iswdigit.texi: Mention the new module.

5 years agoc32iscntrl: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:51:03 +0000 (23:51 +0100)]
c32iscntrl: Add tests.

* tests/test-c32iscntrl.c: New file.
* tests/test-c32iscntrl.sh: New file.
* modules/c32iscntrl-tests: New file.

5 years agoc32iscntrl: New module.
Bruno Haible [Sat, 25 Jan 2020 22:50:35 +0000 (23:50 +0100)]
c32iscntrl: New module.

* lib/c32iscntrl.c: New file.
* modules/c32iscntrl: New file.
* doc/posix-functions/iswcntrl.texi: Mention the new module.

5 years agoc32isblank: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:49:35 +0000 (23:49 +0100)]
c32isblank: Add tests.

* tests/test-c32isblank.c: New file.
* tests/test-c32isblank.sh: New file.
* modules/c32isblank-tests: New file.

5 years agoc32isblank: New module.
Bruno Haible [Sat, 25 Jan 2020 22:49:01 +0000 (23:49 +0100)]
c32isblank: New module.

* lib/c32isblank.c: New file.
* modules/c32isblank: New file.
* doc/posix-functions/iswblank.texi: Mention the new module.

5 years agoc32isalpha: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:47:18 +0000 (23:47 +0100)]
c32isalpha: Add tests.

* tests/test-c32isalpha.c: New file.
* tests/test-c32isalpha.sh: New file.
* modules/c32isalpha-tests: New file.

5 years agoc32isalpha: New module.
Bruno Haible [Sat, 25 Jan 2020 22:45:56 +0000 (23:45 +0100)]
c32isalpha: New module.

* lib/c32isalpha.c: New file.
* modules/c32isalpha: New file.
* doc/posix-functions/iswalpha.texi: Mention the new module.

5 years agoc32isalnum: Add tests.
Bruno Haible [Sat, 25 Jan 2020 22:44:09 +0000 (23:44 +0100)]
c32isalnum: Add tests.

* tests/test-c32isalnum.c: New file.
* tests/test-c32isalnum.sh: New file.
* modules/c32isalnum-tests: New file.

5 years agoc32isalnum: New module.
Bruno Haible [Sat, 25 Jan 2020 22:36:41 +0000 (23:36 +0100)]
c32isalnum: New module.

* lib/c32isalnum.c: New file.
* lib/c32is-impl.h: New file.
* modules/c32isalnum: New file.
* doc/posix-functions/iswalnum.texi: Mention the new module.

5 years agouchar: Preparations for modules c32isalnum, ..., c32isxdigit.
Bruno Haible [Sat, 25 Jan 2020 21:51:04 +0000 (22:51 +0100)]
uchar: Preparations for modules c32isalnum, ..., c32isxdigit.

* lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl,
c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace,
c32isupper, c32isxdigit): New declarations.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM,
GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
* modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM,
GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
* tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha,
c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
c32ispunct, c32isspace, c32isupper, c32isxdigit.

5 years agombchar, wctype: Use the corrected iswxdigit function.
Bruno Haible [Sat, 25 Jan 2020 20:19:27 +0000 (21:19 +0100)]
mbchar, wctype: Use the corrected iswxdigit function.

* modules/mbchar (Depends-on): Add iswxdigit.
* modules/wctype (Depends-on): Likewise.

5 years agoiswxdigit: Add tests.
Bruno Haible [Sat, 25 Jan 2020 20:18:42 +0000 (21:18 +0100)]
iswxdigit: Add tests.

* tests/test-iswxdigit.c: New file.
* tests/test-iswxdigit.sh: New file.
* modules/iswxdigit-tests: New file.

5 years agoiswxdigit: New module.
Bruno Haible [Sat, 25 Jan 2020 20:17:51 +0000 (21:17 +0100)]
iswxdigit: New module.

* m4/iswxdigit.m4: New file.
* lib/wctype.in.h (iswxdigit): Potentially override.
(iswxdigit, rpl_iswxdigit): Test REPLACE_ISWXDIGIT, not
REPLACE_ISWCNTRL. Rely on ISO C compliant definition.
* lib/iswxdigit.c: New file.
* m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWXDIGIT,
REPLACE_ISWXDIGIT.
* modules/wctype-h (Makefile.am): Substitute GNULIB_ISWXDIGIT,
REPLACE_ISWXDIGIT.
* modules/iswxdigit: New file.
* doc/posix-functions/iswxdigit.texi: Mention the portability problem.

5 years agolseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE.
Bruno Haible [Sat, 25 Jan 2020 20:00:31 +0000 (21:00 +0100)]
lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE.

Reported by John Donoghue <john.david.donoghue@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00146.html>.

* lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit
off_t on mingw, invoke _lseeki64 instead of lseek.

5 years agoiswdigit tests: Avoid test failure on Cygwin.
Bruno Haible [Sat, 25 Jan 2020 19:45:03 +0000 (20:45 +0100)]
iswdigit tests: Avoid test failure on Cygwin.

* tests/test-iswdigit.c (for_character): If mbrtowc cannot convert the
byte sequence, return 0.

5 years agoiswdigit: Fix test failure on native Windows.
Bruno Haible [Sat, 25 Jan 2020 19:41:52 +0000 (20:41 +0100)]
iswdigit: Fix test failure on native Windows.

* lib/wctype.in.h (rpl_iswdigit): Rely on ISO C compliant definition.

5 years agoiswdigit: Fix module description.
Bruno Haible [Sat, 25 Jan 2020 16:07:51 +0000 (17:07 +0100)]
iswdigit: Fix module description.

* modules/iswdigit (Files): Add necessary files.

5 years agombchar, wctype: Use the corrected iswdigit function.
Bruno Haible [Sat, 25 Jan 2020 15:11:39 +0000 (16:11 +0100)]
mbchar, wctype: Use the corrected iswdigit function.

* modules/mbchar (Depends-on): Add iswdigit.
* modules/wctype (Depends-on): Likewise.

5 years agoiswdigit: Add tests.
Bruno Haible [Sat, 25 Jan 2020 15:05:55 +0000 (16:05 +0100)]
iswdigit: Add tests.

* tests/test-iswdigit.c: New file.
* tests/test-iswdigit.sh: New file.
* modules/iswdigit-tests: New file.

5 years agoiswdigit: New module.
Bruno Haible [Sat, 25 Jan 2020 15:03:15 +0000 (16:03 +0100)]
iswdigit: New module.

* m4/iswdigit.m4: New file.
* lib/wctype.in.h (iswdigit): Potentially override.
(iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL.
* lib/iswdigit.c: New file.
* m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT,
REPLACE_ISWDIGIT.
* modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT,
REPLACE_ISWDIGIT.
* modules/iswdigit: New file.
* doc/posix-functions/iswdigit.texi: Mention the portability problem.

5 years agohard-locale tests: Make it easy to reuse the musl test.
Bruno Haible [Sat, 25 Jan 2020 09:13:56 +0000 (10:13 +0100)]
hard-locale tests: Make it easy to reuse the musl test.

* m4/musl.m4: New file, extracted from modules/hard-locale-tests.
* modules/hard-locale-tests (Files): Add it.
(configure.ac): Invoke gl_MUSL_LIBC.

5 years agoregex: port to Gawk on nonstandard platforms
Paul Eggert [Fri, 24 Jan 2020 08:32:32 +0000 (00:32 -0800)]
regex: port to Gawk on nonstandard platforms

* lib/regex_internal.h (ULONG_WIDTH): Define if not already defined.
This is useful for Gawk, which does not use the Gnulib stdlib-h
module.  Problem reported by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html

5 years agoregex: fix bug with >=16 subexpressions
Paul Eggert [Wed, 22 Jan 2020 01:59:10 +0000 (17:59 -0800)]
regex: fix bug with >=16 subexpressions

* lib/regex_internal.h (struct re_backref_cache_entry):
Use bitset_word_t as the type of eps_reachable_subexps_map,
instead of unsigned short int.  This fixes a bug I introduced
to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit
2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302).
Remove unused member 'unused'.

5 years agoregex: simplify definition of BITSET_WORD_BITS
Paul Eggert [Wed, 22 Jan 2020 01:29:35 +0000 (17:29 -0800)]
regex: simplify definition of BITSET_WORD_BITS

* config/srclist.txt: Remove regex.c, regex_internal.h temporarily.
* lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define.
* lib/regex_internal.h (BITSET_WORD_BITS):
* modules/regex (Depends-on): Add limits-h.
Simplify now that we can use ULONG_WIDTH.

5 years agombrtoc32: Add note about FreeBSD 12.
Bruno Haible [Tue, 21 Jan 2020 00:55:50 +0000 (01:55 +0100)]
mbrtoc32: Add note about FreeBSD 12.

* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD.
* doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also
affected.

5 years agounistr/u8-uctomb: Fix warning.
Bruno Haible [Mon, 20 Jan 2020 17:40:59 +0000 (18:40 +0100)]
unistr/u8-uctomb: Fix warning.

Reported by Andreas Schwab <schwab@suse.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.

* lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
(u8_uctomb): Add FALLTHROUGH markers.

5 years agolock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
Bruno Haible [Mon, 20 Jan 2020 17:29:24 +0000 (18:29 +0100)]
lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).

* lib/glthread/lock.c (glthread_once_multithreaded): New function.
* lib/glthread/lock.h (glthread_once_multithreaded): New declaration.
(glthread_once): Use it.

5 years agothreadlib: Disable use of weak symbols on FreeBSD 11.
Bruno Haible [Mon, 20 Jan 2020 02:58:32 +0000 (03:58 +0100)]
threadlib: Disable use of weak symbols on FreeBSD 11.

Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00061.html>.

* m4/threadlib.m4 (gl_WEAK_SYMBOLS): Require AC_CANONICAL_HOST. Test
against a bug in FreeBSD 11.

5 years agoiconv_open: Improve z/OS support.
Bruno Haible [Sun, 19 Jan 2020 21:13:25 +0000 (22:13 +0100)]
iconv_open: Improve z/OS support.

* lib/iconv_open-zos.gperf: Choose better aliases. Add mapping for
ISO-8859-3, KOI8-R, KOI8-U, CP775, CP857, CP865, CP1129, CP1131, CP1257.
Remove mapping for EUC-TW.

5 years agoRename ~~gnulib.m4 to zzgnulib.m4.
Bruno Haible [Sat, 18 Jan 2020 22:05:36 +0000 (23:05 +0100)]
Rename ~~gnulib.m4 to zzgnulib.m4.

Suggested by Paul Eggert.

* m4/zzgnulib.m4: Renamed from m4/~~gnulib.m4.
* gnulib-tool (func_get_filelist): Update.
* pygnulib/GLModuleSystem.py (getFiles): Likewise.

5 years agodoc: Update license notices.
Bruno Haible [Sat, 18 Jan 2020 18:32:40 +0000 (19:32 +0100)]
doc: Update license notices.

* doc/*.texi: Reference the GFDL 1.3 through a URL, rather than by
reference to a section or to a "file as part of this distribution".

5 years agoAvoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)".
Bruno Haible [Sat, 18 Jan 2020 18:02:19 +0000 (19:02 +0100)]
Avoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)".

Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00109.html>.

* m4/00gnulib.m4 (gl_COMPILER_CLANG): Use _AC_COMPILE_IFELSE, not
AC_EGREP_CPP.

5 years agoEnsure Automake does not drop ~~gnulib.m4.
Bruno Haible [Sat, 18 Jan 2020 13:33:33 +0000 (14:33 +0100)]
Ensure Automake does not drop ~~gnulib.m4.

* m4/~~gnulib.m4 (gl_ZZGNULIB): New macro.
* m4/gnulib-common.m4 (gl_COMMON): Require it.

5 years agoFix major regression from 2020-01-10.
Bruno Haible [Sat, 18 Jan 2020 13:03:36 +0000 (14:03 +0100)]
Fix major regression from 2020-01-10.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00079.html>.

* m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
Don't AC_REQUIRE anything.
(gl_COMPILER_PREPARE_CHECK_DECL): Define through AC_DEFUN, not
AC_DEFUN_ONCE. Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE.
(_AC_CHECK_DECL_BODY): If ac_compile_for_check_decl has not been set,
use ac_compile instead.
(AC_CHECK_DECL): Remove override.
* m4/~~gnulib.m4: New file.
* gnulib-tool (func_get_filelist): Add also ~~gnulib.m4.
* pygnulib/GLModuleSystem.py (getFiles): Likewise.

5 years agoglob: Fix use-after-free bug.
Bruno Haible [Fri, 17 Jan 2020 20:56:01 +0000 (21:56 +0100)]
glob: Fix use-after-free bug.

Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00102.html>.

* lib/glob.c (__glob): Delay freeing dirname until after the use of
end_name.

5 years agovcs-to-changelog: Fix parsing of fndecl without args.
Siddhesh Poyarekar [Thu, 16 Jan 2020 16:11:34 +0000 (21:41 +0530)]
vcs-to-changelog: Fix parsing of fndecl without args.

* build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular
expression for empty arguments.

5 years agovcs-to-changelog: Add documentation.
Siddhesh Poyarekar [Thu, 16 Jan 2020 08:03:00 +0000 (13:33 +0530)]
vcs-to-changelog: Add documentation.

* doc/vcs-to-changelog.texi: New file.
* doc/gnulib.texi (Build Infrastructure Modules): Add
vcs-to-changelog section.

5 years agovcs-to-changelog: Allow loading of custom quirks file
Siddhesh Poyarekar [Thu, 16 Jan 2020 07:19:55 +0000 (12:49 +0530)]
vcs-to-changelog: Allow loading of custom quirks file

gnulib does not have a quirks file and if the scripts are not copied
over to the project tree, it may never find the quirks file in the
right place.  Add a flag to vcs_to_changelog.py to allow one to
specify the location of the quirks file instead.

* build-aux/vcs_to_changelog.py: New commandline option -q.

5 years agovcs-to-changelog: Fix formatting of ChangeLog output.
Siddhesh Poyarekar [Thu, 16 Jan 2020 07:19:54 +0000 (12:49 +0530)]
vcs-to-changelog: Fix formatting of ChangeLog output.

Add another newline when the number of files differing is too large.
This is typical for across-the-board changes such as copyright year
updates.

* build-aux/vcstocl/vcs_git.py (list_changes): Add newline in
print output.

5 years agovcs-to-changelog: Drop python3 shebang from frontend_c.py
Siddhesh Poyarekar [Thu, 16 Jan 2020 07:19:53 +0000 (12:49 +0530)]
vcs-to-changelog: Drop python3 shebang from frontend_c.py

frontend_c.py is not executed directly and hence does not need it.

* build-aux/vcstocl/frontend_c.py: Remove shebang.

5 years agocrypto/gc-pbkdf2: New module.
Simon Josefsson [Wed, 15 Jan 2020 22:10:58 +0000 (23:10 +0100)]
crypto/gc-pbkdf2: New module.

* MODULES.html.sh (func_all_modules): Add gc-pbkdf2.
* NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2.
* lib/gc-pbkdf2.c: New file.
* lib/gc-pbkdf2-sha1.c: Use new interface.
* lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add.
* modules/crypto/gc-pbkdf2: New file.
* modules/crypto/gc-pbkdf2-tests: New file.
* tests/test-gc-pbkdf2.c: New file.

5 years agoc32stombs: Add tests.
Bruno Haible [Sun, 12 Jan 2020 23:17:47 +0000 (00:17 +0100)]
c32stombs: Add tests.

* tests/test-c32stombs.c: New file, based on tests/test-c32srtombs.c.
* tests/test-c32stombs-1.sh: New file, based on
tests/test-c32srtombs-1.sh.
* tests/test-c32stombs-2.sh: New file, based on
tests/test-c32srtombs-2.sh.
* tests/test-c32stombs-3.sh: New file, based on
tests/test-c32srtombs-3.sh.
* tests/test-c32stombs-4.sh: New file, based on
tests/test-c32srtombs-4.sh.
* modules/c32stombs-tests: New file, based on modules/c32srtombs-tests.

5 years agoc32stombs: New module.
Bruno Haible [Sun, 12 Jan 2020 23:16:48 +0000 (00:16 +0100)]
c32stombs: New module.

* lib/uchar.in.h (c32stombs): New declaration.
* lib/c32stombs.c: New file.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32STOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32STOMBS.
* modules/c32stombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32stombs.
* doc/posix-functions/wcstombs.texi: Mention the new module.

5 years agoperl: require the "warnings" module
Jim Meyering [Sun, 12 Jan 2020 02:59:42 +0000 (18:59 -0800)]
perl: require the "warnings" module

* m4/perl.m4: Also "use warnings", so we reject the perl found
on at least one IRIX 6.5 system. Reported by Bruno Haible in
https://lists.gnu.org/r/sed-devel/2020-01/msg00004.html

5 years agoFix major regression from 2020-01-04.
Bruno Haible [Fri, 10 Jan 2020 22:44:18 +0000 (23:44 +0100)]
Fix major regression from 2020-01-04.

Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00072.html>.

* m4/00gnulib.m4 (gl_COMPILER_PREPARE_CHECK_DECL): Define through
AC_DEFUN_ONCE.
(AC_CHECK_DECL): Invoke, not require, it.

5 years agoc32snrtombs: Add tests.
Bruno Haible [Fri, 10 Jan 2020 22:29:57 +0000 (23:29 +0100)]
c32snrtombs: Add tests.

* tests/test-c32snrtombs.c: New file, based on tests/test-wcsnrtombs.c.
* tests/test-c32snrtombs-1.sh: New file, based on
tests/test-wcsnrtombs1.sh.
* tests/test-c32snrtombs-2.sh: New file, based on
tests/test-wcsnrtombs2.sh.
* tests/test-c32snrtombs-3.sh: New file, based on
tests/test-wcsnrtombs3.sh.
* tests/test-c32snrtombs-4.sh: New file, based on
tests/test-wcsnrtombs4.sh.
* modules/c32snrtombs-tests: New file, based on
modules/wcsnrtombs-tests.

5 years agoc32snrtombs: New module.
Bruno Haible [Fri, 10 Jan 2020 22:28:47 +0000 (23:28 +0100)]
c32snrtombs: New module.

* lib/uchar.in.h (c32snrtombs): New declaration.
* lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
INTERNAL_STATE, WCRTOMB.
* lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
* lib/c32snrtombs.c: New file.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS.
* modules/c32snrtombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32snrtombs.
* doc/posix-functions/wcsnrtombs.texi: Mention the new module.

5 years agoc32srtombs: Add tests.
Bruno Haible [Thu, 9 Jan 2020 15:21:53 +0000 (16:21 +0100)]
c32srtombs: Add tests.

* tests/test-c32srtombs.c: New file, based on tests/test-wcsrtombs.c.
* tests/test-c32srtombs-1.sh: New file, based on
tests/test-wcsrtombs1.sh.
* tests/test-c32srtombs-2.sh: New file, based on
tests/test-wcsrtombs2.sh.
* tests/test-c32srtombs-3.sh: New file, based on
tests/test-wcsrtombs3.sh.
* tests/test-c32srtombs-4.sh: New file, based on
tests/test-wcsrtombs4.sh.
* modules/c32srtombs-tests: New file, based on modules/wcsrtombs-tests.

5 years agoc32srtombs: New module.
Bruno Haible [Thu, 9 Jan 2020 15:20:10 +0000 (16:20 +0100)]
c32srtombs: New module.

* lib/uchar.in.h (c32srtombs): New declaration.
* lib/wcsrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
INTERNAL_STATE, WCRTOMB.
* lib/wcsrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
* lib/c32srtombs.c: New file.
* lib/c32srtombs-state.c: New file, based on lib/wcsrtombs-state.c.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SRTOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32SRTOMBS.
* modules/c32srtombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32srtombs.
* doc/posix-functions/wcsrtombs.texi: Mention the new module.