]> Savannah Git Hosting - gnulib.git/log
gnulib.git
9 years agocopy-file: fix mem leak in error case
Simon Reinhardt [Thu, 15 Oct 2015 18:35:29 +0000 (19:35 +0100)]
copy-file: fix mem leak in error case

* lib/copy-file.c (qcopy_file_preserving): Free the 32KiB buffer
upon error opening or performing I/O to the src and dest files.

9 years agolocalename: control langinfo.h inclusion
Mike Frysinger [Thu, 15 Oct 2015 08:04:07 +0000 (17:04 +0900)]
localename: control langinfo.h inclusion

This header is only used to work around buggy behavior in old
versions of glibc, so do not include it all the time.  Otherwise
we get build failures on systems that do not provide langinfo.h.

* lib/localename.c: Wrap langinfo.h include with same ifdefs used
in the source later on.
The patch was originally submitted to gettext as:
https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00011.html

9 years agoupdate from texinfo
Karl Berry [Wed, 14 Oct 2015 22:32:04 +0000 (15:32 -0700)]
update from texinfo

9 years agobinary-io, math, pthread, sys_socket, u64, unistd: port to strict C
Paul Eggert [Wed, 14 Oct 2015 06:25:18 +0000 (23:25 -0700)]
binary-io, math, pthread, sys_socket, u64, unistd: port to strict C

* lib/binary-io.c, lib/math.c, lib/pthread.c, lib/sys_socket.c:
* lib/u64.c, lib/unistd.c:
Append 'typedef int dummy;', to pacify compilers that are picky
about empty translation units.

9 years agoaccept4-tests: fix to avoid non portable flags
Pino Toscano [Mon, 12 Oct 2015 11:27:10 +0000 (12:27 +0100)]
accept4-tests: fix to avoid non portable flags

* tests/test-accept4.c (main): Pass only SOCK_* flags to accept4(),
as they are the only documented ones, and passing others may trigger
EINVAL (seen on FreeBSD 10.1-RELEASE).
* doc/glibc-functions/accept4.texi: Mention that we don't provide
the SOCK_CLOEXEC or SOCK_NONBLOCK defines.

9 years agoupdate from texinfo
Karl Berry [Sat, 10 Oct 2015 15:16:48 +0000 (08:16 -0700)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Tue, 6 Oct 2015 22:06:11 +0000 (15:06 -0700)]
update from texinfo

9 years agognulib-tool: fix tests of 'extensions' module
Pavel Raiskup [Tue, 6 Oct 2015 11:20:05 +0000 (13:20 +0200)]
gnulib-tool: fix tests of 'extensions' module

This complements f8fe25fab60e3c687a124 commit.

* gnulib-tool (func_emit_pre_early_macros): New function, it wraps
emitting of initial gl_EARLY macros.
(func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB
replaced with func_emit_pre_early_macros call.

9 years agounicase/locale-language: fix typo in utf-8 cookie
Paul Eggert [Tue, 6 Oct 2015 07:46:02 +0000 (00:46 -0700)]
unicase/locale-language: fix typo in utf-8 cookie

* lib/unicase/locale-languages.gperf: Fix gperf input file format.
Problem reported by Zbigniew Jędrzejewski-Szmek.

9 years agoautoupdate
Karl Berry [Mon, 5 Oct 2015 13:25:17 +0000 (06:25 -0700)]
autoupdate

9 years agoxalloc: do not worry about GCC 5 warning on 32 bit
Paul Eggert [Sat, 3 Oct 2015 07:14:05 +0000 (00:14 -0700)]
xalloc: do not worry about GCC 5 warning on 32 bit

* lib/xalloc.h: Revert previous change.
I found a better way to fix this in coreutils.

9 years agoxalloc: avoid GCC 5.1 warning on 32 bit
Pádraig Brady [Fri, 2 Oct 2015 19:21:50 +0000 (20:21 +0100)]
xalloc: avoid GCC 5.1 warning on 32 bit

* lib/xalloc.h: Disable -Wstrict-overflow for uses of
xalloc_oversized(), which was seen to give this warning
on GCC 5.1 on 32 bit: "assuming signed overflow does not occur
when simplifying conditional".

9 years agouniname/uniname-tests: avoid compiler warnings
Daiki Ueno [Fri, 2 Oct 2015 02:27:40 +0000 (11:27 +0900)]
uniname/uniname-tests: avoid compiler warnings

* tests/uniname/test-uninames.c (fill_names, fill_aliases): Remove
unused local variables.
(test_alias_lookup): Fix alias name display in failure cases.

9 years agoautoupdate
Karl Berry [Sun, 27 Sep 2015 15:55:03 +0000 (08:55 -0700)]
autoupdate

9 years agomountlist: clean up of variable duplication
Andrew Borodin [Sun, 27 Sep 2015 08:41:17 +0000 (11:41 +0300)]
mountlist: clean up of variable duplication

* lib/mountlist.c (read_file_system_list) [MOUNTED_LISTMNTENT]:
the 'me' variable is already declared above.  Remove it here.

9 years agoc-ctype: do not worry about EBCDIC + char signed
Paul Eggert [Sun, 27 Sep 2015 06:55:07 +0000 (23:55 -0700)]
c-ctype: do not worry about EBCDIC + char signed

Drop support for EBCDIC with char being signed, as this breaks too
many programs.  Problem reported by Ben Pfaff in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-09/msg00053.html
* lib/c-ctype.h: Verify that we are not using EBCDIC with
char being signed.
(_C_CTYPE_LOWER_A_THRU_F_N): New macro.
(_C_CTYPE_LOWER_N, _C_CTYPE_A_THRU_F): Use it.
(_C_CTYPE_DIGIT, _C_CTYPE_LOWER, _C_CTYPE_PUNCT, _C_CTYPE_UPPER):
(c_isascii, c_isgraph, c_isprint, c_ispunct, c_tolower, c_toupper):
* tests/test-c-ctype.c (test_all):
Simplify by assuming standard char values cannot be negative.
* tests/test-c-ctype.c (NCHARS, to_char): Remove; all uses removed.

9 years agoc-ctype: port better to z/OS EBCDIC
Paul Eggert [Sat, 26 Sep 2015 02:45:59 +0000 (19:45 -0700)]
c-ctype: port better to z/OS EBCDIC

Problems reported by Daniel Richard G. in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-09/msg00050.html
* lib/c-ctype.h (_C_CTYPE_CNTRL): Rewrite in terms of
the C standard escapes and _C_CTYPE_OTHER_CNTRL.
(_C_CTYPE_OTHER_CNTRL): New macro.
* tests/test-c-ctype.c (test_all): Test from CHAR_MIN, not
from SCHAR_MIN, as the functions are defined only from values
promoted from char or from unsigned char, not necessarily from
signed char.

9 years agognulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
Pavel Raiskup [Fri, 25 Sep 2015 18:25:03 +0000 (11:25 -0700)]
gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash

The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
and ARFLAGS variables.  Doing this unconditionally could break
later Automake's AM_PROG_AR invocation (at least it's
AC_CHECK_TOOLS call to detect correct 'ar' binary).

Original purpose of the gl_PROG_AR_RANLIB was only to handle the
Amsterdam Compiler Kit, so make the previous code to have effects
only on ACK, and rather automatically call the Automake's
AM_PROG_AR as soon as possible to decide other cases.

References:
http://lists.gnu.org/archive/html/bug-gnulib/2015-07/msg00001.html

* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
is possible, keep setting AR/ARFLAGS to reasonable defaults.
* gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
'extensions' module is used.
* modules/extensions (configure.ac-early): Remove as this snippet
is added to gnulib-comp.m4 earlier anyway.

9 years agosockets: MS Windows initalization fixes
Paul Eggert [Fri, 25 Sep 2015 18:16:27 +0000 (11:16 -0700)]
sockets: MS Windows initalization fixes

Problem reported by Test User in:
http://lists.gnu.org/archive/html/help-shishi/2015-09/msg00001.html
* lib/sockets.h (SOCKETS_1_0, SOCKETS_2_0, SOCKETS_2_1):
Correct the endianness.
* lib/sockets.c (gl_sockets_startup): Return 2 on any version
number mismatch, not just on <.  Cleanup before any such failure.

9 years agogc: fix detection of installed libgcrypt version
Mats Erik Andersson [Fri, 25 Sep 2015 12:18:24 +0000 (14:18 +0200)]
gc: fix detection of installed libgcrypt version

* m4/gc.m4: Use AM_PATH_LIBCRYPT to test for libcrypt versions
at least as recent as 1.4.4.  The previously used macro is not
available now, since modules were removed in version 1.6.0.

9 years agoc-ctype: rewrite to use inline functions
Paul Eggert [Fri, 25 Sep 2015 07:01:10 +0000 (00:01 -0700)]
c-ctype: rewrite to use inline functions

This simplifies maintenance, since it makes for just one
implementation of each function, letting the compiler have the fun
of optimization.  In practice this works well nowadays with GCC.
E.g., c_isascii might need only three instructions even though the
source code lists every ASCII character individually in a large
switch statement.
Also, fix some z/OS porting bugs reported by Daniel Richard G. in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-09/msg00037.html
* NEWS: Document the API change.
* lib/c-ctype.c: Drastically simplify, since this now just expands
inline functions.
* lib/c-ctype.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
(C_CTYPE_INLINE): New macro.
(C_CTYPE_CONSECUTIVE_DIGITS, C_CTYPE_CONSECUTIVE_LOWERCASE)
(C_CTYPE_CONSECUTIVE_UPPERCASE): Remove.
Verify that either ASCII or EBCDIC is being used.
(_C_CTYPE_SIGNED_EBCDIC, _C_CTYPE_CNTRL, _C_CTYPE_A_THRU_F_N)
(_C_CTYPE_DIGIT_N, _C_CTYPE_LOWER_N, _C_CTYPE_UPPER_N)
(_C_CTYPE_CASES, _C_CTYPE_A_THRU_F, _C_CTYPE_DIGIT, _C_CTYPE_LOWER)
(_C_CTYPE_UPPER, _C_CTYPE_PUNCT_PLAIN):
New private macros.
(_C_CTYPE_CNTRL): In EBCDIC, '\x07' is a control, not '\xff'.
(c_isalnum, c_isalpha, c_isascii, c_isblank, c_iscntrl, c_isdigit)
(c_isgraph, c_islower, c_isprint, c_ispunct, c_isspace, c_isupper)
(c_isxdigit, c_tolower, c_toupper): Now inline functions.
(c_tolower, c_toupper): When converting, return the unsigned char,
as that is what z/OS does.
* lib/c-strcaseeq.h (CASEEQ): Simplify in the light of the removal
of some c-ctype.h macros.
* modules/c-ctype (Depends-on): Add extern-inline; remove verify.
* tests/test-c-ctype.c (test_all): Fix test for c_toupper and
c_tolower promotion to be compatible with z/OS.

9 years agofnmatch: add one more coding cookie
Paul Eggert [Thu, 24 Sep 2015 20:49:38 +0000 (13:49 -0700)]
fnmatch: add one more coding cookie

9 years agomaint: add coding cookies to non-ASCII sources
Paul Eggert [Thu, 24 Sep 2015 20:22:23 +0000 (13:22 -0700)]
maint: add coding cookies to non-ASCII sources

Otherwise, Emacs might do the wrong thing if run in an
he_IL.ISO-8859-8 locale, which an Emacs developer does on occasion.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00966.html

Don't bother with test files, as they aren't copied to the Emacs
source directory.  If this problem affects test files in some other
GNU project, we can add coding cookies to the non-ASCII test files
later.

9 years agogitlog-to-changelog: trim only trailing whitespaces
Pavel Raiskup [Thu, 24 Sep 2015 15:17:38 +0000 (17:17 +0200)]
gitlog-to-changelog: trim only trailing whitespaces

This is fix for --format regression introduced by commit
2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
doubled %n string) had no effect anymore.  This format
specification has been used e.g. by GNU paxuitils (commit
edfd8bcc3).

* build-aux/gitlog-to-changelog (main): Stop squashing multiple
newlines in commmit messages.

9 years agoTest that c_iscntrl agrees with iscntrl, etc.
Paul Eggert [Wed, 23 Sep 2015 19:26:38 +0000 (12:26 -0700)]
Test that c_iscntrl agrees with iscntrl, etc.

Suggested by Daniel Richard G. in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-09/msg00034.html
* modules/c-ctype-tests (Depends-on): Add ctype.
* tests/test-c-ctype.c: Include <ctype.h>.
(NCHARS): New constant.
(test_agree_with_C_locale): New function.
(main): Use it.
(test_all): Use named constants.

9 years agoc-ctype: improve c_isascii testing
Paul Eggert [Wed, 23 Sep 2015 19:02:35 +0000 (12:02 -0700)]
c-ctype: improve c_isascii testing

* tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
Add a test to count the number of ASCII characters.

9 years agoFix ChangeLog typo
Paul Eggert [Wed, 23 Sep 2015 15:11:16 +0000 (08:11 -0700)]
Fix ChangeLog typo

9 years agosavewd: remove SAVEWD_CHDIR_READABLE
Paul Eggert [Wed, 23 Sep 2015 03:04:13 +0000 (20:04 -0700)]
savewd: remove SAVEWD_CHDIR_READABLE

It was problematic in the light of file systems that ignore umask.
Problem reported by Sebastian Ungar in: http://bugs.gnu.org/21534
* NEWS: Document this.
* lib/mkancesdirs.c (mkancesdirs): MAKE_DIR now returns 0 if
successful, -1 (setting errno) on failure, rather than something
more complicated than that.
* lib/mkdir-p.c (make_dir_parents):
Do not use SAVEWD_CHDIR_READABLE.
* lib/savewd.c (savewd_chdir):
Remove support for SAVEWD_CHDIR_READABLE.
* lib/savewd.h (SAVEWD_CHDIR_READABLE): Remove.

9 years agoUpdate ChangeLog to match previous patch.
Paul Eggert [Wed, 23 Sep 2015 02:41:52 +0000 (19:41 -0700)]
Update ChangeLog to match previous patch.

9 years agoc-ctype: support EBCDIC-style c_isascii
Paul Eggert [Wed, 23 Sep 2015 01:59:28 +0000 (18:59 -0700)]
c-ctype: support EBCDIC-style c_isascii

* lib/c-ctype.c (C_TYPE_EBCDIC): Move to top level.
(c_isascii, c_iscntrl): Assume EBCDIC code page 1047 for control
characters, if EBCDIC.

9 years agoc-ctype: assume EBCDIC 1047 for c_iscntrl
Paul Eggert [Tue, 22 Sep 2015 21:47:06 +0000 (14:47 -0700)]
c-ctype: assume EBCDIC 1047 for c_iscntrl

* lib/c-ctype.c (c_iscntrl): When EBCDIC, assume code page 1047 at
both compile-time and at run-time.  Check it at compile-time.  We can
worry about other code pages later, if the topic ever comes up.
Fix typo in C_CTYPE_EBCDIC.

9 years ago* modules/c-ctype (Depends-on): Add verify.
Paul Eggert [Tue, 22 Sep 2015 19:44:25 +0000 (12:44 -0700)]
* modules/c-ctype (Depends-on): Add verify.

9 years agoc-ctype: port better to EBCDIC
Paul Eggert [Tue, 22 Sep 2015 19:17:06 +0000 (12:17 -0700)]
c-ctype: port better to EBCDIC

Problems reported by Daniel Richard G. in
http://lists.gnu.org/archive/html/bug-gnulib/2015-09/msg00020.html
* lib/c-ctype.c: Include <limits.h>, for CHAR_MIN and CHAR_MAX.
Include "verify.h".
(C_CTYPE_ASCII, C_CTYPE_CONSECUTIVE_DIGITS)
(C_CTYPE_CONSECUTIVE_LOWERCASE, C_CTYPE_CONSECUTIVE_UPPERCASE):
Define as enum constants with value false, if not defined, so that
code can use 'if' instead of 'ifdef'.  Using 'if' helps make the
code more portable, as both branches of the 'if' are compiled on
all platforms.
(C_CTYPE_EBCDIC): New constant.
(to_char): New static function.
(c_isalnum, c_isalpha, c_isdigit, c_islower, c_isgraph, c_isprint)
(c_ispunct, c_isupper, c_isxdigit, c_tolower, c_toupper):
Rewrite to use 'if' instead of 'ifdef'.
Use to_char if non-ASCII.  Prefer <= to >=.
Prefer true and false to 1 and 0, for booleans.
(c_iscntrl): Use 'if', not 'ifdef'.  Special case for EBCDIC.
Verify that the character set is either ASCII or EBCDIC.
* tests/test-c-ctype.c: Include <limits.h>, for CHAR_MIN
(to_char): New function.
(test_all): Port to EBCDIC.  Add some more tests, e.g., for c_ispunct.

9 years agonanosleep: fix return code for interrupted replacement
Pádraig Brady [Mon, 21 Sep 2015 22:46:05 +0000 (23:46 +0100)]
nanosleep: fix return code for interrupted replacement

* lib/nanosleep.c (nanosleep): In the replaced nanosleep, ensure
that we return -1 in the case the call is interrupted by a signal,
rather than the current value of 1.
Diagnosed and tested by Daniel Richard G.

9 years agoautoupdate
Karl Berry [Sun, 20 Sep 2015 22:24:53 +0000 (15:24 -0700)]
autoupdate

9 years agoDiagnose ERE '()|\1'
Paul Eggert [Sat, 19 Sep 2015 20:53:34 +0000 (13:53 -0700)]
Diagnose ERE '()|\1'

Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative.  This lets us diagnose the
invalid back-reference in the ERE '()|\1'.

9 years agoRevert previous patch, as it did not fix the bug after all.
Paul Eggert [Sat, 19 Sep 2015 20:44:49 +0000 (13:44 -0700)]
Revert previous patch, as it did not fix the bug after all.

9 years agoregex: fix dangling-backreference bug
Paul Eggert [Sat, 19 Sep 2015 17:16:02 +0000 (10:16 -0700)]
regex: fix dangling-backreference bug

This should fix the following bugs:
http://bugs.gnu.org/21513 assertion error in pop_fail_stack
http://bugs.gnu.org/19775 Test failing after the CVE fix
https://sourceware.org/bugzilla/show_bug.cgi?id=11053
Wrong results with backreferences
https://sourceware.org/bugzilla/show_bug.cgi?id=17356
regex assertion violation with triple backreferences
* lib/regexec.c (set_regs): Don't pop an empty failure stack.

9 years agoregex: merge patches from libc
Paul Eggert [Sat, 19 Sep 2015 16:21:47 +0000 (09:21 -0700)]
regex: merge patches from libc

2015-09-08  Joseph Myers  <joseph@codesourcery.com>
Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
* lib/regex_internal.h:
Include <libc-lock.h> instead of <bits/libc-lock.h>.

2015-06-09  Joseph Myers  <joseph@codesourcery.com>
Fix regcomp wcscoll, wcscmp namespace (bug 18497).
* lib/regcomp.c (build_range_exp): Call __wcscoll instead of
wcscoll.
* lib/regexec.c (check_node_accept_bytes): Likewise.

2015-06-05  Joseph Myers  <joseph@codesourcery.com>
Fix regex wcrtomb namespace (bug 18496).
* lib/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb
instead of wcrtomb.

2015-06-05  Joseph Myers  <joseph@codesourcery.com>
Fix regex wctype namespace (bug 18495).
* lib/regcomp.c (re_compile_fastmap_iter): Call __towlower
instead of towlower.
* lib/regex_internal.c (build_wcs_upper_buffer): Call __iswlower
instead of iswlower.  Call __towupper instead of towupper.
* lib/regex_internal.h (IS_WIDE_WORD_CHAR): Call __iswalnum
instead of iswalnum.

2015-01-07  Chris Metcalf  <cmetcalf@ezchip.com>
* lib/regcomp.c (parse_bracket_exp): Initialize type to
COLL_SYM in a couple of places to avoid uninitialized variable
wanings on tilegx gcc 4.8.2.

2014-11-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
* lib/regex_internal.h: Remove NOT_IN_libc.

2014-11-17  Andreas Schwab  <schwab@suse.de>
* lib/regex_internal.h: Don't include <locale/elem-hash.h>.

2014-09-11  Roland McGrath  <roland@hack.frob.com>
Move findidx nested functions to top-level.
* lib/regcomp.c [_LIBC]: #include <locale/weight.h>.
(build_equiv_class) [_LIBC]: Don't #include it inside the function.
Pass new arguments to findidx.
* lib/regexec.c [RE_ENABLE_I18N] [_LIBC]: #include <locale/weight.h>.
[RE_ENABLE_I18N] (check_node_accept_bytes) [_LIBC]:
Don't #include it inside the function.  Pass new arguments to findidx.
* lib/regex_internal.h:
[!NOT_IN_libc] [_LIBC]: #include <locale/weight.h>.
(re_string_elem_size_at): Don't #include it inside the function.
Pass new arguments to findidx.

2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
Check if DEBUG is defined in regex_internal.c
* lib/regex_internal.c: Check if DEBUG is defined and is set.

9 years agoautoupdate
Karl Berry [Tue, 15 Sep 2015 16:11:15 +0000 (09:11 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Mon, 14 Sep 2015 20:08:27 +0000 (13:08 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Sun, 13 Sep 2015 16:48:04 +0000 (09:48 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Fri, 11 Sep 2015 15:45:35 +0000 (08:45 -0700)]
autoupdate

9 years agoceill: detect buggy OpenBSD implementation
Assaf Gordon [Tue, 8 Sep 2015 23:43:32 +0000 (19:43 -0400)]
ceill: detect buggy OpenBSD implementation

* m4/ceill.m4 (gl_FUNC_CEILL): Detect buggy openBSD implementation
which returns zero for small values.  Discussed here:
http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00010.html

9 years agomountlist: add me_mntroot field on Linux machines
Dave Chiluk [Mon, 31 Aug 2015 21:07:58 +0000 (16:07 -0500)]
mountlist: add me_mntroot field on Linux machines

* lib/mountlist.c (read_file_system_list): Populate me_mntroot in
mount_entry so Linux machines based on /proc/self/mountinfo can
distinguish between bind mounts and original mounts.  In reality bind
mounts aren't treated differently than mountroot=/ mounts by the
kernel, but the user often wants these bind mounts distinguished.
* lib/mountlist.h (struct mount_entry): Add me_mntroot element.
More details at https://pad.lv/1432871

9 years agodoc: Describe to use multiple instances of gnulib
Christian Egli [Fri, 4 Sep 2015 10:06:46 +0000 (12:06 +0200)]
doc: Describe to use multiple instances of gnulib

* doc/gnulib-tool.texi: Add a section to the manual outlining how two
instances of gnulib with different modules can be used, for example one
for a lib and another one for associated tools.

9 years agoautoupdate
Karl Berry [Sat, 5 Sep 2015 17:46:36 +0000 (10:46 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Wed, 2 Sep 2015 13:47:57 +0000 (06:47 -0700)]
autoupdate

9 years agobase32: mark function as __attribute__ const
Pádraig Brady [Tue, 1 Sep 2015 10:59:35 +0000 (11:59 +0100)]
base32: mark function as __attribute__ const

* lib/base32.h (isbase32): Mark __attribute__ const as
suggested by GCC, and consistent with the base64 module.

9 years agoautoupdate
Karl Berry [Sun, 30 Aug 2015 12:57:45 +0000 (05:57 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Wed, 26 Aug 2015 13:29:21 +0000 (06:29 -0700)]
autoupdate

9 years agognulib-tool: don't transform binary files with sed
Daiki Ueno [Thu, 20 Aug 2015 00:09:58 +0000 (09:09 +0900)]
gnulib-tool: don't transform binary files with sed

* gnulib-tool (func_add_or_update): Don't apply sed_transform_* to
.mo and .class files.
Reported by Denis Denisov.

9 years agoautoupdate
Karl Berry [Mon, 24 Aug 2015 13:09:19 +0000 (06:09 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Sat, 22 Aug 2015 14:52:01 +0000 (07:52 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Thu, 20 Aug 2015 13:35:49 +0000 (06:35 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Tue, 18 Aug 2015 18:00:32 +0000 (11:00 -0700)]
autoupdate

9 years agogperf: respect silent rules
Daiki Ueno [Mon, 10 Aug 2015 15:22:15 +0000 (17:22 +0200)]
gperf: respect silent rules

* modules/gperf (Makefile.am): Define V_GPERF, V_GPERF_, and
V_GPERF_0 for silent rules.
* modules/iconv_open (Makefile.am): Use V_GPERF.
* modules/unicase/locale-language (Makefile.am): Likewise.
* modules/unicase/special-casing (Makefile.am): Likewise.
* modules/unictype/category-byname (Makefile.am): Likewise.
* modules/unictype/combining-class-byname (Makefile.am): Likewise.
* modules/unictype/joininggroup-byname (Makefile.am): Likewise.
* modules/unictype/joiningtype-byname (Makefile.am): Likewise.
* modules/unictype/property-byname (Makefile.am): Likewise.
* modules/unictype/scripts (Makefile.am): Likewise.
* modules/uninorm/composition (Makefile.am): Likewise.

9 years agoImprove port of stdalign to C++11
Paul Eggert [Mon, 3 Aug 2015 19:34:38 +0000 (12:34 -0700)]
Improve port of stdalign to C++11

Problem reported by Sundaram in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00003.html
* lib/stdalign.in.h (alignof, alignas): Don't define if C++11 or newer.
(__alignas_is_defined): Define if C++11 or newer.

9 years agopmccabe2html: fix gawk regex escaping
Assaf Gordon [Sun, 2 Aug 2015 05:30:07 +0000 (23:30 -0600)]
pmccabe2html: fix gawk regex escaping

* build-aux/pmccabe2html: Add one more backslash to properly
escape the gsub replacement value.  Fixes this error:
gawk: ./build-aux/pmccabe2html:425: \
warning: escape sequence `\&' treated as plain `&'

9 years agoupdate from texinfo
Karl Berry [Sat, 1 Aug 2015 21:41:21 +0000 (14:41 -0700)]
update from texinfo

9 years agotime_rz: port to pedantic memcpy
Paul Eggert [Wed, 29 Jul 2015 20:48:10 +0000 (13:48 -0700)]
time_rz: port to pedantic memcpy

* lib/time_rz.c (tzalloc): Pacify pedantic memcpy implementations
that reject memcpy (..., NULL, 0).

9 years agoautoupdate
Karl Berry [Tue, 28 Jul 2015 20:57:32 +0000 (13:57 -0700)]
autoupdate

9 years agotime_rz: port better to MinGW
Paul Eggert [Mon, 27 Jul 2015 23:41:17 +0000 (16:41 -0700)]
time_rz: port better to MinGW

Don't change tzname, as this makes MinGW dump core (Bug#21020).
Instead, store the tzname copy in the struct tm_zone object.
Problem reported by Eli Zaretskii in: http://bugs.gnu.org/21020#48
* lib/strftime.c [!_LIBC]:
* lib/time_rz.c: Include time-internal.h.
* lib/strftime.c (strftime_case_) [!HAVE_TM_ZONE]: Infer the zone
name from *TZ rather than from TZNAME, doable because *TZ now has
a tzname_copy member.
* lib/time-internal.h: New file, with contents taken from
lib/time_rz.c.  It's separate because strftime.c now accesses
struct tm_zone members.
(struct tm_zone) [HAVE_TZNAME && !HAVE_TM_ZONE]:
New member tzname_copy.
* lib/time_rz.c (struct tm_zone): Move to time-internal.h.
(tzalloc) [HAVE_TZNAME && !HAVE_TM_ZONE]:
Initialize tzname_copy member.
(save_abbr) [HAVE_TZNAME && !HAVE_TM_ZONE]: Save abbreviation
in tzname_copy member.
(revert_tz) [HAVE_TZNAME]: Remove no-longer-needed tzname saving.
(restore_tzname): Remove; no longer needed.  All calls removed.
* modules/time_rz (Files): Add lib/time-internal.h.

9 years agotime: port __need_time_t to MinGW
Paul Eggert [Mon, 27 Jul 2015 14:53:36 +0000 (07:53 -0700)]
time: port __need_time_t to MinGW

* lib/time.in.h (__need_time_t): Do not treat specially on MinGW.
Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36

9 years agostrftime: fix newly-introduced bug on Solaris
Paul Eggert [Sat, 25 Jul 2015 23:37:17 +0000 (16:37 -0700)]
strftime: fix newly-introduced bug on Solaris

* lib/strftime.c (strftime_case_): Set the local variable 'zone'
consistently at the start, rather than doing some of the setup at
the start and some in the %Z format spec.  This is cleaner, and
works better with time_rz on platforms like Solaris where struct
tm lacks a tm_zone member, as when !HAVE_TM_GMTOFF %z's calls to
mktime_z and localtime_rz can mess up the tzname cache.

9 years agotest-strftime: test for Solaris bug
Paul Eggert [Sat, 25 Jul 2015 22:20:57 +0000 (15:20 -0700)]
test-strftime: test for Solaris bug

* modules/strftime-tests (Depends-on): Add strerror.
* tests/test-strftime.c: Include <errno.h>.
(posixtm_test): New function, containing the old 'main'.
(struct tzalloc_test, struct localtime_rz_test): New types.
(TZ, LT): New static vars.
(tzalloc_test): New function.
(main): Rewrite in terms of posixtm_test and tzalloc_test.

9 years agotime_rz: port to Solaris etc.
Paul Eggert [Sat, 25 Jul 2015 22:20:10 +0000 (15:20 -0700)]
time_rz: port to Solaris etc.

Works around a tzname problem on platforms like Solaris that have
tzname but not tm_zone, by setting tzname at the appropriate time
and restoring it later.
* lib/time_rz.c (tzname_address, tzname_value) [HAVE_TZNAME]:
New static vars.
(save_abbr) [HAVE_TZNAME]: Set them.
(revert_tz) [HAVE_TZNAME]: Clear or use them.
(restore_tzname): New function.
(localtime_rz, mktime_z): Use it.

9 years agotime_rz: now LGPL
Paul Eggert [Sat, 25 Jul 2015 22:13:13 +0000 (15:13 -0700)]
time_rz: now LGPL

* modules/time_rz (License): Now LGPL, because strftime depends on it.

9 years agotime_rz: make a constant 'const'
Paul Eggert [Sat, 25 Jul 2015 22:11:42 +0000 (15:11 -0700)]
time_rz: make a constant 'const'

* lib/time_rz.c (local_tz): Now const.

9 years agotime_rz: fix off-by-one typo
Paul Eggert [Sat, 25 Jul 2015 22:10:16 +0000 (15:10 -0700)]
time_rz: fix off-by-one typo

* lib/time_rz.c (extend_abbrs): Fix off-by-one typo.

9 years agoautoupdate
Karl Berry [Fri, 24 Jul 2015 13:40:45 +0000 (06:40 -0700)]
autoupdate

9 years agofprintftime, strftime: use timezone_t args
Paul Eggert [Fri, 24 Jul 2015 01:28:13 +0000 (18:28 -0700)]
fprintftime, strftime: use timezone_t args

* NEWS: Document the change.
* lib/fprintftime.h (fprintftime):
* lib/strftime.c (extra_args) [my_strftime]:
* lib/strftime.h (nstrftime):
Time zone arg is now of type timezone_t, not int.
* lib/strftime.c (mktime_z) [_LIBC]: New macro.
(__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used.
(my_strftime) [emacs && !my_strftime]:
(emacs_strftimeu) [emacs && !FPRINTFTIME]:
Remove; Emacs doesn't need this any more.
(HAVE_TZSET) [my_strftime]: Unset, since we no longer want
fprintftime and nstrftime to call tzset.
(ut) [!my_strftime]: Remove, replacing with ...
(tz) [!my_stftime]: ... this new macro.  All uses changed.
(strftime_case_): Use localtime_rz and mktime_z instead
of localtime_r and mktime.
* modules/fprintftime (Depends-on): Add time_rz.
* modules/strftime (Depends-on): Add time_rz.  Remove time_r.
* tests/test-strftime.c (main): Adjust to new nstrftime API.

9 years agotime_rz: new module
Paul Eggert [Fri, 24 Jul 2015 00:44:19 +0000 (17:44 -0700)]
time_rz: new module

* MODULES.html.sh: Add time_rz.
* lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files.
* lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@.
* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS):
New var HAVE_TIMEZONE_T (default 0).
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
New var GNULIB_TIME_RZ (default 0).
* modules/time (time.h): Substitute the new vars.

9 years agoflexmember: license is now unlimited
Paul Eggert [Fri, 24 Jul 2015 00:43:33 +0000 (17:43 -0700)]
flexmember: license is now unlimited

* modules/flexmember (License): Change to unlimited,
since its only source file gives an unlimited license.

9 years agoautoupdate
Karl Berry [Mon, 20 Jul 2015 15:59:04 +0000 (08:59 -0700)]
autoupdate

9 years agomaint: update copyright paper procedures
Eric Blake [Tue, 14 Jul 2015 14:03:02 +0000 (08:03 -0600)]
maint: update copyright paper procedures

Requested by Donald R. Robertson III via gnu.org ticket #1028294.

* config/srclist.txt: Drop outdated files.
* doc/Copyright/conditions.txt: Update to latest.
* doc/Copyright/assign.changes.manual: Delete.
* doc/Copyright/assign.future.manual: Likewise.
* doc/Copyright/assign.manual: Likewise.
* doc/Copyright/assign.translation.manual: Likewise.
* doc/Copyright/disclaim.changes.manual: Likewise.
* doc/Copyright/disclaim.manual: Likewise.
* doc/Copyright/disclaim.program: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoautoupdate
Karl Berry [Sun, 12 Jul 2015 15:11:08 +0000 (08:11 -0700)]
autoupdate

9 years agoautoupdate
Karl Berry [Wed, 8 Jul 2015 13:23:50 +0000 (06:23 -0700)]
autoupdate

9 years agolocalename: fix link error on Illumos
Daiki Ueno [Tue, 7 Jul 2015 06:36:43 +0000 (15:36 +0900)]
localename: fix link error on Illumos

Illumos defines __sun, but does not have getlocalename_l nor the
equivalent.  This partially reverts commit 387c214.
* m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
available, as well as uselocale.
* lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
use getlocalename_l if it is not available.

9 years agounistr/uN-strtok-tests: avoid a trivial leak
Daiki Ueno [Tue, 7 Jul 2015 06:12:52 +0000 (15:12 +0900)]
unistr/uN-strtok-tests: avoid a trivial leak

* tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
input and delim after the multibyte delimiter tests.

9 years agoacl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls
Andreas Gruenbacher [Sun, 5 Jul 2015 20:46:11 +0000 (22:46 +0200)]
acl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls

* lib/set-permissions.c (set_acls): Document where support for FreeBSD
ACL_TYPE_NFS4 acls should go.
* lib/get-permissions.c (get_permissions): Likewise.

9 years agoacl-permissions: Fix on FreeBSD
Andreas Gruenbacher [Tue, 30 Jun 2015 19:09:28 +0000 (21:09 +0200)]
acl-permissions: Fix on FreeBSD

When a directory doesn't have an ACL_TYPE_DEFAULT acl, acl_get_file will return
an empty acl, but when trying to set that acl, FreeBSD's acl_set_file will fail
with errno == EINVAL.  Instead, FreeBSD expects acl_delete_def_file to be used.
* lib/acl-internal.c (acl_default_nontrivial): Recognize empty default acls.
* lib/set-permissions.c (set_acls): Avoid calling acl_set_file for empty
ACL_TYPE_DEFAULT acls.

9 years agofile-has-acl, acl-permissions: fix some more HP-UX typos
Andreas Gruenbacher [Tue, 30 Jun 2015 19:09:28 +0000 (21:09 +0200)]
file-has-acl, acl-permissions: fix some more HP-UX typos

Problem reported by John David Anglin in: http://bugs.gnu.org/20979
* lib/set-permissions.c (context_acl_from_mode): Fix some more obvious
typos introduced by the recent ACL changes.

9 years agofile-has-acl, acl-permissions: fix HP-UX typos
Paul Eggert [Sat, 4 Jul 2015 18:05:00 +0000 (11:05 -0700)]
file-has-acl, acl-permissions: fix HP-UX typos

Problem reported by John David Anglin in: http://bugs.gnu.org/20979
* lib/file-has-acl.c (file_has_acl):
* lib/set-permissions.c (context_acl_from_mode)
(context_aclv_from_mode, set_acls):
Fix some obvious typos when HAVE_GETCL /* HP-UX */.
They were introduced by the recent ACL changes.

9 years agoregex: match current GNU grep behavior
Paul Eggert [Sat, 4 Jul 2015 15:25:21 +0000 (08:25 -0700)]
regex: match current GNU grep behavior

These symbols have not matched GNU grep behavior for quite some time.
Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
* lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
Change to match current GNU behavior.
Simplify by expressing it as differences from POSIX BREs and EREs.
(RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.

9 years agoset-permissions.c: adjust acl_from_mode's cpp guard
Jim Meyering [Fri, 3 Jul 2015 21:58:19 +0000 (14:58 -0700)]
set-permissions.c: adjust acl_from_mode's cpp guard

* lib/set-permissions.c (acl_from_mode): Guard with #ifdef
directives identical to those guarding the sole use.
Otherwise, on some systems, we'd get a warning about
the function being defined but not used.
Also, filter through cppi to correct misleading indentation
of cpp directives.

9 years agoautoupdate
Karl Berry [Fri, 3 Jul 2015 22:31:16 +0000 (15:31 -0700)]
autoupdate

9 years agotests: restrict shells to those that support 'local'
Pádraig Brady [Fri, 3 Jul 2015 13:52:47 +0000 (14:52 +0100)]
tests: restrict shells to those that support 'local'

The local keyword is very widely supported and used
in tests in coreutils and grep at least.  Therefore
restrict to testing with shells that support it.
This mainly excludes /bin/sh on Solaris.
Note standard ksh also doesn't support this keyword,
but that wasn't in the list of considered shells anyway.
For discussion on adding 'local' to POSIX, see:
http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/122267/focus=3271

* tests/init.sh (gl_shell_test_script_): Add a test for 'local'.

9 years agofix mistakes in ChangeLog entries
Daiki Ueno [Fri, 3 Jul 2015 03:00:44 +0000 (12:00 +0900)]
fix mistakes in ChangeLog entries

9 years agounistr/uN-strtok: handle multibyte delimiters
Seiya Kawashima [Fri, 3 Jul 2015 02:42:43 +0000 (11:42 +0900)]
unistr/uN-strtok: handle multibyte delimiters

Previously, uN_strtok moved PTR to the next unit to the token end.
When DELIM contained a multibyte character, the new position could
be a middle of a multibyte character.
* lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
after the token.
* lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
* modules/unistr/u8-strtok (Depends-on): Depend on
unistr/u8-strmblen.
* modules/unistr/u16-strtok (Depends-on): Depend on
unistr/u16-strmblen.
* modules/unistr/u32-strtok (Depends-on): Depend on
unistr/u32-strmblen.
* tests/unistr/test-u-strtok.h: New file.
* tests/unistr/test-u8-strtok.c: New file.
* tests/unistr/test-u16-strtok.c: New file.
* tests/unistr/test-u32-strtok.c: New file.
* modules/unistr/u8-strtok-tests: New file.
* modules/unistr/u32-strtok-tests: New file.
* modules/unistr/u16-strtok-tests: New file.
Copyright-paperwork-exempt: yes
Co-authored-by: Daiki Ueno <ueno@gnu.org>
9 years agoupdate-copyright: fix test failure with perl >= 5.22
Friedrich Haubensak [Thu, 2 Jul 2015 13:36:33 +0000 (14:36 +0100)]
update-copyright: fix test failure with perl >= 5.22

* build-aux/update-copyright: Escape a literal left curly bracket,
required with perl >= 5.22

9 years agou{16,32}-strstr-tests: relax timeout condition
Daiki Ueno [Thu, 2 Jul 2015 07:48:24 +0000 (16:48 +0900)]
u{16,32}-strstr-tests: relax timeout condition

On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr tests can
take longer than 5 seconds to complete.
Reported by Dagobert Michelsen in:
https://lists.gnu.org/archive/html/bug-libunistring/2015-06/msg00006.html
* tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
seconds to 10 seconds.
* tests/unistr/test-u32-strstr.c (main): Likewise.

9 years agognulib-common.m4: change the ARFLAGS default to 'cr'
Pavel Raiskup [Wed, 1 Jul 2015 07:38:35 +0000 (09:38 +0200)]
gnulib-common.m4: change the ARFLAGS default to 'cr'

In some GNU/Linux distributions people started to compile 'ar'
binary with --enable-deterministic-archives (binutils project).
That, however, in combination with previous autotools long time
working default AR{_,}FLAGS=cru causes warnings on such
installations:
ar: `u' modifier ignored since `D' is the default (see `U')

The 'u' option (at least with GNU binutils) did small optimization
during repeated builds because it instructed 'ar' to not
open/close unchanged *.o files and to rather read their contents
from old archive file.  However, its removal should not cause a
big performance hit for usual workflows.

Distributions started using --enable-deterministic-archives
knowing that it will disable the 'u', with the benefit of having
rather a bit more deterministic builds.

Also, to justify this change a bit more, keeping 'u' in ARFLAGS
could only result in many per-project changes to override
Automake's ARFLAGS default, just to silent such warnings.

* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
set already.

9 years agoupdate from texinfo
Karl Berry [Wed, 1 Jul 2015 14:25:52 +0000 (07:25 -0700)]
update from texinfo

9 years agoautoupdate
Karl Berry [Wed, 1 Jul 2015 13:53:25 +0000 (06:53 -0700)]
autoupdate

9 years agoselinux-h: avoid double free after *getfilecon()
Pavel Raiskup [Wed, 1 Jul 2015 10:30:57 +0000 (12:30 +0200)]
selinux-h: avoid double free after *getfilecon()

Originally reported by Ben Shelton on bug-tar:
http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00009.html

* lib/getfilecon.c (map_to_failure): Set the already freed '*con'
pointer to NULL.  Man getfilecon(3) says that any non-NULL '*con'
parameter should be freed by freecon(3) (regardless the return
value).

9 years agofix pty related tests issues on Windows
Pavel Fedin [Wed, 1 Jul 2015 07:18:11 +0000 (10:18 +0300)]
fix pty related tests issues on Windows

* lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows,
however it's still present in tests/ subdirectory of the final project.
Therefore avoid it to pass `make check`.
* tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty()
will just return -ENOSYS, so avoid this non applicable test allowing
the build to proceed.

9 years agoacl: fix definition of acl_from_mode on FreeBSD
Pádraig Brady [Tue, 30 Jun 2015 19:35:26 +0000 (20:35 +0100)]
acl: fix definition of acl_from_mode on FreeBSD

This was causing basic coreutils copy operations to fail
with ENOTSUP or ENOENT error messages.

* lib/acl-internal.h (acl_from_mode): Only define when
! defined HAVE_ACL_FROM_TEXT.  That allows the version
of acl_from_mode() defined in lib/set-permissions.c to
be used on FreeBSD at least.
* lib/set-permissions.c: Fix up comment spelling,
and a redundant variable assignment; noticed in passing.

9 years agoreadutmp: port to FreeBSD >= 9
Pádraig Brady [Tue, 30 Jun 2015 21:01:06 +0000 (22:01 +0100)]
readutmp: port to FreeBSD >= 9

* lib/readutmp.h: Map utmpxname() to setutxdb().
With that coreutils who(1) and pinky(1) tests pass.

9 years agomgetgroups: port to strict OS X
Paul Eggert [Tue, 30 Jun 2015 16:32:07 +0000 (09:32 -0700)]
mgetgroups: port to strict OS X

The previous fix wasn't working, so use a bigger hammer (Bug#20923).
* lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics.
(getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove.  All uses removed.
* m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.