]> Savannah Git Hosting - gnulib.git/log
gnulib.git
7 years agolocalename: Add support for musl libc.
Bruno Haible [Sat, 24 Feb 2018 11:59:59 +0000 (12:59 +0100)]
localename: Add support for musl libc.

* m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>.
* lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
on Linux platforms which define NL_LOCALE_NAME.

7 years agombrtowc tests: Don't make assumptions about the charset the C locale.
Bruno Haible [Sat, 24 Feb 2018 11:01:30 +0000 (12:01 +0100)]
mbrtowc tests: Don't make assumptions about the charset the C locale.

* tests/test-mbrtowc.c (main): For bytes >= 0x80, don't assume a
particular mapping in the C locale.

7 years agoptsname_r: Don't expect that this function sets errno.
Bruno Haible [Sat, 24 Feb 2018 09:53:24 +0000 (10:53 +0100)]
ptsname_r: Don't expect that this function sets errno.

* tests/test-ptsname_r.c (test_errors): Don't test errno after return
from ptsname_r().
* doc/glibc-functions/ptsname_r.texi: Mention the issue.

7 years agoxmalloca: pacify gcc -Wbad-function-cast
Bruno Haible [Sat, 24 Feb 2018 00:33:35 +0000 (01:33 +0100)]
xmalloca: pacify gcc -Wbad-function-cast

* lib/xmalloca.h (xmalloca): Insert intermediate cast here as well.

7 years agonl_langinfo: pacify gcc -Wunused-function
Paul Eggert [Fri, 23 Feb 2018 21:15:24 +0000 (13:15 -0800)]
nl_langinfo: pacify gcc -Wunused-function

* lib/nl_langinfo.c (ctype_codeset): Do not define if
REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
this case.  Without this change, I got a diagnostic when building
coreutils on Fedora 27 with gcc 7.3.1 20180130.

7 years agosame: pacify gcc -Wunused-variable
Paul Eggert [Fri, 23 Feb 2018 20:52:42 +0000 (12:52 -0800)]
same: pacify gcc -Wunused-variable

* lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
Omit unused variable.

7 years agomalloca: pacify gcc -Wbad-function-cast
Paul Eggert [Fri, 23 Feb 2018 20:47:38 +0000 (12:47 -0800)]
malloca: pacify gcc -Wbad-function-cast

* lib/malloca.h (malloca): Pacify gcc -Wbad-function-cast
diagnostic that I got on Fedora 27 with gcc 7.3.1 20180130.
To pacify GCC, I had to cast alloca’s result to some type other
than void * before casting that to uintptr_t.

7 years agoautoupdate
Karl Berry [Thu, 22 Feb 2018 15:43:48 +0000 (07:43 -0800)]
autoupdate

7 years agoutimecmp: new function utimecmpat
Paul Eggert [Tue, 20 Feb 2018 17:06:51 +0000 (09:06 -0800)]
utimecmp: new function utimecmpat

* lib/utimecmp.c: Include fcntl.h, sys/stat.h and dirname.h.
Do not include utimens.h.
(utimecmpat): New function, generalizing utimecmp.
(utimecmp): Now a thin layer around utimecmpat.
* modules/utimecmp (Depends-on): Depend on dirname-lgpl, fstatat,
utimensat instead of on lstat and utimens.

7 years agosame: new function same_nameat
Paul Eggert [Tue, 20 Feb 2018 17:05:48 +0000 (09:05 -0800)]
same: new function same_nameat

* lib/same.c: Include fcntl.h.
* lib/same.c (same_nameat): New function, generalizing same_name.
(same_name): Now a thin layer around same_nameat.
* m4/same.m4 (gl_SAME): Check for fpathconf, not pathconf.
* modules/same (Depends-on): Depend on fstatat, openat.

7 years agowarnings: Add support for Objective C.
Eric Gallager [Sun, 18 Feb 2018 14:41:09 +0000 (15:41 +0100)]
warnings: Add support for Objective C.

* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): New
macro.

7 years agolock: Fix test-once1 crash on FreeBSD11.
Bruno Haible [Sat, 17 Feb 2018 09:23:35 +0000 (10:23 +0100)]
lock: Fix test-once1 crash on FreeBSD11.

* lib/glthread/lock.h: On FreeBSD, test the weak value of the symbol
'pthread_create', not 'pthread_cancel'.

7 years agolock: Add test of gl_once.
Bruno Haible [Sat, 17 Feb 2018 09:05:01 +0000 (10:05 +0100)]
lock: Add test of gl_once.

* tests/test-once.c: New file.
* modules/lock-tests (Files): Add it.
(Makefile.am): Build and test programs 'test-once1' and 'test-once2'.

7 years agothread: Fix compilation error on IRIX.
Bruno Haible [Sat, 17 Feb 2018 08:55:43 +0000 (09:55 +0100)]
thread: Fix compilation error on IRIX.

* lib/glthread/thread.h: Include <unistd.h>. Include <signal.h> when
needed; include it outside the C++ extern "C" {} block.
* doc/posix-headers/pthread.texi: Mention the problem with
pthread_atfork on IRIX.

7 years agonl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible [Sun, 4 Feb 2018 10:00:38 +0000 (11:00 +0100)]
nl_langinfo: Override the system's nl_langinfo() when needed.

Reported by Jim Meyering.

* m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set REPLACE_NL_LANGINFO=1
also when HAVE_LANGINFO_T_FMT_AMPM or HAVE_LANGINFO_ALTMON is 0.

7 years agosignal-h, monetary, strings: Fix build failure in some cases.
Bruno Haible [Sun, 4 Feb 2018 09:42:45 +0000 (10:42 +0100)]
signal-h, monetary, strings: Fix build failure in some cases.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* modules/signal-h (Makefile.am): In the GNULIB_* substitutions, use '/'
as delimiter in sed command, not '|'.
* modules/monetary (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.

7 years agomaint.mk: exempt "/proc/filesystems" from "file system" syntax check
Jim Meyering [Sun, 4 Feb 2018 00:57:36 +0000 (16:57 -0800)]
maint.mk: exempt "/proc/filesystems" from "file system" syntax check

* top/maint.mk (sc_file_system): Don't complain about
"/proc/filesystems".

7 years agostdlib: Fix compilation error on OpenIndiana.
Bruno Haible [Sat, 3 Feb 2018 13:05:45 +0000 (14:05 +0100)]
stdlib: Fix compilation error on OpenIndiana.

* lib/stdlib.in.h: Before including <sys/loadavg.h>, include
<sys/time.h>.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.

7 years agohost-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
Bruno Haible [Sat, 3 Feb 2018 11:50:17 +0000 (12:50 +0100)]
host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.

* m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
and use $EGREP instead of 'grep -E'.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
'grep -E'.

7 years agomalloca: Add a compile-time verification.
Paul Eggert [Fri, 2 Feb 2018 23:47:15 +0000 (00:47 +0100)]
malloca: Add a compile-time verification.

* lib/malloca.c (small_t): Verify that it is wide enough.
* modules/malloca (Depends-on): Add verify.

7 years agomalloca: Add an argument check.
Bruno Haible [Fri, 2 Feb 2018 23:32:41 +0000 (00:32 +0100)]
malloca: Add an argument check.

Suggested by Paul Eggert.

* lib/malloca.c (freea): Check against an invalid argument.

7 years agolocalename: Add support for OpenIndiana.
Bruno Haible [Fri, 2 Feb 2018 20:34:14 +0000 (21:34 +0100)]
localename: Add support for OpenIndiana.

* lib/localename.c (gl_locale_name_thread_unsafe): Add code for
Solaris 11 variants with uselocale() but without getlocalename_l().

7 years agomalloca, xmalloca: Make multithread-safe.
Bruno Haible [Fri, 2 Feb 2018 18:32:02 +0000 (19:32 +0100)]
malloca, xmalloca: Make multithread-safe.

Reported by Florian Weimer <fweimer@redhat.com>.
Implements an idea by Ondřej Bílka <neleai@seznam.cz>.

* lib/malloca.h (malloca): In the stack allocation case, return a
pointer that is a multiple of 2 * sa_alignment_max.
(sa_increment): Remove enum item.
* lib/xmalloca.h (xmalloca): In the stack allocation case, return
a pointer that is a multiple of 2 * sa_alignment_max.
* lib/malloca.c (NO_SANITIZE_MEMORY): Remove macro.
(MAGIC_NUMBER, MAGIC_SIZE, preliminary_header, HEADER_SIZE, header,
HASH_TABLE_SIZE, mmalloca_results): Remove.
(small_t): New type.
(mmalloca, free): Rewritten.
* lib/malloca.valgrind: Remove file.
* modules/malloca (Files): Remove it.
(Depends-on): Remove verify.

7 years agoenviron: Fix link error on 64-bit Cygwin.
Bruno Haible [Wed, 31 Jan 2018 08:04:52 +0000 (09:04 +0100)]
environ: Fix link error on 64-bit Cygwin.

* lib/unistd.in.h (environ): On Cygwin, redeclare with the
__declspec(dllimport) attribute.
* doc/posix-functions/environ.texi: Mention the Cygwin problem.

7 years agoget-rusage-data: Add support for Minix 3.
Bruno Haible [Tue, 30 Jan 2018 08:05:57 +0000 (09:05 +0100)]
get-rusage-data: Add support for Minix 3.

* lib/get-rusage-data.c (get_rusage_data): Return 0 on Minix.

7 years agovma-iter: Add support for Minix 3.
Bruno Haible [Tue, 30 Jan 2018 08:02:46 +0000 (09:02 +0100)]
vma-iter: Add support for Minix 3.

* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Minix.
* lib/vma-iter.c: On Minix, read /proc/<pid>/map.

7 years agoFix malfunction of socket functions on HP-UX in 64-bit mode.
Bruno Haible [Sat, 27 Jan 2018 09:57:59 +0000 (10:57 +0100)]
Fix malfunction of socket functions on HP-UX in 64-bit mode.

* m4/socketlib.m4 (gl_SOCKETLIB): Add comment.
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define
_HPUX_ALT_XOPEN_SOCKET_API.
* modules/accept (Depends-on): Add 'extensions'.
* modules/getpeername (Depends-on): Likewise.
* modules/getsockname (Depends-on): Likewise.
* modules/getsockopt (Depends-on): Likewise.
* modules/recvfrom (Depends-on): Likewise.
* doc/posix-functions/accept.texi: Mention the HP-UX socklen_t problem.
* doc/posix-functions/getpeername.texi: Likewise.
* doc/posix-functions/getsockname.texi: Likewise.
* doc/posix-functions/getsockopt.texi: Likewise.
* doc/posix-functions/recvfrom.texi: Likewise.

7 years agogetsockname tests: More tests.
Bruno Haible [Sat, 27 Jan 2018 07:52:31 +0000 (08:52 +0100)]
getsockname tests: More tests.

* tests/test-getsockname.c (open_server_socket): New function, mostly
copied from test-poll.c.
(main): Check that getsockname fills in addr.
* modules/getsockname-tests (Depends-on): Add the necessary
dependencies.
(test_getsockname_LDADD): Link with $(INET_PTON_LIB).

7 years agomanywarnings: fix maintainer comment
Paul Eggert [Sat, 27 Jan 2018 02:08:36 +0000 (18:08 -0800)]
manywarnings: fix maintainer comment

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
it does not mistakenly think that ‘-1)’ is an option.

7 years agoautoupdate
Karl Berry [Fri, 26 Jan 2018 16:52:43 +0000 (08:52 -0800)]
autoupdate

7 years agolanginfo: Fix last commit.
Bruno Haible [Fri, 26 Jan 2018 04:51:55 +0000 (05:51 +0100)]
langinfo: Fix last commit.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_ALTMON.

7 years agolanginfo, nl_langinfo: Add support for alternative month names.
Bruno Haible [Wed, 24 Jan 2018 09:02:17 +0000 (10:02 +0100)]
langinfo, nl_langinfo: Add support for alternative month names.

* m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON.
* lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros.
* lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i.
* tests/test-nl_langinfo.c (main): Test ALTMON_*.
* doc/posix-headers/langinfo.texi: Document support of ALTMON_*.
* doc/posix-functions/nl_langinfo.texi: Likewise.

7 years agoMerge strftime.c changes from glibc
Paul Eggert [Tue, 23 Jan 2018 08:42:04 +0000 (00:42 -0800)]
Merge strftime.c changes from glibc

This incorporates:
2017-11-14 [BZ #10871] Implement alternative month names
2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob)
2017-06-20 Use locale_t, not __locale_t, throughout glibc
* lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro.
(LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]:
Use locale_t, not __locale_t.
(a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros.
(__strftime_internal): Add support for alternate months.

7 years agoFix typo in comment.
Reuben Thomas [Tue, 23 Jan 2018 08:15:49 +0000 (09:15 +0100)]
Fix typo in comment.

* lib/glthread/thread.h: Fix typo.

7 years agodoc: Mention another prerequisite for using Gnulib.
Bruno Haible [Tue, 23 Jan 2018 08:13:13 +0000 (09:13 +0100)]
doc: Mention another prerequisite for using Gnulib.

Reported at <https://stackoverflow.com/questions/48378214/>.

* doc/gnulib-tool.texi (Initial import): Mention requirement to use
AC_CONFIG_HEADERS.

7 years agobuild: GuixSD doesn't have /bin/bash
Mathieu Lirzin [Mon, 22 Jan 2018 21:14:55 +0000 (22:14 +0100)]
build: GuixSD doesn't have /bin/bash

* Makefile (SHELL): Search 'bash' in the PATH environment variable.

7 years agoAvoid test failures on Microsoft Windows Subsystem for Linux.
Bruno Haible [Mon, 22 Jan 2018 04:01:48 +0000 (05:01 +0100)]
Avoid test failures on Microsoft Windows Subsystem for Linux.

* tests/test-fcntl.c (main): Allow a different errno.
* tests/test-rename.h (test_rename): Likewise.
* tests/test-renameat.c (main): Likewise.
* tests/test-renameat2.c (main): Likewise.

7 years agocanonicalize-lgpl: fix typo
Paul Eggert [Wed, 17 Jan 2018 23:09:59 +0000 (15:09 -0800)]
canonicalize-lgpl: fix typo

Problem reported by Reuben Thomas.

7 years agoautoupdate
Karl Berry [Wed, 17 Jan 2018 18:09:24 +0000 (10:09 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Tue, 16 Jan 2018 17:08:02 +0000 (09:08 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Mon, 15 Jan 2018 17:52:48 +0000 (09:52 -0800)]
autoupdate

7 years agofilenamecat: make base a suffix of result
Paul Eggert [Sun, 14 Jan 2018 21:27:20 +0000 (13:27 -0800)]
filenamecat: make base a suffix of result

* lib/filenamecat-lgpl.c (longest_relative_suffix): Remove.
(mfile_name_concat): Always make BASE a suffix of the result, as
cp expects this.  To implement this, separate with '.' instead of
'/' in some rare cases.  Clarify spec to say ./BASE not BASE.
* tests/test-filenamecat.c (main): Adjust tests to match
current behavior.  Check that BASE_IN_RESULT points to
a copy of BASE and is a suffix of the resultk, and that DIR
is a prefix of the result that is no longer than the prefix
indicated by BASE_IN_RESULT.

7 years agoautoupdate
Karl Berry [Sun, 14 Jan 2018 17:51:15 +0000 (09:51 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Sat, 13 Jan 2018 17:04:47 +0000 (09:04 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Thu, 11 Jan 2018 17:05:03 +0000 (09:05 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Wed, 10 Jan 2018 19:03:49 +0000 (11:03 -0800)]
autoupdate

7 years agomaint: Add encoding marker for Emacs to non-ASCII sources.
Bruno Haible [Fri, 5 Jan 2018 21:08:14 +0000 (22:08 +0100)]
maint: Add encoding marker for Emacs to non-ASCII sources.

Similar to commit f406941a8a2ec5fbf3eacc386b9be09d6593d53b
from Paul Eggert <eggert@cs.ucla.edu> 2015-09-24.

To determine the file list that need the marker, I used the command:

for f in `find . -type f | grep -v '^\./\.git/' | grep -v '^\./tests/'`; do
  if iconv -f ASCII -t ASCII < $f > /dev/null 2>&1 ; then : ; else
    if iconv -f UTF-8 -t UTF-8 < $f > /dev/null 2>&1 ; then
      if grep 'The GNU C Library is' $f > /dev/null; then :; else
        if grep 'coding: utf-8' $f > /dev/null; then :; else
          echo $f
        fi
      fi
    fi
  fi
done | LC_ALL=C sort

7 years agoupdate-copyright: Handle use of ©
Mathieu Lirzin [Thu, 4 Jan 2018 14:59:04 +0000 (15:59 +0100)]
update-copyright: Handle use of ©

* build-aux/update-copyright ($circle_c_re): Update regex to
handle use of © in headers.

7 years agoautoupdate
Karl Berry [Fri, 5 Jan 2018 17:36:34 +0000 (09:36 -0800)]
autoupdate

7 years agoFix -Wundef warning in user-included header lib/cdefs.h.
Tim Rühsen [Wed, 3 Jan 2018 10:50:07 +0000 (11:50 +0100)]
Fix -Wundef warning in user-included header lib/cdefs.h.

* lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.

7 years agopthread_sigmask: Avoid compilation error on mingw.
Bruno Haible [Thu, 4 Jan 2018 09:42:21 +0000 (10:42 +0100)]
pthread_sigmask: Avoid compilation error on mingw.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* lib/signal.in.h (pthread_sigmask): Don't declare it it's defined as a
macro.

7 years agotest-framework-sh: ‘ps -ef’, not ‘ps ef’
Paul Eggert [Wed, 3 Jan 2018 21:29:49 +0000 (13:29 -0800)]
test-framework-sh: ‘ps -ef’, not ‘ps ef’

* tests/init.sh (rand_bytes_): Put ‘-’ before new-style ps options.
Suggested by Bob Proulx (Bug#29968).
* build-aux/mktempd (rand_bytes): Make it like tests/init.sh.

7 years agostat-time: silence -Wunused-parameter regression
Eric Blake [Tue, 2 Jan 2018 21:49:27 +0000 (15:49 -0600)]
stat-time: silence -Wunused-parameter regression

Commit 2c5d5587 causes warnings on non-Sun systems when compiled
under -Wunused-parameter; we've previously tweaked code in commit
81eb8486 to avoid such warnings.  Prefer an attribute rather than
a cast to void (the attribute is always okay to apply; gcc
interprets it as 'may be unused', not 'must not be used', precisely
to cater to #if chains where determining whether or not the
parameter is used gets hairy).

* lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
Prefer attribute over cast-to-void.
(stat_time_normalize): Mark st as potentially unused.

Signed-off-by: Eric Blake <eblake@redhat.com>
7 years agotest-framework-sh: avoid netstat
Paul Eggert [Wed, 3 Jan 2018 03:05:05 +0000 (19:05 -0800)]
test-framework-sh: avoid netstat

Problem reported by Kristýna Streitová (Bug#29947).
* tests/init.sh (rand_bytes_): Stop using netstat, as it's
deprecated on SuSE and it's not that important anyway.

7 years agoautoupdate
Karl Berry [Tue, 2 Jan 2018 16:30:34 +0000 (08:30 -0800)]
autoupdate

7 years agoupdate-copyright: add code to handle more special cases
Jim Meyering [Tue, 2 Jan 2018 00:12:39 +0000 (16:12 -0800)]
update-copyright: add code to handle more special cases

After running "make update-copyright" this year, five files
required additional manual changes.  Automate those adjustments
for next year.
* Makefile (_year_and_prev): Define.
(update-copyright): Add perl commands to induce this year's post-
update-copyright adjustments.

7 years agoautoupdate
Karl Berry [Mon, 1 Jan 2018 16:52:44 +0000 (08:52 -0800)]
autoupdate

7 years agoversion-etc: new year
Paul Eggert [Mon, 1 Jan 2018 00:57:25 +0000 (00:57 +0000)]
version-etc: new year

* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.

7 years agomaint: Run 'make update-copyright'
Paul Eggert [Mon, 1 Jan 2018 00:57:25 +0000 (00:57 +0000)]
maint: Run 'make update-copyright'

7 years agomaint: fix 'make update-copyright'
Paul Eggert [Mon, 1 Jan 2018 00:43:46 +0000 (16:43 -0800)]
maint: fix 'make update-copyright'

* Makefile (update-copyright): Adjust to 2016-11-23 change
to config/srclist-update, which changed the format of srclist.txt.

7 years agoautoupdate
Paul Eggert [Mon, 1 Jan 2018 00:26:12 +0000 (16:26 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Sun, 31 Dec 2017 16:53:16 +0000 (08:53 -0800)]
autoupdate

7 years agochdir-safer: remove this module
Paul Eggert [Sun, 31 Dec 2017 00:34:32 +0000 (16:34 -0800)]
chdir-safer: remove this module

* MODULES.html.sh (func_all_modules): Remove chdir-safer.
* NEWS: Document removal.
* lib/chdir-safer.c, lib/chdir-safer.h, m4/afs.m4, m4/chdir-safer.m4:
* modules/chdir-safer: Remove these files.

7 years agoAdd cross-compilation results for GNU/Hurd.
Samuel Thibault [Fri, 29 Dec 2017 16:30:07 +0000 (17:30 +0100)]
Add cross-compilation results for GNU/Hurd.

* m4/calloc.m4: Add GNU/Hurd guess.
* m4/cbrtl.m4: Likewise.
* m4/ceil.m4: Likewise.
* m4/ceilf.m4: Likewise.
* m4/ceill.m4: Likewise.
* m4/chown.m4: Likewise.
* m4/duplocale.m4: Likewise.
* m4/exp2l.m4: Likewise.
* m4/expm1.m4: Likewise.
* m4/fchdir.m4: Likewise.
* m4/floor.m4: Likewise.
* m4/floorf.m4: Likewise.
* m4/fmod.m4: Likewise.
* m4/fmodf.m4: Likewise.
* m4/fmodl.m4: Likewise.
* m4/getcwd.m4: Likewise.
* m4/getgroups.m4: Likewise.
* m4/gettimeofday.m4: Likewise.
* m4/hypot.m4: Likewise.
* m4/hypotf.m4: Likewise.
* m4/hypotl.m4: Likewise.
* m4/link-follow.m4: Likewise.
* m4/link.m4: Likewise.
* m4/linkat.m4: Likewise.
* m4/log.m4: Likewise.
* m4/log10.m4: Likewise.
* m4/log10f.m4: Likewise.
* m4/log1p.m4: Likewise.
* m4/log1pf.m4: Likewise.
* m4/log1pl.m4: Likewise.
* m4/log2.m4: Likewise.
* m4/log2f.m4: Likewise.
* m4/logf.m4: Likewise.
* m4/lstat.m4: Likewise.
* m4/malloc.m4: Likewise.
* m4/mbrlen.m4: Likewise.
* m4/mbrtowc.m4: Likewise.
* m4/mkdir.m4: Likewise.
* m4/mkfifo.m4: Likewise.
* m4/mknod.m4: Likewise.
* m4/mkstemp.m4: Likewise.
* m4/modf.m4: Likewise.
* m4/modff.m4: Likewise.
* m4/modfl.m4: Likewise.
* m4/printf.m4: Likewise.
* m4/pselect.m4: Likewise.
* m4/ptsname.m4: Likewise.
* m4/putenv.m4: Likewise.
* m4/readlink.m4: Likewise.
* m4/realloc.m4: Likewise.
* m4/remainder.m4: Likewise.
* m4/remainderf.m4: Likewise.
* m4/remainderl.m4: Likewise.
* m4/rmdir.m4: Likewise.
* m4/round.m4: Likewise.
* m4/roundf.m4: Likewise.
* m4/roundl.m4: Likewise.
* m4/select.m4: Likewise.
* m4/setenv.m4: Likewise.
* m4/signbit.m4: Likewise.
* m4/sleep.m4: Likewise.
* m4/stat.m4: Likewise.
* m4/strerror.m4: Likewise.
* m4/strtok_r.m4: Likewise.
* m4/symlink.m4: Likewise.
* m4/symlinkat.m4: Likewise.
* m4/trunc.m4: Likewise.
* m4/truncf.m4: Likewise.
* m4/truncl.m4: Likewise.
* m4/tzset.m4: Likewise.
* m4/ungetc.m4: Likewise.
* m4/usleep.m4: Likewise.
* m4/wcwidth.m4: Likewise.

7 years agognulib-tool: Make --conditional-dependencies work better.
Bruno Haible [Thu, 28 Dec 2017 23:29:23 +0000 (00:29 +0100)]
gnulib-tool: Make --conditional-dependencies work better.

Reported by Dmitry Selyutin <ghostman.sd@gmail.com>.

* gnulib-tool (Options): Don't reject the combination of
--conditional-dependencies with --with-tests.
(func_emit_autoconf_snippets): Add argument referenceable_modules.
Don't reference $modules.
(func_import, func_create_testdir): Pass it.

7 years agoautoupdate
Karl Berry [Thu, 28 Dec 2017 00:05:51 +0000 (16:05 -0800)]
autoupdate

7 years agoregex: use re_malloc etc. consistently
Paul Eggert [Tue, 19 Dec 2017 23:53:47 +0000 (15:53 -0800)]
regex: use re_malloc etc. consistently

Problem and original patch reported by Arnold Robbins in:
https://sourceware.org/ml/libc-alpha/2017-12/msg00241.html
* lib/regcomp.c (re_comp):
* lib/regexec.c (push_fail_stack, build_trtable, match_ctx_clean):
Use re_malloc/re_realloc/re_free instead of malloc/realloc/free.

7 years agoautoupdate
Karl Berry [Tue, 19 Dec 2017 17:05:15 +0000 (09:05 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Sun, 17 Dec 2017 16:02:54 +0000 (08:02 -0800)]
autoupdate

7 years agoglob: Silence warning about void pointer arithmetic.
Tim Rühsen [Sat, 16 Dec 2017 03:02:01 +0000 (04:02 +0100)]
glob: Silence warning about void pointer arithmetic.

* lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
arithmetic.

7 years agoglob.c: Silence warning about void pointer arithmetic
Tim Rühsen [Sat, 16 Dec 2017 01:27:21 +0000 (17:27 -0800)]
glob.c: Silence warning about void pointer arithmetic

7 years agospawn-pipe: Silence a clang warning.
Bruno Haible [Fri, 15 Dec 2017 09:44:15 +0000 (10:44 +0100)]
spawn-pipe: Silence a clang warning.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* lib/spawn-pipe.c: Disable clang -Wconditional-uninitialized warnings
in this file.

7 years agoexplicit_bzero: port to macOS + Clang 9.0.0
Paul Eggert [Wed, 13 Dec 2017 00:41:21 +0000 (16:41 -0800)]
explicit_bzero: port to macOS + Clang 9.0.0

Problem reported by Marcus Johnson (Bug#29658).
* lib/explicit_bzero.c (explicit_bzero) [__clang__]:
Don’t use asm.

7 years agodoc: Improve explanation of supporting relocatable libraries.
Reuben Thomas [Mon, 11 Dec 2017 10:27:52 +0000 (10:27 +0000)]
doc: Improve explanation of supporting relocatable libraries.

* doc/relocatable-maint.texi (Supporting Relocation): Explain
properly how to build the relocatable module for
libraries. (Method and example code from Bruno Haible.)

7 years agodoc: Use better texinfo tags in a few cases.
Reuben Thomas [Mon, 11 Dec 2017 13:12:19 +0000 (14:12 +0100)]
doc: Use better texinfo tags in a few cases.

* doc/gnulib.texi (Extending Gnulib): Use @option or @command
instead of @samp in a few places.

7 years agounistr/base: Update comment.
Bruno Haible [Mon, 11 Dec 2017 13:08:40 +0000 (14:08 +0100)]
unistr/base: Update comment.

* lib/unistr.in.h: Update comment about u*_mbtouc_unsafe functions.

7 years agotest-faccessat.c: avoid test failure if prior partial run
Pádraig Brady [Mon, 11 Dec 2017 01:59:32 +0000 (17:59 -0800)]
test-faccessat.c: avoid test failure if prior partial run

* tests/test-faccessat.c: Remove the file if present
to ensure not present from a prior (partial) run.

7 years agotest-faccessat.c: unlink temp file to avoid subsequent test failure
Pádraig Brady [Mon, 11 Dec 2017 01:41:57 +0000 (17:41 -0800)]
test-faccessat.c: unlink temp file to avoid subsequent test failure

* tests/test-faccessat.c: Remove the file to avoid failure
to open the file on subsequent runs due to being created
with no permissions.

7 years agodoc: New section "Modifying the build rules of a Gnulib import directory".
Bruno Haible [Sun, 10 Dec 2017 15:28:43 +0000 (16:28 +0100)]
doc: New section "Modifying the build rules of a Gnulib import directory".

* doc/gnulib-tool.texi (Modified build rules): New node.

7 years agodoc: Tweak wording.
Bruno Haible [Sun, 10 Dec 2017 13:00:43 +0000 (14:00 +0100)]
doc: Tweak wording.

* doc/gnulib-tool.texi (Multiple instances): Talk about "programs", not
"binaries".

7 years agono-c++: Avoid "egrep: repetition-operator operand invalid" error.
Sam Steingold [Tue, 5 Dec 2017 16:02:33 +0000 (11:02 -0500)]
no-c++: Avoid "egrep: repetition-operator operand invalid" error.

* m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
AC_EGREP_CPP pattern.

7 years agoall: Replace more http URLs by https URLs.
Bruno Haible [Sun, 3 Dec 2017 22:35:26 +0000 (23:35 +0100)]
all: Replace more http URLs by https URLs.

7 years agoautoupdate
Karl Berry [Sun, 3 Dec 2017 17:18:35 +0000 (09:18 -0800)]
autoupdate

7 years agoPort better to CentOS 5
Paul Eggert [Tue, 28 Nov 2017 22:30:25 +0000 (14:30 -0800)]
Port better to CentOS 5

Problems reported by Tom G. Christensen in:
https://lists.gnu.org/r/bug-gnulib/2017-11/msg00053.html
* doc/glibc-functions/strverscmp.texi (strverscmp):
Document strverscmp bug with glibc 2.9 and earlier.
* doc/posix-functions/tzset.texi (tzset):
Document that TZ with angle brackets is POSIX-2001 and later.
* tests/test-nstrftime.c: Include unistd.h.
(TZ_ANGLE_BRACKETS_SHOULD_WORK): New macro.
(TZ): Use it to skip tests with angle brackets in TZ,
for older systems.

7 years agostat: add missing module dependencies
Paul Eggert [Tue, 28 Nov 2017 22:19:55 +0000 (14:19 -0800)]
stat: add missing module dependencies

* modules/lstat, modules/stat, modules/utimensat (Depends-on):
Add stat-time.

7 years agostat: fix compilation failure on macOS Sierra
Benno Schulenberg [Tue, 28 Nov 2017 19:42:17 +0000 (20:42 +0100)]
stat: fix compilation failure on macOS Sierra

Reported by Marius Schamschula <mschamschula@gmail.com> in
https://savannah.gnu.org/bugs/?52546
* lib/stat.c: Add missing include of stat-time.h.

7 years agotest-faccessat.c: correct BASE definition to avoid parallel test failure
Jim Meyering [Tue, 28 Nov 2017 15:52:47 +0000 (07:52 -0800)]
test-faccessat.c: correct BASE definition to avoid parallel test failure

* tests/test-faccessat.c (BASE): Define using this file's name, not
that of test-lstat.c.  Using the latter caused this test to fail
sometimes when run concurrently with test-lstat.

7 years agoautoupdate
Karl Berry [Mon, 27 Nov 2017 16:46:28 +0000 (08:46 -0800)]
autoupdate

7 years agounicase: fix VPATH build
Daiki Ueno [Mon, 27 Nov 2017 15:14:16 +0000 (16:14 +0100)]
unicase: fix VPATH build

* modules/unicase/special-casing (Makefile.am): Ensure that the
base directory is created when generating
unicase/special-casing.h.

7 years agoFix typo in comment, in my last commit.
Bruno Haible [Mon, 27 Nov 2017 14:45:19 +0000 (15:45 +0100)]
Fix typo in comment, in my last commit.

7 years agolibunistring: update to Unicode 9.0.0
Daiki Ueno [Mon, 27 Nov 2017 10:34:25 +0000 (11:34 +0100)]
libunistring: update to Unicode 9.0.0

* lib/gen-uni-tables.c (fill_properties): Recognize
Sentence_Terminal and Prepended_Concatenation_Mark.
(is_property_default_ignorable_code_point): Exclude U+08E2.
(fill_arabicshaping): Allow missing whitespace when parsing;
recognize "AFRICAN FEH", "AFRICAN QAF", and "AFRICAN MOON".
(output_blocks): Increase the element size of the level1 table to
accommodate more blocks.
(get_lbp): Recognize ZWJ, E_Base, and E_Modifier characters;
Update each class according to the standard.
(get_wbp): Recognize ZWJ, E_Base, E_Modifier, Glue_After_Zwj, and
E_Base_GAZ characters.
(output_gbp_table): Recognize ZWJ, E_Base, E_Modifier,
Glue_After_Zwj, and E_Base_GAZ characters.
* lib/unictype.in.h (UC_JOINING_GROUP_AFRICAN_FEH)
(UC_JOINING_GROUP_AFRICAN_QAF, UC_JOINING_GROUP_AFRICAN_MOON): New
enum value.
* lib/unilbrk/lbrktables.h (LBP_ZWJ, LBP_EB, LBP_EM): New enum
value.
* lib/unilbrk/lbrktables.c (unilbrk_table): Extend the table with
LBP_ZWJ, LBP_EB, and LBP_EM.
* lib/uniwbrk.in.h (WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): New
enum value.
* lib/uniwbrk/u-wordbreaks.h: Implement WB3c, WB15, and WB16.
* lib/uniwbrk/wbrktable.h (uniwbrk_prop_index): New variable
declaration.
* lib/uniwbrk/wbrktable.c (uniwbrk_prop_index): New variable.
(uniwbrk_table): Implement WB14.
* tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
Check WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, and WBP_EBG.
* modules/unigbrk/u{32,16,8}-grapheme-breaks: No longer depend on
uc-is-grapheme-break.
* modules/unigbrk/uc-grapheme-breaks: New module.
* modules/unigbrk/uc-grapheme-breaks-tests: New module.
* lib/unigbrk.in.h (GBP_ZWJ, GBP_EB, GBP_EM, GBP_GAZ, GBP_EBG): New
enum value.
(uc_grapheme_breaks): New function, replacing uc_is_grapheme_break.
* lib/unigbrk/u-grapheme-breaks.h: New file.
* lib/unigbrk/u{32,16,8}-grapheme-breaks.c: Rewrite using
u-grapheme-breaks.h instead of uc_is_grapheme_break.
* lib/unigbrk/uc-grapheme-breaks.c: New file.
* lib/unigbrk/uc-is-grapheme-break.c: Partially update to TR29 rev
29.
* tests/unigbrk/test-uc-gbrk-prop.c
(graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
GBP_GAZ, and GBP_EBG.
* tests/unigbrk/test-uc-grapheme-breaks.c: New test.
* tests/unigbrk/test-uc-is-grapheme-break.c
(graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
GBP_GAZ, and GBP_EBG.
(main): Skip unsupported rules involving 3 or more characters,
namely GB10, GB12, and GB13.
* lib/uniwidth/width.c (nonspacing_table_data): Update.
* all generated files under lib/uni* and tests/uni*: Regenerate.
* all the dependant modules: Bump version.

7 years agostrfmon_l: Fix compilation error with glibc 2.25.
Bruno Haible [Sun, 26 Nov 2017 23:26:01 +0000 (00:26 +0100)]
strfmon_l: Fix compilation error with glibc 2.25.

Reported by Tom G. Christensen <tgc@jupiterrise.com>
in <https://lists.gnu.org/r/bug-gnulib/2017-11/msg00051.html>.

* lib/monetary.in.h: Include also <locale.h>.

7 years agoautoupdate
Karl Berry [Fri, 24 Nov 2017 16:24:41 +0000 (08:24 -0800)]
autoupdate

7 years agoposixtm: remove PDS_LEADING_YEAR
Paul Eggert [Fri, 24 Nov 2017 08:29:04 +0000 (00:29 -0800)]
posixtm: remove PDS_LEADING_YEAR

This changes the API slightly, in a hopefully-innocuous way.
Without this change the code had undefined behavior when a
caller specified neither PDS_LEADING_YEAR nor PDS_TRAILING_YEAR.
Problem reported by Pádraig Brady in:
https://lists.gnu.org/r/bug-gnulib/2017-11/msg00048.html
* NEWS: Mention this.
* lib/posixtm.c (posix_time_parse): Treat the absence of
PDS_TRAILING_YEAR as if PDS_LEADING_YEAR were present.
* lib/posixtm.h (PDS_LEADING_YEAR): Remove (actually, leave it
present, but define it as zero, for compatibility with existing
source code).  All other PDS_* values moved up.
* tests/test-posixtm.c (LY): New macro.
(T): Use it.  Do not expect a particular numeric encoding
for PDS_CENTURY etc.

7 years agostat: fix doc wording typo
Paul Eggert [Thu, 23 Nov 2017 09:21:15 +0000 (01:21 -0800)]
stat: fix doc wording typo

7 years agostat: work around Solaris bug with tv_nsec < 0
Paul Eggert [Thu, 23 Nov 2017 08:05:57 +0000 (00:05 -0800)]
stat: work around Solaris bug with tv_nsec < 0

* doc/posix-functions/fstat.texi (fstat):
* doc/posix-functions/fstatat.texi (fstatat):
* doc/posix-functions/lstat.texi (lstat):
* doc/posix-functions/stat.texi (stat):
Mention Solaris 11 bug.
* lib/fstat.c, lib/fstatat.c, lib/lstat.c: Include stat-time.h.
* lib/fstat.c (rpl_fstat) [!WINDOWS_NATIVE]:
* lib/lstat.c (rpl_lstat):
* lib/stat.c (rpl_stat):
Normalize resulting timestamps.
* lib/fstatat.c (normal_fstatat): New function.
(rpl_fstatat): Use it.
* lib/stat-time.h: Include intprops.h, errno.h, stddef.h.
(stat_time_normalize): New function.
* m4/fstat.m4 (gl_FUNC_FSTAT):
* m4/fstatat.m4 (gl_FUNC_FSTATAT):
* m4/lstat.m4 (gl_FUNC_LSTAT):
* m4/stat.m4 (gl_FUNC_STAT):
Replace on Solaris.
* modules/fstat (Depends-on):
* modules/fstatat (Depends-on):
Add stat-time.
* modules/stat-time (Depends-on): Add errno, intprops.

7 years agoregex: merge from glibc
Paul Eggert [Wed, 22 Nov 2017 19:23:01 +0000 (11:23 -0800)]
regex: merge from glibc

* lib/regcomp.c (init_word_char): Add comments.

7 years agoregex: merge from glibc
Paul Eggert [Mon, 20 Nov 2017 23:56:22 +0000 (15:56 -0800)]
regex: merge from glibc

* lib/regcomp.c (__regcomp, __regfree) [_LIBC]: Now hidden.
* lib/regex_internal.h (internal_function): Remove.
All uses removed.

7 years agocrypto/gc-sm3: Fix buffer overrun.
Bruno Haible [Mon, 20 Nov 2017 23:11:14 +0000 (00:11 +0100)]
crypto/gc-sm3: Fix buffer overrun.

* lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
Reported by Coverity.

7 years agoappend, don't replace existing VCS ignore files
Darshit Shah [Mon, 20 Nov 2017 19:11:48 +0000 (22:11 +0300)]
append, don't replace existing VCS ignore files