]> Savannah Git Hosting - gnulib.git/log
gnulib.git
9 years agosetlocale: add "sv" to Windows language table
Geert Janssens [Tue, 22 Mar 2016 05:35:43 +0000 (14:35 +0900)]
setlocale: add "sv" to Windows language table

* lib/setlocale.c (language_table) [W32]: Add "sv".
Reported in <https://savannah.gnu.org/bugs/?44588>.

Copyright-paperwork-exempt: yes

9 years agoupdate from texinfo
Karl Berry [Mon, 21 Mar 2016 15:14:56 +0000 (08:14 -0700)]
update from texinfo

9 years agosys_select: port to new Cygwin
Paul Eggert [Mon, 21 Mar 2016 07:49:17 +0000 (00:49 -0700)]
sys_select: port to new Cygwin

Problem reported by Ken Brown in:
https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html
* lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name"
diagnostics.

9 years agotest-userspec.c: do not trigger gcc's new -Wmisleading-indentation
Jim Meyering [Thu, 17 Mar 2016 17:35:08 +0000 (10:35 -0700)]
test-userspec.c: do not trigger gcc's new -Wmisleading-indentation

* tests/test-userspec.c (main): Remove unnecessary braces and fix
misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
  test-userspec.c:176:9: error: statement is indented as if it were \
            guarded by... [-Werror=misleading-indentation]
           {
           ^
  test-userspec.c:173:7: note: ...this 'if' clause, but it is not
         if (!diag && !T[i].result)
         ^~

9 years agotime_rz: port to clang -Wunused-const-variable
Paul Eggert [Tue, 15 Mar 2016 20:10:56 +0000 (13:10 -0700)]
time_rz: port to clang -Wunused-const-variable

* lib/time_rz.c (TZ): Remove.  All uses removed.

9 years agostd-gnu11: improve clang support
Paul Eggert [Tue, 15 Mar 2016 20:09:01 +0000 (13:09 -0700)]
std-gnu11: improve clang support

* m4/std-gnu11.m4: Sync with autoconf, incorporating:
2016-03-15 Also try clang
2016-03-15 Port C11 and C++11 testing to clang

9 years agoselect: port more to Intel 2016.1.150 compiler
Paul Eggert [Tue, 15 Mar 2016 14:48:05 +0000 (07:48 -0700)]
select: port more to Intel 2016.1.150 compiler

Problem reported by Balázs Hajgató in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00036.html
* m4/select.m4 (gl_FUNC_SELECT): Require AC_C_RESTRICT.

9 years agoselect: try to port to 2016.1.150 compiler
Paul Eggert [Mon, 14 Mar 2016 20:17:06 +0000 (13:17 -0700)]
select: try to port to 2016.1.150 compiler

Problem reported by Balázs Hajgató in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00026.html
* lib/sys_select.in.h (select): Use 'restrict' on arguments where
POSIX specifies 'restrict'.

9 years agolocalename-tests: memory allocation fixes
Paul Eggert [Mon, 14 Mar 2016 05:44:58 +0000 (22:44 -0700)]
localename-tests: memory allocation fixes

* tests/test-localename.c (test_locale_name)
(test_locale_name_thread): Don't call freelocale on a locale
that was the base of a successful newlocale, as that
results in a double free.  Problem reported by Assaf Gordon.
(test_locale_name_thread): Free saved names after use, to pacify
gcc -fsanitize=address.

9 years agointprops: make .h file license match module
Paul Eggert [Wed, 9 Mar 2016 00:35:58 +0000 (16:35 -0800)]
intprops: make .h file license match module

* lib/intprops.h: Change the license wording to match glibc format.
This is what is in modules/intprops anyway.  See:
https://sourceware.org/bugzilla/show_bug.cgi?id=19738#c8

9 years agoacl: fix missing return on Cygwin
Eric Blake [Tue, 8 Mar 2016 22:35:30 +0000 (15:35 -0700)]
acl: fix missing return on Cygwin

Compilation on Cygwin 2.4.1 resulted in an 'install' that behaved
differently depending on compile-time flags; I traced it to this
warning, where the difference was based on what was left in the
return register:

lib/set-permissions.c: In function 'set_acls_from_mode':
lib/set-permissions.c:273:1: warning: control reaches end of non-void
function [-Wreturn-type]

* lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
fall off end of function. Fixes http://bugs.gnu.org/22949

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoupdate from texinfo
Karl Berry [Mon, 7 Mar 2016 16:32:32 +0000 (08:32 -0800)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Sun, 6 Mar 2016 17:24:46 +0000 (09:24 -0800)]
update from texinfo

9 years agoextern-inline: port to PGI CC
Bruno Haible [Sat, 5 Mar 2016 00:38:45 +0000 (01:38 +0100)]
extern-inline: port to PGI CC

* m4/extern-inline.m4 (gl_EXTERN_INLINE): For PGI CC, don't use the
keyword 'inline'.
Reported by Adam James Stewart in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00006.html

9 years agoupdate from texinfo
Karl Berry [Tue, 23 Feb 2016 16:44:42 +0000 (08:44 -0800)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Sun, 21 Feb 2016 16:26:17 +0000 (08:26 -0800)]
update from texinfo

9 years agosignbit: port back to pre-C++11 GCC
Paul Eggert [Sat, 20 Feb 2016 15:52:53 +0000 (07:52 -0800)]
signbit: port back to pre-C++11 GCC

* lib/math.in.h (signbit): Do previous change only if
__cplusplus < 201103.  See Jonathan Wakely in:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UY3VX3W7XEXYTUKHG5BALU4ACUD7ZLGE/

9 years agomountlist: recognize autofs-mounted remote file systems, too
Kamil Dudka [Fri, 19 Feb 2016 09:41:49 +0000 (10:41 +0100)]
mountlist: recognize autofs-mounted remote file systems, too

Originally reported at: https://bugzilla.redhat.com/1309247
* lib/mountlist.c (ME_REMOTE): Return true if a file system is named
"-hosts" because it is used by autofs to mount remote file systems.

9 years agosignbit: port to C++ with GCC 6
Paul Eggert [Sat, 20 Feb 2016 01:07:48 +0000 (17:07 -0800)]
signbit: port to C++ with GCC 6

* lib/math.in.h (signbit) [__cplusplus]:
Do not replace with GCC builtin.  Reported by Orion Poplawski in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-02/msg00005.html

9 years agoregex: make it closer to libc
Paul Eggert [Fri, 19 Feb 2016 17:27:41 +0000 (09:27 -0800)]
regex: make it closer to libc

Make Idx a signed type, rather than possibly unsigned.
The unsignedness was not really buying us anything, since the code
overflows for other reasons before getting to PTRDIFF_MAX.  Making
it signed allows us to use -1 and -2 with abandon, like libc does,
thus lessening the number of differences between gnulib and libc.
Also, it should help avoid gratuitous warnings like the one
reported by Nelson H. F. Beebe in: http://bugs.gnu.org/22702
* lib/regex.h (__re_idx_t): Remove.  All uses changed to regoff_t.
* lib/regex_internal.h (SSIZE_MAX): Define if <limits.h> doesn't.
(IDX_MAX) [_REGEX_LARGE_OFFSETS]: Now SSIZE_MAX.
(REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
Remove.  Revert all uses to their libc versions.

9 years agoregex: merge patches from libc
Paul Eggert [Fri, 19 Feb 2016 16:41:58 +0000 (08:41 -0800)]
regex: merge patches from libc

2015-10-21  Joseph Myers  <joseph@codesourcery.com>
2015-10-20  Joseph Myers  <joseph@codesourcery.com>
Convert miscellaneous function definitions to prototype style.
* lib/regcomp.c (re_compile_pattern, re_set_syntax)
(re_compile_fastmap, regcomp, regerror, regfree, re_comp):
* lib/regexec.c (regexec, re_match, re_search, re_match_2, re_search_2)
(re_search_2_stub, re_search_stub, re_set_registers, re_exec)
(re_search_internal):
Convert to prototype-style function definition.
Use internal_function for internal functions.

9 years agoupdate from texinfo
Karl Berry [Tue, 16 Feb 2016 22:24:59 +0000 (14:24 -0800)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Tue, 16 Feb 2016 14:32:21 +0000 (06:32 -0800)]
update from texinfo

9 years agoautoupdate
Karl Berry [Fri, 12 Feb 2016 14:29:23 +0000 (06:29 -0800)]
autoupdate

9 years agoautoupdate
Karl Berry [Thu, 11 Feb 2016 22:21:51 +0000 (14:21 -0800)]
autoupdate

9 years agostdalign: port to older HP and IBM cc
Paul Eggert [Wed, 10 Feb 2016 22:56:32 +0000 (14:56 -0800)]
stdalign: port to older HP and IBM cc

* lib/stdalign.in.h (_Alignas): Port better to older HP and IBM
C compilers, by checking their version numbers.  These version
numbers appear in MariaDB and in Qt code that dates way back and
that conditiionally uses the 'aligned' attribute.

9 years agostdalign: port to clang 3.7.0
Paul Eggert [Tue, 9 Feb 2016 16:54:11 +0000 (08:54 -0800)]
stdalign: port to clang 3.7.0

Problem reported by Herbert J. Skuhra in:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00476.html
* lib/stdalign.in.h (alignas): Fix typo that prevented 'alignas'
from being defined on clang 3.7.0, which has a buggy stdalign.h.  See:
https://llvm.org/bugs/show_bug.cgi?id=26547

9 years agoupdate from texinfo
Karl Berry [Tue, 9 Feb 2016 16:43:30 +0000 (08:43 -0800)]
update from texinfo

9 years agoreaddir_r: now obsolescent
Paul Eggert [Tue, 9 Feb 2016 02:45:55 +0000 (18:45 -0800)]
readdir_r: now obsolescent

* doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
* lib/mountlist.c (read_file_system_list): Add a FIXME.

9 years agoUse modern texinfo when syncing install.texi output from autoconf
Paul Eggert [Tue, 9 Feb 2016 02:39:23 +0000 (18:39 -0800)]
Use modern texinfo when syncing install.texi output from autoconf

9 years agoupdate from texinfo
Karl Berry [Mon, 8 Feb 2016 16:35:29 +0000 (08:35 -0800)]
update from texinfo

9 years agosync install.texi from autoconf
Karl Berry [Mon, 8 Feb 2016 16:35:09 +0000 (08:35 -0800)]
sync install.texi from autoconf

9 years agomisc: port better to gcc -fsanitize=address
Paul Eggert [Sun, 7 Feb 2016 02:11:48 +0000 (18:11 -0800)]
misc: port better to gcc -fsanitize=address

Without these patches, ./configure CFLAGS='-fsanitize=address'
would compute incorrect values.  This patch fixes some (but not all)
test failures with recent glibc, with this configuration.
* m4/acl.m4 (gl_ACL_GET_FILE):
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS):
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO):
* m4/duplocale.m4 (gl_FUNC_DUPLOCALE):
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
* m4/getdelim.m4 (gl_FUNC_GETDELIM):
* m4/getgroups.m4 (gl_FUNC_GETGROUPS):
* m4/getline.m4 (gl_FUNC_GETLINE):
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
* m4/regex.m4 (gl_REGEX):
* m4/strndup.m4 (gl_FUNC_STRNDUP):
* tests/test-calloc-gnu.c (main):
* tests/test-duplocale.c (main):
* tests/test-getgroups.c (main):
* tests/test-getline.c (main):
* tests/test-inttostr.c (main):
* tests/test-localename.c (test_locale_name)
(test_locale_name_thread, test_locale_name_environ)
(test_locale_name_default):
* tests/test-regex.c (main):
* tests/test-setlocale1.c (main):
* tests/test-stat.h (test_stat_func):
Free heap-allocated storage before exiting.
* m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX):
Don't match *_foo symbols inserted by AddressSanitizer.
* tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.

9 years agoupdate from texinfo
Karl Berry [Fri, 5 Feb 2016 16:50:20 +0000 (08:50 -0800)]
update from texinfo

9 years agoautoupdate
Karl Berry [Fri, 5 Feb 2016 16:49:30 +0000 (08:49 -0800)]
autoupdate

9 years agoverify-tests: also remove stray test-verify.Tpo
Jim Meyering [Wed, 3 Feb 2016 05:39:44 +0000 (21:39 -0800)]
verify-tests: also remove stray test-verify.Tpo

* modules/verify-tests (Makefile.am): Arrange for "make clean"
to remove the test-verify.Tpo file that is left behind by
the automake-generated rule upon compilation failure.
Otherwise, that .Tpo file would cause a failed "make distcheck"
at least for grep.

9 years agostd-gnu11: new module
Paul Eggert [Tue, 2 Feb 2016 22:29:53 +0000 (14:29 -0800)]
std-gnu11: new module

This makes it easier for applications to prefer C11 and C++11
to older variants, when compiling C and C++ code.
Unlike most m4/*.m4 files, m4/std-gnu11.m4 is GPLed, as it copies
a nontrivial chunk of GPLed Autoconf source code.
* COPYING: Mention the m4/*.m4 copyright situation.
* MODULES.html.sh (std-gnu11): New module.
* m4/std-gnu11.m4, modules/std-gnu11: New files.

9 years agoupdate from texinfo
Karl Berry [Tue, 2 Feb 2016 18:07:32 +0000 (10:07 -0800)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Sun, 31 Jan 2016 22:49:50 +0000 (14:49 -0800)]
update from texinfo

9 years agoget-permissions, strftime: fix grammar in comments
Paul Eggert [Mon, 25 Jan 2016 15:45:56 +0000 (07:45 -0800)]
get-permissions, strftime: fix grammar in comments

* lib/get-permissions.c, lib/strftime.c: Merge into the comments
some grammar fixes Alan Mackenzie made to GNU Emacs.

9 years agogettext: mark as obsolete
Daiki Ueno [Mon, 25 Jan 2016 02:07:33 +0000 (11:07 +0900)]
gettext: mark as obsolete

Suggested by Paul Eggert in:
https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00101.html
* modules/gettext (Status): Mark as obsolete.
(Notice): Suggest to use 'gettext-h' instead.
* modules/gettext-h (Description): Suggest GNU gettext, instead of
the 'gettext' module.

9 years agognulib-tool: don't give up on ln -s so easily
Paul Eggert [Sun, 24 Jan 2016 22:24:35 +0000 (14:24 -0800)]
gnulib-tool: don't give up on ln -s so easily

* gnulib-tool (func_ln_s): Don't give up on a later ln -s merely
because an earlier one failed.  The targets could be on different
file systems.  Problem reported by KO Myung-Hun in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00081.html

9 years agoclosedir: fix OS/2-related typos
Paul Eggert [Sun, 24 Jan 2016 22:13:41 +0000 (14:13 -0800)]
closedir: fix OS/2-related typos

Problem reported by KO Myung-Hun in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00107.html
* m4/closedir.m4 (gl_FUNC_CLOSEDIR): Fix a couple of typos
in the last couple of changes.

9 years agoopenat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
KO Myung-Hun [Sun, 24 Jan 2016 12:04:48 +0000 (21:04 +0900)]
openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC

* lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
copying a directory.

9 years agoregex: treat [x] as x if x is a unibyte encoding error
Paul Eggert [Sun, 24 Jan 2016 08:55:44 +0000 (00:55 -0800)]
regex: treat [x] as x if x is a unibyte encoding error

Problem reported by Aharon Robbins in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00091.html
* lib/regcomp.c (parse_byte) [!_LIBC && RE_ENABLE_I18N]: New function.
(build_range_exp) [!_LIBC && RE_ENABLE_I18N]: Use it.

9 years agoclosedir, dirfd, opendir: port to OpenSolaris 5.10
Paul Eggert [Sun, 24 Jan 2016 08:28:19 +0000 (00:28 -0800)]
closedir, dirfd, opendir: port to OpenSolaris 5.10

* m4/closedir.m4 (gl_FUNC_CLOSEDIR):
* m4/dirfd.m4 (gl_FUNC_DIRFD):
* m4/opendir.m4 (gl_FUNC_OPENDIR):
Don't use ${word##pat} substitution, as it doesn't work in
OpenSolaris 5.10 /bin/sh.  Problem reported by Assaf Gordon in:
http://bugs.gnu.org/22443#11

9 years agobootstrap: use American spelling
Paul Eggert [Sun, 24 Jan 2016 06:41:14 +0000 (22:41 -0800)]
bootstrap: use American spelling

* build-aux/bootstrap: Honor American spelling.

9 years ago@item needed inside @itemize
Karl Berry [Fri, 22 Jan 2016 16:21:35 +0000 (08:21 -0800)]
@item needed inside @itemize

9 years agohash-pjw-bare: fix comment
Bruno Haible [Thu, 21 Jan 2016 15:55:34 +0000 (07:55 -0800)]
hash-pjw-bare: fix comment

* lib/hash-pjw-bare.h (hash_pjw_bare): Fix comment.

9 years agowcwidth: Replace also on OpenBSD 5.8
Bruno Haible [Thu, 21 Jan 2016 10:32:20 +0000 (11:32 +0100)]
wcwidth: Replace also on OpenBSD 5.8

* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A).
* doc/posix-functions/wcwidth.texi: Update.

9 years agoupdate from texinfo
Karl Berry [Thu, 21 Jan 2016 00:17:35 +0000 (16:17 -0800)]
update from texinfo

9 years agognu-web-doc-update: fix addition of new files
Pádraig Brady [Wed, 20 Jan 2016 14:10:30 +0000 (14:10 +0000)]
gnu-web-doc-update: fix addition of new files

If there were already added (emnpty) dirs,
then cvs aborts the add with the message:
  cvs [add aborted]: there is a version in <./dirname> already

* build-aux/gnu-web-doc-update: Add directories separately
to the addition of files, to avoid the above issue
impacting the addition of files.

9 years agoutimens-tests: avoid pulling gettext .m4 files
Daiki Ueno [Tue, 19 Jan 2016 01:15:36 +0000 (10:15 +0900)]
utimens-tests: avoid pulling gettext .m4 files

Although this is not the right fix to the original problem:
http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00086.html
it makes it possible again for consumer projects to use arbitrary
version of gettext, through the steps described at:
http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
See here for details:
https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00079.html
* modules/futimens-tests (Depends-on): Add 'gettext-h' in place of
'gettext'.
* modules/utimens-tests (Depends-on): Add 'gettext-h' in place of
'gettext'.

9 years agoregex: pacify static checkers
Paul Eggert [Mon, 18 Jan 2016 18:34:18 +0000 (10:34 -0800)]
regex: pacify static checkers

Problem and draft fix reported by Aharon Robbins in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
* lib/regcomp.c (build_charclass_op, create_tree) [lint]:
Clear memory to pacify static checkers.

9 years agoregex: fix [ diagnostic
Paul Eggert [Mon, 18 Jan 2016 18:32:26 +0000 (10:32 -0800)]
regex: fix [ diagnostic

Problem and fix reported by Aharon Robbins in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
* lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.

* lib/regcomp.c (build_range_exp, build_charclass_op)

9 years agoregex: fix memory leaks
Paul Eggert [Mon, 18 Jan 2016 18:31:07 +0000 (10:31 -0800)]
regex: fix memory leaks

Problem and draft fix reported by Aharon Robbins in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00082.html
* lib/regcomp.c (build_range_exp, build_charclass_op):
* lib/regex_internal.c (re_dfa_add_node):
Fix memory leak on failure.

9 years agofts: don't unconditionally use leaf optimization for NFS
Pádraig Brady [Mon, 18 Jan 2016 17:29:28 +0000 (17:29 +0000)]
fts: don't unconditionally use leaf optimization for NFS

NFS st_nlink are not accurate on all implementations,
leading to aborts() if that assumption is made.
See <https://bugzilla.redhat.com/1299169>
* lib/fts.c (leaf_optimization_applies): Remove NFS from
the white list, and document the issue.

9 years ago* gnulib-tool: fix stray debug line in previous patch
Paul Eggert [Fri, 15 Jan 2016 18:12:41 +0000 (10:12 -0800)]
* gnulib-tool: fix stray debug line in previous patch

9 years agognulib-tool: don't assume ln -s works
Paul Eggert [Wed, 1 May 2013 04:39:22 +0000 (13:39 +0900)]
gnulib-tool: don't assume ln -s works

* gnulib-tool (func_ln_s): New function.
(func_ln): Use it.

9 years agoutimes: detect utimes() correctly on OS/2 kLIBC
KO Myung-Hun [Fri, 28 Nov 2014 07:43:14 +0000 (16:43 +0900)]
utimes: detect utimes() correctly on OS/2 kLIBC

utimes() of OS/2 kLIBC has some limitations.

1. OS/2 itself supports a file date since 1980 year in local time.
2. OS/2 itself supports only even seconds for a file time.
3. utimes() of OS/2 kLIBC does not work on an opened file.

* m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC.
* doc/posix-functions/utimes.texi: Document the above limitations of
utimes() on OS/2 kLIBC.

9 years agoopenat_proc_name: port to OS/2 kLIBC
Paul Eggert [Sat, 17 Jan 2015 09:54:05 +0000 (18:54 +0900)]
openat_proc_name: port to OS/2 kLIBC

OS/2 kLIBC provides a function to retrive a path from a fd. Use it
instead of /proc/self/fd.
* lib/openat-proc.c (openat_proc_name):
Don't assume file name length is less than INT_MAX.
Port to OS/2 kLIBC with __libc_Back_ioFHToPath().

9 years agostdint: check _INTPTR_T_DECLARED for intptr_t etc.
KO Myung-Hun [Fri, 15 Jan 2016 18:06:57 +0000 (10:06 -0800)]
stdint: check _INTPTR_T_DECLARED for intptr_t etc.

OS/2 kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
definitions of intptr_t and uintptr_t (which use int and unsigned)
to avoid clashes with declarations of system functions like sbrk.

* lib/stdint.in.h (intptr_t, uintptr_t): Check
_INTPTR_T_DECLARED before defining them.

9 years agodoc: mention unfixed issues with unsupported localtime() values
Pádraig Brady [Fri, 15 Jan 2016 16:12:03 +0000 (16:12 +0000)]
doc: mention unfixed issues with unsupported localtime() values

Note perl has configure time checks in place to avoid this.

* doc/posix-functions/localtime.texi: Mention that FreeBSD 10
returns nonsense for localtime(2^56).
* doc/posix-functions/localtime_r.texi: Likewise.

9 years agoGo back to gettext-0.19.7
Paul Eggert [Fri, 15 Jan 2016 06:05:19 +0000 (22:05 -0800)]
Go back to gettext-0.19.7

9 years agoopendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:49 +0000 (11:23 +0900)]
opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC

* lib/closedir.c (closedir): Unregister fd if closedir() succeeds.
* lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
Declare on kLIBC.
* lib/dirfd.c (struct dirp_fd_list): New. Structures to keep track of
fd associated with dirp.
(_gl_register_dirp_fd): New. Register fd associated with dirp to
dirp_fd_list.
(_gl_unregister_dirp_fd): New. Unregister fd with closing it.
(dirfd): Implemented for kLIBC.
* lib/fdopendir.c (fdopendir): Implemented for kLIBC.
* lib/opendir.c (opendir): New. Register fd and dirp pair if open()
succeeds.
* m4/closedir.m4 (gl_FUNC_CLOSEDIR): Replace if OS/2.
* m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
(REPLACE_DIRFD): Define to 1 if replaced.
* m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
* modules/closedir (Depends-on): Add dirfd.
* modules/dirfd (Depends-on): Add 'test $REPLACE_DIRFD = 1' to errno
condition.
(configure.ac): Add dirfd to LIBOBJS if $REPLACE_DIRFD = 1 as well.
* modules/opendir (Depends-on): Add dirfd.

9 years agodup, dup2, fcntl: support a directory fd on OS/2 kLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:47 +0000 (11:23 +0900)]
dup, dup2, fcntl: support a directory fd on OS/2 kLIBC

On OS/2 kLIBC, dup(), dup2() and fcntl() do not work on a directory
fd.

* lib/dup.c (dup_nothrow): New.
* lib/dup2.c (klibc_dup2dirfd): New. dup2() for a directory fd.
(klibc_dup2): New.
* lib/fcntl.c (klibc_fcntl): New.
* m4/dup.m4 (gl_FUNC_DUP): Check if dup() works on a directory fd.
* m4/dup2.m4 (gl_FUNC_DUP2): Check if dup2() works on a directory fd.
* m4/fcntl.m4 (gl_FUNC_FCNTL): Check if F_DUPFD works on a directory
fd.

9 years agopipe_filter_ii_execute: port to OS/2 kLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:46 +0000 (11:23 +0900)]
pipe_filter_ii_execute: port to OS/2 kLIBC

Pipes on kLIBC do not support O_NONBLOCK like Win32.

* lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
Reuse Win32 code on OS/2 kLIBC.
* lib/spawn-pipe.c: Reuse Win32 code on OS/2 kLIBC.
* lib/w32spawn.h: Do not include windows.h on OS/2 kLIBC.

9 years agowchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:45 +0000 (11:23 +0900)]
wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC

On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
static inline function.  The implementation of wcwidth in wcwidth.c
causes a "conflicting types" error.
* lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.

9 years agow32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:44 +0000 (11:23 +0900)]
w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC

spawn() on OS/2 kLIBC is not silly like one on Windows

* libc/w32spawn.h (SHELL_SPECIAL_CHARS, SHELL_SPACE_CHAR): Set both to
empty string on OS/2 kLIBC.

9 years agopipe-filter-aux: undefine HAVE_SELECT on KLIBC
KO Myung-Hun [Thu, 14 Jan 2016 02:23:43 +0000 (11:23 +0900)]
pipe-filter-aux: undefine HAVE_SELECT on KLIBC

On OS/2 kLIBC, select() works only on sockets.

* lib/pipe-filter-aux.h (HAVE_SELECT): Undefine on OS/2 kLIBC.

9 years agobinary-io: don't put fd in binary mode if it is a console on EMX
KO Myung-Hun [Thu, 14 Jan 2016 02:23:42 +0000 (11:23 +0900)]
binary-io: don't put fd in binary mode if it is a console on EMX

* lib/binary-io.h (SET_BINARY): Don't put fd in binary mode if it is
a console on EMX.

9 years agodoc: mention setlocale() issues on OpenBSD
Pádraig Brady [Thu, 14 Jan 2016 10:04:58 +0000 (10:04 +0000)]
doc: mention setlocale() issues on OpenBSD

* doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"")
never fails, and the need to check categories individually.

9 years agosig2str: list all signals on FreeBSD >= 7
Pádraig Brady [Thu, 14 Jan 2016 09:47:39 +0000 (09:47 +0000)]
sig2str: list all signals on FreeBSD >= 7

FreeBSD >= 7 is contravening POSIX by not defining NSIG
to the maximal statically defined signal value.
It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.

* lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
where available, even when NSIG is defined.

9 years agoacl-permissions: port to USE_ACL==0 platforms
Paul Eggert [Wed, 13 Jan 2016 19:10:28 +0000 (11:10 -0800)]
acl-permissions: port to USE_ACL==0 platforms

I ran into this problem when building bleeding-edge GNU Emacs
with gcc -fsanitize=address on Fedora 23.  On this platform
the ACL library does not pass the 'configure' test and Emacs
then does not build due in part to what appear to be typos in the
ACL part of Gnulib.
* lib/acl-internal.c (free_permission_context):
* lib/acl-internal.h (struct permission_context):
Test whether USE_ACL is nonzero, not whether it is defined.

9 years agomktime: rename macro to avoid glibc clash
Martin Sebor [Wed, 13 Jan 2016 07:09:35 +0000 (23:09 -0800)]
mktime: rename macro to avoid glibc clash

* lib/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.  See:
https://sourceware.org/ml/libc-alpha/2016-01/msg00267.html

9 years agoPort "$@" to OpenIndiana ksh93
Paul Eggert [Tue, 12 Jan 2016 23:20:39 +0000 (15:20 -0800)]
Port "$@" to OpenIndiana ksh93

In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html
Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
(derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
bug long-dead shells, so remove the workaround.
* build-aux/announce-gen, build-aux/do-release-commit-and-tag:
* build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
* build-aux/prefix-gnulib-mk, build-aux/update-copyright:
* build-aux/useless-if-before-free, tests/test-update-copyright.sh:
Use "$@" instead of ${1+"$@"}.

9 years agoautoupdate
Paul Eggert [Tue, 12 Jan 2016 20:53:28 +0000 (12:53 -0800)]
autoupdate

9 years agoPort Universal Time settings to strict POSIX
Paul Eggert [Tue, 12 Jan 2016 17:29:40 +0000 (09:29 -0800)]
Port Universal Time settings to strict POSIX

* build-aux/announce-gen, build-aux/bootstrap:
* build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
* build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
* build-aux/gnupload, build-aux/mkinstalldirs:
* build-aux/move-if-change, build-aux/prefix-gnulib-mk:
* build-aux/update-copyright, build-aux/useless-if-before-free:
* build-aux/vc-list-files, tests/test-strftime.c:
Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
but POSIX says the behavior of TZ="UTC" is undefined.

9 years agoupdate from texinfo
Karl Berry [Fri, 8 Jan 2016 00:04:04 +0000 (16:04 -0800)]
update from texinfo

9 years agoupdate from texinfo
Karl Berry [Mon, 4 Jan 2016 22:36:17 +0000 (14:36 -0800)]
update from texinfo

9 years agomsvc-inval: fix problem with unset shell var
Paul Eggert [Sun, 3 Jan 2016 00:19:53 +0000 (16:19 -0800)]
msvc-inval: fix problem with unset shell var

Problem reported by Karl Berry in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00004.html
* modules/msvc-inval (Depends-on):
AC_REQUIRE gl_MSVC_INVAL instead of merely calling it.
* modules/msvc-nothrow (Depends-on): Likewise for gl_MSVC_NOTHROW.

9 years agoautoupdate
Karl Berry [Fri, 1 Jan 2016 16:52:06 +0000 (08:52 -0800)]
autoupdate

9 years agotests: for compare_(), use cmp -s where available
Pádraig Brady [Wed, 25 Nov 2015 14:26:59 +0000 (14:26 +0000)]
tests: for compare_(), use cmp -s where available

* tests/init.sh (compare_): Only fall back to cmp without
the POSIX defined -s option, where this is not available.

9 years agoversion-etc: new year
Paul Eggert [Fri, 1 Jan 2016 08:56:19 +0000 (00:56 -0800)]
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.
* all files: Run 'make update-copyright'.

9 years agohuman: fix output buffer overrun by 1
Paul Eggert [Thu, 31 Dec 2015 21:16:55 +0000 (13:16 -0800)]
human: fix output buffer overrun by 1

* lib/human.c (human_readable): Fix off-by-one typo in buffer
calculation that could lead to a one-byte buffer overrun.

9 years agoautoupdate
Karl Berry [Thu, 31 Dec 2015 16:04:07 +0000 (08:04 -0800)]
autoupdate

9 years agomaint: add missing ChangeLog entry for previous commit
Daiki Ueno [Sun, 27 Dec 2015 23:16:02 +0000 (08:16 +0900)]
maint: add missing ChangeLog entry for previous commit

9 years agomaint: fix operator precedence in mbrtowc test
Daiki Ueno [Sun, 27 Dec 2015 21:27:42 +0000 (06:27 +0900)]
maint: fix operator precedence in mbrtowc test

This is a fix for test breakage introduced by commit 45228d96; the
equality expression must be parenthesized when negated with '!',
otherwise we always get:

  test-mbrtowc.c:49: assertion 'ret == (size_t)(-2)' failed

* m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Negate the entire expression.
* m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.

9 years agoautoupdate
Karl Berry [Thu, 24 Dec 2015 16:58:41 +0000 (08:58 -0800)]
autoupdate

9 years agoregexprops-generic: update from regex.h
James Youngman [Wed, 23 Dec 2015 19:22:40 +0000 (19:22 +0000)]
regexprops-generic: update from regex.h

* doc/regexprops-generic.texi: update by running the regexprops binary
from findutils (the command line is 'regexprops "Regular Expressions"
generic').  The recent (ish) change (5a5a9388) to regex.h aligning
gnulib with GNU grep had made this document out-of-date.

9 years agostrftime-tests: avoid false failure on OS X
Pádraig Brady [Tue, 22 Dec 2015 15:45:56 +0000 (15:45 +0000)]
strftime-tests: avoid false failure on OS X

* tests/test-strftime.c (struct localtime_rz_test): Add an
ahistorical member which is used to warn rather than fail
when tm_isdst isn't set for such entries.  This is the case for
"1970-01-01 13:00:00 +1300 (NZDT)" on Darwin 13/14 at least.

9 years agoupdate from texinfo
Karl Berry [Wed, 23 Dec 2015 00:02:59 +0000 (16:02 -0800)]
update from texinfo

9 years agofts: ensure leaf optimization is used for NFS
Kamil Dudka [Wed, 9 Dec 2015 06:34:56 +0000 (07:34 +0100)]
fts: ensure leaf optimization is used for NFS

NFS provides usable dirent.d_type but not necessarily for all entries
of large directories.  See <https://bugzilla.redhat.com/1252549>
* lib/fts.c (leaf_optimization_applies): Append NFS on the white list.

9 years agofts: enable leaf optimization for XFS
Pádraig Brady [Sun, 20 Dec 2015 23:46:05 +0000 (23:46 +0000)]
fts: enable leaf optimization for XFS

XFS provides usable dirent.d_type only for DT_DIR,
but the noleaf optimization still applies, as confirmed with:

  test $(($(find . -maxdepth 1 -type d | wc -l) + 1)) = $(stat -c %h .)

Enabling this gives significant traversal speedup.
Testing with find(1) gives:

  $ time find/find-before /usr/share >/dev/null
  real    0m0.410s
  user    0m0.145s
  sys     0m0.266s

  $ time find/find-after /usr/share >/dev/null
  real    0m0.278s
  user    0m0.147s
  sys     0m0.131s

* lib/fts.c (leaf_optimization_applies): Add XFS to the white list.

9 years agonon-recursive-gnulib-prefix-hack: preserve V_GPERF lines
Daiki Ueno [Fri, 18 Dec 2015 22:42:27 +0000 (07:42 +0900)]
non-recursive-gnulib-prefix-hack: preserve V_GPERF lines

* build-aux/prefix-gnulib-mk (prefix_assignment): Don't change the RHS
of 'V_GPERF.* = ' lines.  Reported by Assaf Gordon in:
https://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00015.html

9 years agointprops: comment fix
Paul Eggert [Fri, 18 Dec 2015 07:06:29 +0000 (23:06 -0800)]
intprops: comment fix

* lib/intprops.h: Fix comment. Reported by Pádraig Brady in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00013.html

9 years agoupdate from texinfo
Karl Berry [Thu, 17 Dec 2015 21:46:39 +0000 (13:46 -0800)]
update from texinfo

9 years agointprops-test: work around GCC bug 68971
Paul Eggert [Thu, 17 Dec 2015 20:56:55 +0000 (12:56 -0800)]
intprops-test: work around GCC bug 68971

Problem reported by Pádraig Brady in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00011.html
* tests/test-intprops.c: Ignore -Woverflow in GCC 6 and earlier.
(main): Add a case that better tests 64-bit long in this area.

9 years agoautoupdate
Karl Berry [Mon, 14 Dec 2015 14:37:38 +0000 (06:37 -0800)]
autoupdate

9 years agognulib-tool: allow multiple --local-dir usage
Pavel Raiskup [Sat, 21 Nov 2015 13:09:15 +0000 (14:09 +0100)]
gnulib-tool: allow multiple --local-dir usage

* gnulib-tool: Use --local-dir to construct compound
$local_gnulib_path path instead of $local_gnulib_dir.  Determine
PATH_SEPARATOR early.
(local_gnulib_dir): Rename into $local_gnulib_path everywhere.
(func_gnulib_dir): Cut out PATH_SEPARATOR detection code into
func_determine_path_separator because that needs to be detected
earlier now.
(func_determine_path_separator): New function.
(func_path_foreach, func_path_foreach_inner): New functions.
(func_path_prepend, func_path_append): Likewise.
(func_lookup_local_file, func_lookup_local_file_cb): Likewise.
(func_lookup_file, func_all_modules): Use new functions to work
with local_gnulib_path.
(func_modules_in_dir, func_exists_module): New callbacks for
func_path_foreach.
(func_exists_module, func_get_tests_module): Likewise.
(func_is_local_file, func_should_symlink): New helper methods.
(func_add_file, func_update_file): Use new func_should_symlink
instead, DRY.
(func_reconstruct_cached_local_gnulib_path): New helper.
(func_reconstruct_cached_dir): New callback.
(func_import): The cached_local_gnulib_dir renamed to
cached_local_gnulib_path similarly to local_gnulib_dir.
Use new func_reconstruct_cached_local_gnulib_path.
(func_count_relative_local_gnulib_path): New sub-method.
(func_create_testdir): Use func_should_symlink, DRY.
(func_create_megatestdir): Use new functions to work with
local_gnulib_path correctly.
(func_append_local_dir): New helper.