]> Savannah Git Hosting - gnulib.git/log
gnulib.git
10 years agouniwbrk: ignore Extended/Format characters at BOL
Daiki Ueno [Thu, 15 Jan 2015 03:03:09 +0000 (12:03 +0900)]
uniwbrk: ignore Extended/Format characters at BOL

* lib/uniwbrk/u-wordbreaks.h (FUNC): Ignore Extend and Format
characters if the previous character property is one of
WBP_NEWLINE, WBP_CR, and WBP_LF.

10 years agotest-strstr.c: avoid a trivial leak
Jim Meyering [Mon, 12 Jan 2015 00:47:11 +0000 (16:47 -0800)]
test-strstr.c: avoid a trivial leak

* tests/test-strstr.c (main): Free haystack.

10 years agoupdate-copyright: recognize groff's \(co marker
Jim Meyering [Mon, 12 Jan 2015 00:44:35 +0000 (16:44 -0800)]
update-copyright: recognize groff's \(co marker

* build-aux/update-copyright (circle_c_re): Also accept
uses of \(co, as found in gzip.1.

10 years agomaint.mk: fix compatibility with OS X nm
Pádraig Brady [Thu, 8 Jan 2015 12:18:54 +0000 (12:18 +0000)]
maint.mk: fix compatibility with OS X nm

* top/maint.mk (_gl_tight_scope): Use the -g option to
show exported items rather than the -e option which is
ignored on all platforms except OS X where it gives an error.
Reported by Assaf Gordon.

10 years agolocalcharset: improve charset detection on OS/2
KO Myung-Hun [Wed, 7 Jan 2015 05:36:52 +0000 (14:36 +0900)]
localcharset: improve charset detection on OS/2

Use system codepage when appropriate.  Map OS/2 codepages to
GNU canonical charset names if possible.

* lib/config.charset: Don't output aliases if "$os" is os2*.
* lib/localcharset.c (get_charset_aliases) [OS2]: Hardcode the
result for OS/2.
(locale_charset) [OS2]: Use system codepage if codeset is omitted
from the locale name which is neither "C" nor "POSIX".

10 years agocount-leading-zeros: use 64-bit intrinsics on 32-bit Windows
Paul Eggert [Tue, 6 Jan 2015 17:05:22 +0000 (09:05 -0800)]
count-leading-zeros: use 64-bit intrinsics on 32-bit Windows

This reverts the last patch but one, as it shouldn't be needed now
that the typo is fixed.
* lib/count-leading-zeros.h (count_leading_zeros_ll):
* lib/count-trailing-zeros.h:
* lib/count-one-bits.h:
Go back to using 64-bit intrinsics.

10 years agocount-leading-zeros: fix pragma typos
Paul Eggert [Tue, 6 Jan 2015 16:50:04 +0000 (08:50 -0800)]
count-leading-zeros: fix pragma typos

* lib/count-leading-zeros.h (_BitScanReverse, _BitScanReverse64):
Fix typos in declaration of intrinsics when _MSC_VER.

10 years agoautoupdate
Karl Berry [Tue, 6 Jan 2015 13:53:30 +0000 (05:53 -0800)]
autoupdate

10 years agocount-leading-zeros: avoid 64-bit intrinsics on 32-bit Windows
Pádraig Brady [Tue, 6 Jan 2015 02:27:16 +0000 (02:27 +0000)]
count-leading-zeros: avoid 64-bit intrinsics on 32-bit Windows

* lib/count-leading-zeros.h (count_leading_zeros_ll): Use 32 bit
intrinsics in this case.
* lib/count-trailing-zeros.h: Likewise.
* lib/count-one-bits.h: Likewise.

10 years agouniname/uniname: update to Unicode 7.0.0
Daiki Ueno [Tue, 6 Jan 2015 09:53:40 +0000 (18:53 +0900)]
uniname/uniname: update to Unicode 7.0.0

To accommodate new characters added since Unicode 5.1.0, this
changes the internal representation of codepoint ranges.
Previously, we grouped codepoint ranges by manually assigned 4-bit
tag, which only allowed 16 groups.  This removes the limitation by
switching to binary search on a table.  For the detail rationale and the
benchmark results, see:
https://lists.gnu.org/archive/html/bug-libunistring/2014-06/msg00001.html

* lib/uniname/gen-uninames.lisp (unicode-char): Rename CODE member
to INDEX, as it no longer represents a codepoint.
(range): New struct.
(main): Switch to intervals list from a bit-pattern based
classification.
* lib/uniname/uninames.h: Regenerate.
* tests/uniname/UnicodeDataNames.txt: Update to Unicode 7.0.0.
* modules/uniname/base (configure.ac): Bump minimum version to
0.9.5.
* modules/uniname/uniname (configure.ac): Bump minimum version to
0.9.5.

10 years agodoc: update INSTALL from autoconf
Eric Blake [Mon, 5 Jan 2015 23:15:44 +0000 (16:15 -0700)]
doc: update INSTALL from autoconf

Picks up the copyright year, and also the fact that newer texinfo
uses '' instead of `' for quoting.

* doc/install.texi: Resync from autoconf.
* doc/INSTALL: Reflect recent autoconf update.
* doc/INSTALL.ISO: Likewise.
* doc/INSTALL.UTF-8: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agostdio: fix use of PRIdMAX on modern mingw
Eric Blake [Mon, 5 Jan 2015 21:08:27 +0000 (14:08 -0700)]
stdio: fix use of PRIdMAX on modern mingw

Commit cf88e56ab broke the use of PRIdMAX and friends on modern
mingw64 installations.  Basically, when requesting
_USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld,
it also rewrites <inttypes.h> to provide PRIdMAX as "lld" instead of
"I64d" (but only when <stdio.h> is also included).  But if a user is
NOT using the gnulib printf module, gnulib's <stdio.h> was still
giving printf() the system printf attribute, which causes the
compiler to then complain about an unknown %lld specifier, even though
we know we don't need to use the non-standard %I64d.  So this patch
adds a configure-time probe that should work with older gcc (which
does not differentiate between printf flavors) and older mingw (where
_USE_MINGW_ANSI_STDIO has no impact on behavior), while fixing the
mismatch in flavors on modern systems.

* m4/stdio_h.m4 (gl_STDIO_H): Probe for printf flavor via inttypes.
* lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use result
to work with modern mingw.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoFix check for pthreads.h pollution on Mingw64
Daniel P. Berrange [Mon, 15 Dec 2014 17:44:22 +0000 (17:44 +0000)]
Fix check for pthreads.h pollution on Mingw64

A previous commit attempted to workaround pollution in the
Mingw64 pthreads.h header file

  commit d5fec6c22f03c6a73d62260c9ce091c10c0a9cbd
  Author: Eric Blake <eblake@redhat.com>
  Date:   Wed Jan 22 20:39:45 2014 -0700

    pthread: work around winpthread header pollution on mingw

It activated its workaround based on existance of the strtok_r
wrapper in pthreads.h. As luck would have it, latest Mingw64
headers removed the strtok_r wrapper from pthreads.h, but left
all the others. So the gnulib workaround was not activated.

Change the configure check to look for several of the broken
wrappers, instead of just strtok_r

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agolib-symbol-versions: cache script check
Paul Eggert [Sat, 3 Jan 2015 23:21:54 +0000 (15:21 -0800)]
lib-symbol-versions: cache script check

* m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT):
Cache the check for linker version scripts.
From a suggestion by Christophe Curis in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00011.html

10 years agomaint: fix grammar nits in propername
Benno Schulenberg [Sun, 4 Jan 2015 10:23:51 +0000 (11:23 +0100)]
maint: fix grammar nits in propername

* lib/propername.h: Remove a mistaken comma and a duplicate "from",
and use an adequate verb and tense.

10 years agogendocs: Update bug-report address and URLs to Gnulib's.
Ludovic Courtès [Fri, 2 Jan 2015 22:00:34 +0000 (23:00 +0100)]
gendocs: Update bug-report address and URLs to Gnulib's.

* build-aux/gendocs.sh: Change email addresses and upstream URLs
from to Gnulib's.
(scripturl, templateurl): Adjust accordingly.

10 years agogendocs: Add 'doc/gendocs_template_min'.
Ludovic Courtès [Fri, 2 Jan 2015 20:34:34 +0000 (21:34 +0100)]
gendocs: Add 'doc/gendocs_template_min'.

Suggested by Paul Eggert <eggert@cs.ucla.edu>.

* module/gendocs: Add 'doc/gendocs_template_min'.

10 years agogendocs: Change maintainer.
Ludovic Courtès [Wed, 17 Dec 2014 16:45:27 +0000 (17:45 +0100)]
gendocs: Change maintainer.

10 years agogendocs: copyright date and version fix
Paul Eggert [Thu, 1 Jan 2015 23:19:42 +0000 (15:19 -0800)]
gendocs: copyright date and version fix

Reported by Karl Berry in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00002.html
* build-aux/gendocs.sh, doc/gendocs_template, doc/gendocs_template_min:
Fix copyright date.
* build-aux/gendocs.sh (scriptversion): Update.

10 years agoderived INSTALL
Karl Berry [Thu, 1 Jan 2015 19:05:02 +0000 (11:05 -0800)]
derived INSTALL

10 years agorevert copyright updates in slaved files
Karl Berry [Thu, 1 Jan 2015 19:04:33 +0000 (11:04 -0800)]
revert copyright updates in slaved files

10 years agoversion-etc: new year
Paul Eggert [Thu, 1 Jan 2015 01:38:23 +0000 (01:38 +0000)]
version-etc: new year

* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.

10 years agoautoupdate
Karl Berry [Wed, 31 Dec 2014 22:21:13 +0000 (14:21 -0800)]
autoupdate

10 years agoautoupdate
Karl Berry [Wed, 31 Dec 2014 14:55:37 +0000 (06:55 -0800)]
autoupdate

10 years agoxstrtol: ensure errno is reset
Pádraig Brady [Tue, 30 Dec 2014 23:37:26 +0000 (23:37 +0000)]
xstrtol: ensure errno is reset

Since commit 3bf75404, on 26-09-1998, errno may not have been reset.
Noticed with a spurious coreutils test failure on Darwin 14.0.0.

* lib/xstrtol.c (__xstrtol): Always reset errno before returning.

10 years agoutimens: fix dependency typo
Paul Eggert [Sun, 28 Dec 2014 22:03:39 +0000 (14:03 -0800)]
utimens: fix dependency typo

* modules/utimens (Depends-on): Remove 'assure'.
This bug was introduced in the recent 'assure' patch.

10 years agoautoupdate
Karl Berry [Fri, 26 Dec 2014 16:28:48 +0000 (08:28 -0800)]
autoupdate

10 years agodocs: mention why libgen.h is bad
Eric Blake [Mon, 22 Dec 2014 18:46:41 +0000 (11:46 -0700)]
docs: mention why libgen.h is bad

I just debugged a failure in sharutils-4.14.2-1 for using basename()
without including <libgen.h>.  In the process, I realized that we
aren't doing a good job of explaining why we don't offer a libgen.h
replacement (it is useless because the only two functions it
provides are also useless).

* doc/posix-headers/libgen.texi (libgen.h): Refer to dirname module.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoautoupdate
Karl Berry [Sun, 21 Dec 2014 15:03:14 +0000 (07:03 -0800)]
autoupdate

10 years agoassure: new module
Paul Eggert [Sat, 20 Dec 2014 21:00:21 +0000 (13:00 -0800)]
assure: new module

This works better than 'assert' when compiling with -DNDEBUG,
as it avoids some compiler diagnostics in that case.
Reported by Norihiro Tanaka in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00215.html
* MODULES.html.sh (func_all_modules): Add 'assure'.
* lib/assure.h, modules/assure: New files.
* lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c:
* lib/poll.c, lib/savewd.c, lib/utimens.c, lib/xstrtol.c:
Prefer 'assure' to 'assert'.
* modules/chdir-long, modules/cycle-check, modules/fchdir:
* modules/poll, modules/savewd, modules/utimens, modules/xstrtol:
Depend on 'assure'.

10 years agoautoupdate
Karl Berry [Fri, 19 Dec 2014 14:56:42 +0000 (06:56 -0800)]
autoupdate

10 years agostdalign: port better to HP compilers
Paul Eggert [Wed, 17 Dec 2014 01:57:23 +0000 (17:57 -0800)]
stdalign: port better to HP compilers

* m4/stdalign.m4 (gl_STDALIGN_H): Try the test if __HP_cc or
__HP_aCC are nonzero, to be consistent with the 2014-01-20 patch.

10 years agostdalign: work around Apple GCC 4.0 bug
Paul Eggert [Wed, 17 Dec 2014 01:29:33 +0000 (17:29 -0800)]
stdalign: work around Apple GCC 4.0 bug

Reported by David Fang in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00194.html
* lib/stdalign.in.h (_Alignas):
* m4/stdalign.m4 (gl_STDALIGN_H):
Do not use aligned attribute with GCC 4.0 on Apple.

10 years agogendocs.sh and templates now maintained in gnulib
Karl Berry [Wed, 17 Dec 2014 22:46:25 +0000 (14:46 -0800)]
gendocs.sh and templates now maintained in gnulib

10 years agogetcwd: fix test failure on OS X 10.9
Pádraig Brady [Tue, 16 Dec 2014 02:35:19 +0000 (02:35 +0000)]
getcwd: fix test failure on OS X 10.9

* m4/getcwd-path-max.m4: Avoid the replacement if it
won't be effective due to the PATH_MAX limitation of lstat().
(gl_cv_func_getcwd_path_max): Adjust to indicate this case.
* m4/getcwd.m4 (gl_FUNC_GETCWD): Define HAVE_GETCWD_SHORTER
for this case for use in tests, and also exclude this
case when setting REPLACE_GETCWD.
* tests/test-getcwd.c (test_long_name): Restrict the
tested path length so that lstat() will not be passed
a path greater than PATH_MAX.
Also key a test condition on HAVE_OPENAT_SUPPORT rather
than AT_FDCWD, since the latter is set unconditionally
since Sep 2009 in commit 52c658e9.

10 years agoparse-datetime: avoid a compiler warning with byacc
Tim Rühsen [Sun, 14 Dec 2014 20:32:54 +0000 (20:32 +0000)]
parse-datetime: avoid a compiler warning with byacc

* lib/parse-datetime.y (yylex): Use the same prototype in the
function definition as the declaration, to avoid a -Wstrict-prototypes
warning seen when using byacc.

10 years agounicase/locale-language-tests: fix LOCALE_FR test
Daiki Ueno [Fri, 12 Dec 2014 00:20:59 +0000 (09:20 +0900)]
unicase/locale-language-tests: fix LOCALE_FR test

* tests/unicase/test-locale-language.sh: Really use $LOCALE_FR for
a French locale with traditional encoding.
Reported by umerqayam in:
http://lists.gnu.org/archive/html/bug-libunistring/2014-12/msg00000.html

10 years agoautoupdate
Karl Berry [Sat, 13 Dec 2014 14:51:11 +0000 (06:51 -0800)]
autoupdate

10 years agoupdate from texinfo
Karl Berry [Fri, 12 Dec 2014 23:24:21 +0000 (15:24 -0800)]
update from texinfo

10 years agostddef: support C11's max_align_t
Paul Eggert [Fri, 12 Dec 2014 19:27:45 +0000 (11:27 -0800)]
stddef: support C11's max_align_t

* doc/posix-headers/stddef.texi (stddef.h): Document max_align_t.
* lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]:
Do not undef, as that might cause max_align_t to be defined twice.
Instead, change use to check for _GL_STDDEF_WINT_T too.
(max_align_t) [!HAVE_MAX_ALIGN_T]: New decl.
* m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
Check for max_align_t.
* modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T.
* modules/stddef-tests (Depends-on): Add stdalign.
* tests/test-stddef.c: Test max_align_t.

10 years agounistd: fix iOS check conditional
Daiki Ueno [Thu, 11 Dec 2014 07:07:31 +0000 (16:07 +0900)]
unistd: fix iOS check conditional

On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
as 0 or 1 in <TargetConditionals.h>, and the previous check always
yielded true on non-iOS environment.
* lib/unistd.in.h (environ) [__APPLE__]: Check the values of
TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
they are defined.

10 years agoposixtm: avoid compiler warning in a better way
Paul Eggert [Wed, 10 Dec 2014 02:11:46 +0000 (18:11 -0800)]
posixtm: avoid compiler warning in a better way

* lib/posixtm.c (IF_LINT): Remove.
(year, posix_time_parse):
Return true (not 0) if successful.  All callers changed.
(posix_time_parse): Simplify to pacify GCC without need for IF_LINT.

10 years agorelocatable: support UNIXROOT in relocate() on EMX
KO Myung-Hun [Tue, 9 Dec 2014 01:40:48 +0000 (10:40 +0900)]
relocatable: support UNIXROOT in relocate() on EMX

UNIXROOT is used to specify a drive of a root of FHS. So if a path is
started with '/', then it should be translated to "$UNIXROOT/".

* lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
started with '/' on EMX.

10 years agofreopen: workaround freopen() on OS/2 kLIBC
KO Myung-Hun [Fri, 5 Dec 2014 06:01:36 +0000 (15:01 +0900)]
freopen: workaround freopen() on OS/2 kLIBC

On OS/2 kLIBC, freopen() returns NULL even if it is successful if
filename is NULL.

* lib/freopen.c (rpl_freopen): Workaround.
* m4/freopen.m4: Add os2* case.

10 years agoget_shared_library_fullname: port to EMX
KO Myung-Hun [Wed, 3 Dec 2014 06:46:17 +0000 (15:46 +0900)]
get_shared_library_fullname: port to EMX

* lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
on EMX, respectively.
(_DLL_InitTerm): New on EMX.
(get_shared_library_fullname): Implement on EMX.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agofind_executable: port to EMX
KO Myung-Hun [Wed, 3 Dec 2014 07:02:50 +0000 (16:02 +0900)]
find_executable: port to EMX

* lib/progreloc.c (find_executable): Implement on EMX.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agosched: check struct sched_param in spawn.h as well
KO Myung-Hun [Thu, 4 Dec 2014 01:03:34 +0000 (10:03 +0900)]
sched: check struct sched_param in spawn.h as well

On OS/2 kLIBC, struct sched_param is in spawn.h. So without this a
redefinition error occurs when sched.h is inclued by spawn.h.

* lib/sched.in.h: Include spawn.h on kLIBC.
* lib/sched_h.m4: Check struct sched_param in spawn.h as well.

10 years agosupport GNU format printf and scanf on mingw
Pádraig Brady [Tue, 2 Dec 2014 13:34:06 +0000 (13:34 +0000)]
support GNU format printf and scanf on mingw

Allow %lld and %Lf to work on mingw as per:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/

10 years agobootstrap: Allow perl modules in $buildreq
Martin Kletzander [Mon, 8 Dec 2014 12:19:12 +0000 (13:19 +0100)]
bootstrap: Allow perl modules in $buildreq

With this patch it is possible to put e.g. "perl::XML:XPath -" in
$buildreq in bootstrap.conf which will cause a check for perl module
XML::XPath using:

  perl -m"XML::XPath" -e 'exit 0' >/dev/null 2>&1

If this fails due to any other error than XML::XPath missing, it is left
on the user to fix up his/her bootstrap.conf.  One of the examples
might be perl itself missing, which should be in $buildreq and precede
any perl::Module specifications.  Versioning of perl modules is not
supported.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoapply _GL_ATTRIBUTE_PURE to some inline functions
Pádraig Brady [Sat, 6 Dec 2014 01:28:17 +0000 (01:28 +0000)]
apply _GL_ATTRIBUTE_PURE to some inline functions

clang 3.4.2 flagged these inline functions as pure

* lib/savewd.h (savewd_errno): Set _GL_ATTRIBUTE_PURE.
* lib/sig-handler.h (get_handler): Likewise.
* lib/stat-time.h (get_stat_{a,c,m,birth}time{,_ns}): Likewise.
* lib/timespec.h (timespec_cmp, timespec_sign): Likewise.

10 years agovasnprintf: fix potential incorrect errno
Pádraig Brady [Mon, 8 Dec 2014 09:46:38 +0000 (09:46 +0000)]
vasnprintf: fix potential incorrect errno

An adjustment of the previous commit c5c4f53b.

* lib/vasnprintf.c (VASNPRINTF): free() generally doesn't set errno,
but it can potentially in certain edge cases.
Reported by Eric Blake.

10 years agovasnprintf: fix potential use after free
Pádraig Brady [Sat, 6 Dec 2014 01:14:02 +0000 (01:14 +0000)]
vasnprintf: fix potential use after free

* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
flagged by clang-analyzer 3.4.2.

10 years agoautoupdate
Karl Berry [Fri, 5 Dec 2014 13:56:18 +0000 (05:56 -0800)]
autoupdate

10 years agofilevercmp, posixtm: avoid compiler warnings with -O3
Pádraig Brady [Fri, 5 Dec 2014 12:32:49 +0000 (12:32 +0000)]
filevercmp, posixtm: avoid compiler warnings with -O3

* lib/filevercmp.h (filevercmp): Tag with _GL_ATTRIBUTE_PURE
* lib/posixtm.c: (IF_LINT): Define.
(posix_time_parse): Use it to void a "may be used uninitialized"
warning, seen only with -O3.

10 years agoFix LDBL80_WORDS macro on big endian platforms.
Bruno Haible [Fri, 5 Dec 2014 10:30:27 +0000 (11:30 +0100)]
Fix LDBL80_WORDS macro on big endian platforms.

* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Add missing parenthesis in
LDBL80_WORDS macro.
* m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
* tests/test-isfinite.c (test_isfinitel): Likewise.
* tests/test-isinf.c (test_isinfl): Likewise.
* tests/test-isnan.c (test_long_double): Likewise.
* tests/test-isnanl.h (main): Likewise.
* tests/test-snprintf-posix.h (LDBL80_WORDS): Add missing parenthesis.
* tests/test-sprintf-posix.h (LDBL80_WORDS): Likewise.
* tests/test-vasnprintf-posix.c (LDBL80_WORDS): Likewise.
* tests/test-vasprintf-posix.c (LDBL80_WORDS): Likewise.
Reported by Pádraig Brady.

10 years agoautoupdate
Karl Berry [Wed, 3 Dec 2014 15:04:40 +0000 (07:04 -0800)]
autoupdate

10 years agogit-version-gen: do not print new line characters
KO Myung-Hun [Tue, 2 Dec 2014 05:55:20 +0000 (14:55 +0900)]
git-version-gen: do not print new line characters

On platforms with CRLF endings (such as OS/2), use of 'echo' may
leave behind an unwanted CR.

* build-aux/git-version-gen: Use printf instead of echo and tr.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agognulib-tool: recognize x:* as an absolute path
KO Myung-Hun [Tue, 2 Dec 2014 03:50:49 +0000 (12:50 +0900)]
gnulib-tool: recognize x:* as an absolute path

On OS/2, x:* is an absolute path, too.

* gnulib-tool (func_gnulib_dir): Add ?:* case.
(func_relconcat): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoargp: avoid extraneous translation and mem leak with empty pre doc
Andrei Borzenkov [Tue, 2 Dec 2014 16:05:10 +0000 (16:05 +0000)]
argp: avoid extraneous translation and mem leak with empty pre doc

* lib/argp-help.c (argp_doc): Never translate the empty string,
when "\v" is the first or last character of the string, as that
has a reserved meaning to return the header info from a po file.
This also fixes a small memory leak in the !post case.
The issue can be seen with this command for example:
LC_MESSAGES=en_US grub2-mknetdir --help

10 years agoautoupdate
Karl Berry [Sat, 29 Nov 2014 14:00:25 +0000 (06:00 -0800)]
autoupdate

10 years agodoc: mention that _BSD_SOURCE is deprecated for _DEFAULT_SOURCE
Pádraig Brady [Fri, 28 Nov 2014 10:57:31 +0000 (10:57 +0000)]
doc: mention that _BSD_SOURCE is deprecated for _DEFAULT_SOURCE

* doc/posix-functions/setjmp.texi: Defining _BSD_SOURCE will induce
warnings unless _DEFAULT_SOURCE is also defined.

10 years agouniname/uniname-tests: skip if system's libunistring is used
Daiki Ueno [Thu, 27 Nov 2014 09:46:43 +0000 (18:46 +0900)]
uniname/uniname-tests: skip if system's libunistring is used

* modules/uniname/uniname-tests (Makefile.am): Skip test if
uniname/uniname module is not compiled.

10 years agoprintf: fix configure check on big endian systems
Pádraig Brady [Thu, 27 Nov 2014 11:17:07 +0000 (11:17 +0000)]
printf: fix configure check on big endian systems

* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Add missing bracket.

10 years agopipe-filter-gi, pipe-filter-ii: port to AIX
Daiki Ueno [Tue, 18 Nov 2014 12:11:09 +0000 (21:11 +0900)]
pipe-filter-gi, pipe-filter-ii: port to AIX

On AIX 7.1, 'select' is defined as static and cannot be referred
to from inline function.
* lib/pipe-filter-aux.h (nointr_select): Remove, manually expand
the definition...
* lib/pipe-filter-gi.c (filter_loop): ...here, and...
* lib/pipe-filter-ii.c (pipe_filter_ii_execute): ...here.

10 years agogitlog-to-changelog: add --until
Paul Eggert [Thu, 20 Nov 2014 17:29:35 +0000 (09:29 -0800)]
gitlog-to-changelog: add --until

* build-aux/gitlog-to-changelog: Support new --until option.
Need described by Eli Zaretskii in: http://bugs.gnu.org/19113

10 years agoupdate from texinfo
Karl Berry [Sun, 16 Nov 2014 18:41:11 +0000 (10:41 -0800)]
update from texinfo

10 years agoextern-inline: update commentary about GCC bugs
Paul Eggert [Fri, 14 Nov 2014 20:10:50 +0000 (12:10 -0800)]
extern-inline: update commentary about GCC bugs

* m4/extern-inline.m4: Add another GCC bug number to comments.

10 years agogen-uni-tables: untabify
Daiki Ueno [Thu, 13 Nov 2014 07:54:53 +0000 (16:54 +0900)]
gen-uni-tables: untabify

* lib/gen-uni-tables.c: Untabify.

10 years agogen-uni-tables: check out-of-range values added to 3-level tables
Daiki Ueno [Fri, 10 Oct 2014 13:59:46 +0000 (22:59 +0900)]
gen-uni-tables: check out-of-range values added to 3-level tables

* lib/gen-uni-tables.c (output_category, output_bidi_category)
(output_joining_type, output_ident_category): Check out-of-range
values added to 3-level tables.

10 years agogen-uni-tables: utilize 'assert'
Daiki Ueno [Thu, 13 Nov 2014 06:56:01 +0000 (15:56 +0900)]
gen-uni-tables: utilize 'assert'

* lib/gen-uni-tables.c: Include <assert.h>.
(output_category, output_combclass, output_decimal_digit_test)
(output_decimal_digit, output_digit_test, output_digit)
(output_numeric, get_mirror_value, fill_properties)
(fill_property30, is_property_alphabetic)
(is_property_default_ignorable_code_point)
(is_property_uppercase, is_property_lowercase)
(is_property_cased, is_property_case_ignorable)
(is_property_changes_when_lowercased, is_property_iso_control)
(is_property_math, fill_arabicshaping, output_joining_group)
(fill_scripts, fill_blocks, output_lbp, fill_org_wbp)
(output_wbp, fill_org_gbp, get_decomposition)
(output_decomposition, fill_composition_exclusions)
(debug_output_composition_tables, output_composition_tables)
(redistribute_casefolding_rules, output_casing_rules): Use
'assert (EXPR);' instead of 'if (!EXPR) abort ();' for better error
reporting.

10 years agogen-uni-tables: cosmetic improvements
Daiki Ueno [Thu, 23 Oct 2014 07:05:37 +0000 (16:05 +0900)]
gen-uni-tables: cosmetic improvements

* lib/gen-uni-tables.c: Escape newlines in the Emacs file local
variables specification.
(is_outdigit): Remove unused function.

10 years agofcntl-h-tests: port to PA-RISC GNU/Linux
Jeroen Roovers [Thu, 13 Nov 2014 02:55:49 +0000 (18:55 -0800)]
fcntl-h-tests: port to PA-RISC GNU/Linux

* tests/test-fcntl-h.c (main): Check O_SYNC is different from O_DSYNC.

10 years agofts: port to C89
Paul Eggert [Mon, 10 Nov 2014 23:43:22 +0000 (15:43 -0800)]
fts: port to C89

Problem reported for MSVC 16 by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00027.html
* lib/fts.c (fts_build): Avoid declaration before statement.

10 years agounistd: port to iOS
Paul Eggert [Fri, 7 Nov 2014 04:33:02 +0000 (20:33 -0800)]
unistd: port to iOS

Problem reported by André Klitzing in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00013.html
* lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.

10 years agoobstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
Paul Eggert [Wed, 5 Nov 2014 19:41:57 +0000 (11:41 -0800)]
obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun

Problem reported by Alan Modra in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00007.html
* lib/obstack.h (obstack_chunkfun, obstack_freefun):
Always cast the function arg, reverting this part of the previous
change.

10 years agoautoupdate
Karl Berry [Wed, 5 Nov 2014 14:01:18 +0000 (06:01 -0800)]
autoupdate

10 years agoupdate from texinfo
Karl Berry [Tue, 4 Nov 2014 18:01:31 +0000 (10:01 -0800)]
update from texinfo

10 years agoobstack: avoid potentially-nonportable function casts
Paul Eggert [Tue, 4 Nov 2014 08:31:31 +0000 (00:31 -0800)]
obstack: avoid potentially-nonportable function casts

* lib/obstack.c (CALL_CHUNKFUN, CALL_FREEFUN):
Remove, replacing with ...
(call_chunkfun, call_freefun): New static functions.
All uses changed.  Avoid potentially-nonportable casts.
(chunkfun_type, freefun_type): Remove typedefs; no longer used.
(_obstack_begin_worker): Omit last two args, since they
rely on potentially-nonportable casts.  All callers changed.
* lib/obstack.h (_OBSTACK_CAST): New macro.
Use it everywhere the old API used a potentially-nonportable cast.
The new API doesn't cast.
(struct obstack): Use unions rather than requiring
potentially-nonportable casts.
(obstack_chunkfun, obstack_freefun): Return void.

10 years agoobstack: fix macro return values
Alan Modra [Tue, 4 Nov 2014 01:32:27 +0000 (17:32 -0800)]
obstack: fix macro return values

* lib/obstack.h (obstack_next_free): Return void *.
(obstack_1grow_fast, obstack_blank_fast): Return void.
For __GNUC__ macros:
(obstack_1grow, obstack_blank): Remove now unnecessary (void) 0.
For !__GNUC__ macros:
(obstack_make_room, obstack_grow, obstack_grow0)
(obstack_ptr_grow_fast, obstack_int_grow_fast): Return void.

10 years agoobstack: do not assume system-supplied obstack is size_t safe
Paul Eggert [Tue, 4 Nov 2014 00:36:27 +0000 (16:36 -0800)]
obstack: do not assume system-supplied obstack is size_t safe

* m4/obstack.m4: New file.
* modules/obstack (Files): Add it.

10 years agoobstack: port to platforms that #define __alignof__
Paul Eggert [Tue, 4 Nov 2014 00:34:52 +0000 (16:34 -0800)]
obstack: port to platforms that #define __alignof__

* lib/obstack.c: Include <alignof.h> if !defined __alignof__,
not if !_LIBC.  We don't know of any platforms that #define
__alignof__, but it might be useful in tests.  Conversely,
glibc assumes GCC.

10 years agolinkat: don't unconditionally replace on GNU/Linux
Pádraig Brady [Fri, 31 Oct 2014 18:18:36 +0000 (18:18 +0000)]
linkat: don't unconditionally replace on GNU/Linux

* m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW
was redundant for a few reasons.  It was present to support compiling
on new systems but running on the old narrow window of Linux 2.6.1[67].
It setup and cleaned up test files which weren't actually used.
On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is
implicit in the following check.

10 years agolinkat: wrap to handle symlinks on OS X 10.10
Pádraig Brady [Fri, 31 Oct 2014 18:12:15 +0000 (18:12 +0000)]
linkat: wrap to handle symlinks on OS X 10.10

* m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite
but not usable because it doesn't support creating hardlinks
to symlinks.  Therefore add a generic test for this capability
and fallback to our emulation if linkat() fails with ENOTSUP.

10 years agoopen, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
Paul Eggert [Mon, 3 Nov 2014 06:24:09 +0000 (22:24 -0800)]
open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno

* doc/posix-functions/open.texi (open):
* doc/posix-functions/openat.texi (openat):
Document that these functions do not set errno to ELOOP when
a symlink is opened with O_NOFOLLOW.

10 years agoobstack: add NEWS entry for recent incompatible changes
Paul Eggert [Fri, 31 Oct 2014 19:45:22 +0000 (12:45 -0700)]
obstack: add NEWS entry for recent incompatible changes

* NEWS: Describe recent changes.

10 years agomountlist: don't use libmount to decide on dummy/remote
Pádraig Brady [Thu, 30 Oct 2014 04:08:50 +0000 (04:08 +0000)]
mountlist: don't use libmount to decide on dummy/remote

* lib/mountlist.c (read_file_system_list): Don't use the libmount
routines to determine whether a file system is dummy or remote,
as they're not currently compatible.  For example the remoteness
is determined on file system type (for which the list seems incomplete),
rather than simply checking for a ':' in the device name.
Also libmount currently determines that 'tmpfs' is a dummy file system
even though it has associated storage.

10 years agomaint: add missing ChangeLog entries for Modra's obstack changes
Paul Eggert [Thu, 30 Oct 2014 01:03:53 +0000 (18:03 -0700)]
maint: add missing ChangeLog entries for Modra's obstack changes

See: http://lists.gnu.org/archive/html/bug-gnulib/2014-10/msg00072.html

10 years agoobstack: prefer __alignof__ to alignof
Paul Eggert [Wed, 29 Oct 2014 23:15:41 +0000 (16:15 -0700)]
obstack: prefer __alignof__ to alignof

This is for portability to pre-4.7 GCC when compiling glibc.
See Joseph S. Myers in:
http://sourceware.org/ml/libc-alpha/2014-10/msg00703.html
* lib/obstack.c (__alignof__) [!_LIBC && !__GNUC__]:
New macro, defined by including and using <alignof.h>.
(MAX): New macro.
(DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Redefine in terms of these.
Do not use enums as they are not portable to some broken compilers.
* modules/obstack (Depends-on): Depend on alignof, not stdalign.

10 years agoobstack: prefer alignof to calculating alignments by hand
Paul Eggert [Wed, 29 Oct 2014 07:22:08 +0000 (00:22 -0700)]
obstack: prefer alignof to calculating alignments by hand

* lib/obstack.c: Include <stdalign.h>.
(struct fooalign): Remove.
(DEFAULT_ALIGNMENT): Use alignof rather than the old offsetof hack.
* modules/obstack (Depends-on): Add stdalign.

10 years agoobstack: use size_t alignments and check for overflow
Paul Eggert [Wed, 29 Oct 2014 06:58:42 +0000 (23:58 -0700)]
obstack: use size_t alignments and check for overflow

* lib/obstack.c, lib/obstack.h (_obstack_begin, _obstack_begin_1):
* lib/obstack.c (_obstack_begin_worker, _obstack_newchunk):
* lib/obstack.h (struct obstack.alignment_mask):
Use _OBSTACK_SIZE_T, not int, for alignments.
* lib/obstack.c (_obstack_newchunk): Fail if the size calculation
overflows, e.g., when adding the alignment.

10 years agoobstack: 64-bit obstack support, part 3
Alan Modra [Wed, 29 Oct 2014 03:33:00 +0000 (14:03 +1030)]
obstack: 64-bit obstack support, part 3

This finally enables full 64-bit obstack support.  The glibc shared library
specific code is removed from obstack.c too, and the error handling code
conditionally compiled under control of another macro,
_OBSTACK_NO_ERROR_HANDLER.

* lib/obstack.h: Include string.h earlier.
(_OBSTACK_INTERFACE_VERSION): Define.
(_OBSTACK_SIZE_T, _CHUNK_SIZE_T): Define as size_t for version 2.
* lib/obstack.c: Don't include shlib-compat.h.
(OBSTACK_INTERFACE_VERSION): Delete.
(_OBSTACK_ELIDE_CODE): Rename from ELIDE_CODE.  Define when version 1
glibc code is compatible with version 2.  Don't include stdio.h for
__GNU_LIBRARY.
(obstack_exit_failure, print_and_abort, obstack_alloc_failed_handler):
Omit when _OBSTACK_NO_ERROR_HANDLER defined.  Include stdio.h here.
(_obstack_compat, _obstack, _obstack_newchunk, obstack_free): Delete
glibc shared library specific source.

10 years agoobstack: 64-bit obstack support, part 2
Alan Modra [Wed, 29 Oct 2014 03:32:40 +0000 (14:02 +1030)]
obstack: 64-bit obstack support, part 2

This gets us 4G obstack support, without changing ABI compatibility,
apart from possibly introducing some signed/unsigned comparison
warnings in code that uses obstack.h.

a) Replace "int" size parameters, return values, and macro local vars
   with _OBSTACK_SIZE_T, an "unsigned int" for now.
b) Make obstack.chunk_size a _CHUNK_SIZE_T, an "unsigned long" for now.
c) Make all obstack macros checking available room use obstack_room.
   "next_free + desired > chunk_limit" may wrap the lhs for chunks
   allocated near the top of memory.
d) Use unsigned comparisons, and macro locals to support >2G on 32-bit.

* lib/obstack.h (_OBSTACK_SIZE_T): Define.  Use throughout
in place of "int" size parameters, return values and local vars.
(_CHUNK_SIZE_T): Define.
(struct obstack): Make chunk_size a _CHUNK_SIZE_T.  Make temp
union use an _OBSTACK_SIZE_T integer type.
For __GNUC__ versions of the following macros...
(obstack_room): Rename local var.
(obstack_make_room): Use obstack_room.
(obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
obstack_int_grow, obstack_blank): Likewise.
(obstack_finish): Use unsigned comparison when comparing aligned
next_free against chunk_limit.
(obstack_free): Cast OBJ to remove possible const qualifier.
For !__GNUC__ versions of the following macros...
(obstack_make_room): Use obstack_room.
(obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
obstack_int_grow, obstack_blank): Likewise.
(obstack_finish): Use unsigned comparision when comparing aligned
next_free against chunk_limit.
(obstack_free): Use temp.p and same comparisons as __GNUC__ version.
* lib/obstack.c (_obstack_begin_worker): Make "size" parameter
_OBSTACK_SIZE_T.
(_obstack_begin, _obstack_begin_1): Likewise.
(_obstack_newchunk): Likewise for length parameter.  Use size_t locals.
(_obstack_memory_used): Return and use _OBSTACK_SIZE_T local.

10 years agoobstack: 64-bit obstack support, part 1
Alan Modra [Wed, 29 Oct 2014 03:32:31 +0000 (14:02 +1030)]
obstack: 64-bit obstack support, part 1

a) Correct calls to alloc function, to use a size_t arg.  "long" is
   just wrong on targets like x86_64-mingw64 where "long" is 32 bits
   and "size_t" 64 bits.
b) Consolidate _obstack_begin and _obstack_begin1 code.

* lib/obstack.h (struct obstack <chunkfun>): Correct prototype to
use "size_t" rather than "long".
(_obstack_begin, _obstack_begin1): Likewise.
(obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
obstack_chunkfun): Update alloc function casts.
* lib/obstack.c (CALL_CHUNKFUN): Update chunkfun cast.
(chunkfun_type, freefun_type): New typdefs.
(_obstack_begin_worker): Split out from ..
(_obstack_begin, _obstack_begin_1): ..here.

10 years agoobstack: tidy part 2
Alan Modra [Wed, 29 Oct 2014 03:32:22 +0000 (14:02 +1030)]
obstack: tidy part 2

a) Don't be concerned about "not polluting the namespace with stddef.h
   symbols" in obstack.h, since gnulib string.h includes stddef.h
   anyway, and it seems unlikely that anyone would care.
b) Don't roll our own slow memcpy in _obstack_newchunk.
c) Rename obstack_free to _obstack_free.  This makes the naming
   consistent with other obstack functions and obviates the need for
   __obstack_free.  Ancient obstack.c defined both obstack_free and
   _obstack_free.  We continue to do that for _LIBC via an alias.
d) Miscellaneous macro fixes.  The expression used to test for gcc-2.8
   is clever, but nowadays gcc warns on undefined macros.  You'll get
   an undefined macro warning if simulating an old gcc with -U__GNUC__
   -U__GNUC_MINOR__ -D__GNUC__=1.

* lib/obstack.h: Include stddef.h unconditionally.  Formatting fixes.
(PTR_INT_TYPE): Delete, replace with ptrdiff_t.
(__obstack_free): Delete, update refs.
(_obstack_free): Rename from obstack_free.
(__extension__): Avoid undefined macro warning for __GNUC_MINOR__.
(obstack_object_size, obstack_room): Parenthesise !__GNUC__ versions.
* lib/obstack.c: Don't include stddef.h.
(COPYING_UNIT): Delete.
(_obstack_begin): Formatting fix.
(_obstack_newchunk): Use memcpy to move existing object to new chunk.
(_obstack_free): Rename from __obstack_free, update alias.  Move
undef of obstack_free to where it is needed.

10 years agoobstack: tidy part 1
Alan Modra [Wed, 29 Oct 2014 03:32:13 +0000 (14:02 +1030)]
obstack: tidy part 1

a) Rename temp fields.  temp.tempint and temp.tempptr just looks ugly
   to me, and result in overlong lines after later patches.
b) Move error handling code, to avoid a forward declaration and to
   simplify later patches in this series.

* lib/obstack.h (struct obstack <temp>): Rename fields of union
and update all uses.
* lib/obstack.c: Include stdlib.h earlier.
(obstack_exit_failure, obstack_alloc_failed_handler): Move later
in file.
(print_and_abort): Remove now redundant forward declaration.

10 years agosocketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.
Paul Eggert [Fri, 24 Oct 2014 17:47:44 +0000 (10:47 -0700)]
socketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.

Without this change, in bleeding-edge fileutils Autoconf complains
that gl_SOCKETLIB etc. are AC_REQUIREd after being invoked.
* modules/socketlib (configure.ac): AC_REQUIRE gl_SOCKETLIB.
* modules/sockets (configure.ac): AC_REQUIRE gl_SOCKETS.
* modules/sys_socket (configure.ac): AC_REQUIRE gl_HEADER_SYS_SOCKET.

10 years agoiconv: avoid false detection of non-working iconv
Daiki Ueno [Tue, 21 Oct 2014 09:07:00 +0000 (18:07 +0900)]
iconv: avoid false detection of non-working iconv

The INBUF arguments of iconv can be either 'const char **'
or 'char **'.  If CC is g++, the difference causes a compile error
and thus leads to a false detection of non-working iconv.
Reported by Eli Zaretskii and Werner LEMBERG in:
<https://lists.gnu.org/archive/html/bug-gnulib/2014-10/msg00023.html>.
* m4/iconv.m4 (AM_ICONV_LINK): Try all possible argument types of
iconv.  Bump serial number.

10 years agobootstrap: print more diagnostics for missing programs
Pádraig Brady [Thu, 23 Oct 2014 12:59:08 +0000 (13:59 +0100)]
bootstrap: print more diagnostics for missing programs

* build-aux/bootstrap: only suppress stderr when checking for
alternative program names.  This supports programs issuing non
standard error messages like:
  "Provide an AUTOMAKE_VERSION environment variable, please"
Reported by Ingo Schwarze with OpenBSD

10 years agobootstrap: only update the gnulib submodule
Pádraig Brady [Thu, 23 Oct 2014 12:26:23 +0000 (13:26 +0100)]
bootstrap: only update the gnulib submodule

* build-aux/bootstrap: Restrict the "submodule update" command
to the gnulib path.

Reported by Reuben Thomas

10 years agosymlinkat: port to AIX 7.1
Paul Eggert [Sun, 19 Oct 2014 06:22:36 +0000 (23:22 -0700)]
symlinkat: port to AIX 7.1

* doc/posix-functions/symlinkat.texi (symlinkat):
Mention AIX porting problem.
* lib/symlinkat.c: Always include errno.h.
(rpl_symlinkat) [HAVE_SYMLINKAT]: New function.
* lib/unistd.in.h (symlinkat): Add replacement machinery.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Check symlinkat behavior.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_SYMLINKAT.
* modules/symlinkat (Depends-on): Add fstatat if REPLACE_SYMLINKAT.
(configure.ac): Also compile replacement if REPLACE_SYMLINKAT.
* modules/unistd (unistd.h): Substitute REPLACE_SYMLINKAT.