8 years agofix license quoting in files.yaml master debian/20140202+stable-2
Ian Beckwith [Mon, 3 Mar 2014 12:31:08 +0000 (12:31 +0000)]
fix license quoting in files.yaml

8 years agodocbase: fix info filename; don't remove doc/updated-stamp
Ian Beckwith [Sun, 2 Mar 2014 23:25:02 +0000 (23:25 +0000)]
docbase: fix info filename; don't remove doc/updated-stamp

8 years agostop installing duplicate docs; tweak installed files; Add info manual to doc-base
Ian Beckwith [Sun, 2 Mar 2014 23:09:13 +0000 (23:09 +0000)]
stop installing duplicate docs; tweak installed files; Add info manual to doc-base

8 years agofixup git-merge-changelog package
Ian Beckwith [Sun, 2 Mar 2014 21:59:20 +0000 (21:59 +0000)]
fixup git-merge-changelog package

8 years agotweak git-merge-changelog README
Ian Beckwith [Sun, 2 Mar 2014 11:15:57 +0000 (11:15 +0000)]
tweak git-merge-changelog README

8 years agoadd README header from git-merge-changelog.c as README file
Ian Beckwith [Sun, 2 Mar 2014 11:13:34 +0000 (11:13 +0000)]
add README header from git-merge-changelog.c as README file

8 years agoApply git-merge-changelog packaging patches from Samuel Bronson
Ian Beckwith [Sat, 1 Mar 2014 21:07:46 +0000 (21:07 +0000)]
Apply git-merge-changelog packaging patches from Samuel Bronson

8 years agomore lintian override tweaks debian/20140202+stable-1
Ian Beckwith [Sun, 16 Feb 2014 20:55:35 +0000 (20:55 +0000)]
more lintian override tweaks

8 years agotweak lintian overrides
Ian Beckwith [Sun, 16 Feb 2014 12:45:59 +0000 (12:45 +0000)]
tweak lintian overrides

8 years agostandards-version: 3.9.5
Ian Beckwith [Sun, 16 Feb 2014 12:23:50 +0000 (12:23 +0000)]
standards-version: 3.9.5

8 years agofixup debian/copyright to the point it passes lintian
Ian Beckwith [Sun, 16 Feb 2014 12:06:54 +0000 (12:06 +0000)]
fixup debian/copyright to the point it passes lintian

8 years agodebian/copyright updates; clscan: fix formatting
Ian Beckwith [Sat, 15 Feb 2014 18:52:33 +0000 (18:52 +0000)]
debian/copyright updates; clscan: fix formatting

8 years agoupdate debian/changelog
Ian Beckwith [Mon, 3 Feb 2014 01:04:15 +0000 (01:04 +0000)]
update debian/changelog

8 years agofix gnulib-tool botched merge
Ian Beckwith [Mon, 3 Feb 2014 01:03:03 +0000 (01:03 +0000)]
fix gnulib-tool botched merge

8 years agoMerge branch 'stable'
Ian Beckwith [Mon, 3 Feb 2014 00:57:26 +0000 (00:57 +0000)]
Merge branch 'stable'

8 years agofinalise NEWS.stable stable stable/20140202
Ian Beckwith [Mon, 3 Feb 2014 00:48:46 +0000 (00:48 +0000)]
finalise NEWS.stable

8 years agoNEWS.stable: log cherry-pick [497f4cd]->[8c28db1] autoupdate
Ian Beckwith [Mon, 3 Feb 2014 00:46:11 +0000 (00:46 +0000)]
NEWS.stable: log cherry-pick [497f4cd]->[8c28db1] autoupdate

8 years agoautoupdate
Karl Berry [Sat, 25 Jan 2014 14:40:43 +0000 (06:40 -0800)]
(cherry picked from commit 497f4cdf8d4ef8c73059e68030c824949ae32649)

8 years agoNEWS.stable: update
Ian Beckwith [Mon, 3 Feb 2014 00:44:17 +0000 (00:44 +0000)]
NEWS.stable: update

8 years agoqacl: check for fchmod
Paul Eggert [Thu, 23 Jan 2014 02:40:47 +0000 (18:40 -0800)]
qacl: check for fchmod

* m4/acl.m4 (gl_FUNC_ACL): Check for fchmod, since acl-internal.h
and qset-acl.c both use HAVE_FCHMOD.
(cherry picked from commit 751494621c1d38c012a170d5eb557637ae9179f2)

8 years agoNEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
Ian Beckwith [Mon, 3 Feb 2014 00:34:33 +0000 (00:34 +0000)]
NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested usage in maintainer documentation.

8 years agorelocatable-shell: Update suggested usage in maintainer documentation.
Ben Pfaff [Thu, 9 Jan 2014 06:15:21 +0000 (22:15 -0800)]
relocatable-shell: Update suggested usage in maintainer documentation.

Instead of suggesting an inline usage of "sed", that would have to be
cut-and-pasted for every directory to be relocated, suggest a shell

Make the example obviously an example, whereas previously it looked like
it might be literal text.

Thanks to Reuben Thomas <> for pointing out these issues.  See for
further context.
(cherry picked from commit e446f257e29da65d94ec2d944e08a62b5690d99b)

8 years agoNEWS.stable: update
Ian Beckwith [Mon, 3 Feb 2014 00:27:35 +0000 (00:27 +0000)]
NEWS.stable: update

8 years agoinclude_next: port to autoconf 2.63
Eric Blake [Mon, 6 Jan 2014 17:20:59 +0000 (10:20 -0700)]
include_next: port to autoconf 2.63

On RHEL 6.4 (using autoconf 2.63), './gnulib-tool --test math'
fails with the following, since commit 74540d44:
executing autoconf
configure:5693: error: possibly undefined macro: AS_VAR_COPY
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

Since we document that we support out-of-the-box use with autoconf
2.59 and later, the fix is to provide a fallback definition.

* m4/gnulib-common.m4 (AS_VAR_COPY): Define if missing.

Signed-off-by: Eric Blake <>
(cherry picked from commit 580240a85bd8ec3e8b2d2379badfc13d7fe1d8e7)

8 years agoNEWS.stable: log cherry-pick [fe3419d]->[cd56634] doc: use ASCII in .texi files where...
Ian Beckwith [Mon, 3 Feb 2014 00:09:48 +0000 (00:09 +0000)]
NEWS.stable: log cherry-pick [fe3419d]->[cd56634] doc: use ASCII in .texi files where UTF-8 isn't needed

8 years agodoc: use ASCII in .texi files where UTF-8 isn't needed
Paul Eggert [Fri, 3 Jan 2014 19:18:07 +0000 (11:18 -0800)]
doc: use ASCII in .texi files where UTF-8 isn't needed

* doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
* doc/posix-functions/setkey.texi, doc/regex.texi:
Use ASCII input, not UTF-8.
(cherry picked from commit fe3419dc7ec3ae91c9c4808cbc48f6477b2cfca9)

8 years agomanywarnings: remove -Wmudflap
Jim Meyering [Fri, 3 Jan 2014 00:55:04 +0000 (16:55 -0800)]
manywarnings: remove -Wmudflap

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since
it is no longer supported in gcc-4.9-to-be.
(cherry picked from commit 5088dc55f4209d1ce4763726418834c7366819ec)

8 years agoNEWS.stable: log cherry-pick [cfe23e8]->[79ca097] autoupdate
Ian Beckwith [Mon, 3 Feb 2014 00:06:14 +0000 (00:06 +0000)]
NEWS.stable: log cherry-pick [cfe23e8]->[79ca097] autoupdate

8 years agoautoupdate
Karl Berry [Thu, 2 Jan 2014 13:27:21 +0000 (05:27 -0800)]
(cherry picked from commit cfe23e81eb50e13417b1e2818314c50eb33088bb)

8 years agoNEWS.stable: log cherry-pick [7a0c729]->[d78c62e] maint: fix public-submodule-commit...
Ian Beckwith [Sun, 2 Feb 2014 23:59:11 +0000 (23:59 +0000)]
NEWS.stable: log cherry-pick [7a0c729]->[d78c62e] maint: fix public-submodule-commit to work with newer git

8 years agomaint: fix public-submodule-commit to work with newer git
Jim Meyering [Thu, 2 Jan 2014 04:25:44 +0000 (20:25 -0800)]
maint: fix public-submodule-commit to work with newer git

* top/ (public-submodule-commit): Remove excess quoting.
We were over-quoting the test arguments, and somewhere prior to
version, git stopped removing those excess quotes,
which made the test fail, since the unexpanded strings would
always differ; using GIT_TRACE=1 confirmed that the git merge-base
command wasn't even being run.
(cherry picked from commit 7a0c729aacc3716a665ce3b0c8cb34843bdecc75)

8 years agoMerge tag 'snapshot-start' into stable
Ian Beckwith [Sun, 2 Feb 2014 23:54:29 +0000 (23:54 +0000)]
Merge tag 'snapshot-start' into stable

snapshot-start is currently a39d4083cab589d7cd6a13e8a4b8db8875261d75

8 years agoupdate copyright for 2014 year bump
Ian Beckwith [Sun, 2 Feb 2014 23:44:53 +0000 (23:44 +0000)]
update copyright for 2014 year bump

8 years agoMerge commit 'a39d4083cab589d7cd6a13e8a4b8db8875261d75'
Ian Beckwith [Sun, 2 Feb 2014 22:32:35 +0000 (22:32 +0000)]
Merge commit 'a39d4083cab589d7cd6a13e8a4b8db8875261d75'

8 years agoupdate debian/copyright for copyright changes up to year bump
Ian Beckwith [Sun, 2 Feb 2014 22:27:52 +0000 (22:27 +0000)]
update debian/copyright for copyright changes up to year bump

8 years agoMerge change up to right before new-year copyright bumping
Ian Beckwith [Sun, 2 Feb 2014 20:48:41 +0000 (20:48 +0000)]
Merge change up to right before new-year copyright bumping

Merge commit 'beae0bdcf7fe30f2415c16f6b8c1368d469e519c'


8 years agoautoupdate snapshot-start
Karl Berry [Wed, 1 Jan 2014 13:19:01 +0000 (05:19 -0800)]

8 years agodoc: update main copyright year
Paul Eggert [Wed, 1 Jan 2014 07:28:25 +0000 (07:28 +0000)]
doc: update main copyright year

* doc/gnulib.texi: Update copyright date.

8 years agomaint: update copyright
Eric Blake [Wed, 1 Jan 2014 07:04:40 +0000 (00:04 -0700)]
maint: update copyright

I ran 'make update-copyright'.

Signed-off-by: Eric Blake <>
8 years agoversion-etc: new year
Eric Blake [Wed, 1 Jan 2014 07:04:18 +0000 (00:04 -0700)]
version-etc: new year

* lib/version-etc.c (COPYRIGHT_YEAR): Bump to 2014.

Signed-off-by: Eric Blake <>
8 years agoautoupdate
Karl Berry [Wed, 25 Dec 2013 14:30:36 +0000 (06:30 -0800)]

8 years agopassfd: give nicer error for recvfd at eof
Eric Blake [Tue, 24 Dec 2013 18:16:07 +0000 (11:16 -0700)]
passfd: give nicer error for recvfd at eof

I noticed that recvfd() fails with errno set to EACCES if the
other end of the socket has closed (such as if it calls _exit());
but "Permission denied" as the strerror() message doesn't read
very well.  This improves things to give the nicer message:
"Transport endpoint is not connected".

* lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early.
* tests/test-passfd.c (main): Enhance test to cover this.

Signed-off-by: Eric Blake <>
8 years agoautoupdate
Karl Berry [Wed, 18 Dec 2013 00:00:22 +0000 (16:00 -0800)]

8 years agogettimeofday: port recent C++ fix to Emacs
Paul Eggert [Tue, 17 Dec 2013 20:38:54 +0000 (12:38 -0800)]
gettimeofday: port recent C++ fix to Emacs

Without this further patch, Emacs won't build due to
the portcheck failing.  Also, this simplifies the patch a bit.
* lib/ (localtime, gmtime): Don't replace unless
GNULIB_GETTIMEOFDAY.  Treat them more like mktime.
* lib/ (localtime, gmtime):
* m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME):
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
* modules/time (time.h):
Don't worry about about the possibility of localtime and gmtime
being absent; they're present in all C libraries we know about.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
Don't assume sys_time is present and has been initialized.
Instead, use a hack that should work even if it hasn't been.
Don't use a portcheck for gmtime or localtime; this supports
the hack.
* modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.

8 years agogettimeofday: fix C++ crosscompilation
John W. Eaton [Tue, 17 Dec 2013 19:04:37 +0000 (11:04 -0800)]
gettimeofday: fix C++ crosscompilation

Never replace gmtime and localtime by macros when compiling with
C++, this prevents <ctime> from being included.

* m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not
define gmtime and localtime as preprocessor macros.  Instead
REPLACE_LOCALTIME substitutions.
* lib/ Declare gmtime and localtime when needed.
* modules/time: Depend on gettimeofday, and substitute the above
variables in time.h.

8 years agoqacl: port to Windows better
Paul Eggert [Tue, 17 Dec 2013 18:49:01 +0000 (10:49 -0800)]
qacl: port to Windows better

See Eli Zaretskii in
* lib/file-has-acl.c (acl_access_nontrivial):
Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY &&

8 years agomd5, sha1, sha256, sha512: fix compile error in c++ mode
Alexander V. Lukyanov [Thu, 12 Dec 2013 11:19:29 +0000 (11:19 +0000)]
md5, sha1, sha256, sha512: fix compile error in c++ mode

* lib/gl_openssl.h: Cast void pointers to a specific type.

8 years agoopen-tests: fix build failure with -Werror=old-style-declaration
Pádraig Brady [Mon, 9 Dec 2013 14:23:07 +0000 (14:23 +0000)]
open-tests: fix build failure with -Werror=old-style-declaration

* tests/test-open.h: Reorder the inline to avoid the issue.

8 years agomd5, sha1, sha256, sha512: fix link error with partial libcrypto
Pádraig Brady [Sun, 8 Dec 2013 23:19:29 +0000 (23:19 +0000)]
md5, sha1, sha256, sha512: fix link error with partial libcrypto

* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
init time, so that if early checks find crypto routines,
while the last does not, then @LIB_CRYPTO@ is replaced correctly,
avoiding link failures.

8 years agomd5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
Paul Eggert [Sun, 8 Dec 2013 07:43:23 +0000 (23:43 -0800)]
md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT

This provides a new way to specify the default for
gl_CRYPTO_CHECK, one that is reflected in the --help message.
Emacs uses this, as well as the old way.
This attempts to implement a suggestion by Pádraig Brady in
* m4/gl-openssl.m4(gl_SET_CRYPTO_CHECK_DEFAULT): New macro.
(gl_CRYPTO_CHECK): Use it.  Mention the default in --help output.

8 years agomd5, sha1, sha256, sha512: add 'auto', and a way to specify default
Paul Eggert [Sun, 8 Dec 2013 01:00:44 +0000 (17:00 -0800)]
md5, sha1, sha256, sha512: add 'auto', and a way to specify default

* m4/gl-openssl.m4 (gl_CRYPTO_CHECK):
Add support for a new option, --with-openssl=auto, which causes
the library to be used if available and silently ignored if not.
Add support to allow allow to specify its own
default, by setting with_openssl_default before invoking gl_INIT.

8 years agoautoupdate
Karl Berry [Fri, 6 Dec 2013 14:13:00 +0000 (06:13 -0800)]

8 years agobootstrap: warn about BSD toolchain snafu
Eric Blake [Wed, 4 Dec 2013 00:42:38 +0000 (17:42 -0700)]
bootstrap: warn about BSD toolchain snafu

With my help on IRC, Roman Bogorodskiy identified a bug where the
BSD autoconf wrapper script eats stdin[1], which in turn causes
autopoint from gettext 0.18.3 to fail to find AM_GNU_GETTEXT_VERSION
out of[2], with this error:

./bootstrap: autopoint --force
autopoint: *** Missing version: please specify in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using


The workaround would be painful to automate (because gettext
hardcodes the use of autom4te rather than honoring ${AUTOM4TE},
we'd have to create a temporary wrapper earlier in $PATH that
forwards to the real autom4te-x.yz - basically, repeating the
logic of what a wrapper script was supposed to do).  Further,
while the broken autom4te definitely hurts gettext 0.18.3, it
tends to have no issues with gettext 0.18.2; and since the
problem has been identified, it will not be long before fixed
autom4te and/or improved gettext that is not so stubborn
about using exactly 'autom4te' will be available.  Therefore,
for now we just warn about the situation.

* build-aux/bootstrap: Alert users to a broken autom4te.

Signed-off-by: Eric Blake <>
8 years agoopen-tests: port to glibc with _FORTIFY_SOURCE and -O1
Paul Eggert [Thu, 5 Dec 2013 17:22:20 +0000 (09:22 -0800)]
open-tests: port to glibc with _FORTIFY_SOURCE and -O1

Problem reported by Daiki Ueno in:
* tests/test-open.h (__always_inline):
New macro, if not already defined.
(test_open): Use it.

8 years agoinclude_next: minimize code duplication
Eric Blake [Wed, 4 Dec 2013 17:00:00 +0000 (10:00 -0700)]
include_next: minimize code duplication

I noticed some code duplication while trying to resolve a bug
originally reported by Rhys Ulerich:

* modules/include_next (Depends-on): Add absolute-header.
* m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Reuse
gl_ABSOLUTE_HEADER_ONE instead of open-coding it.

Signed-off-by: Eric Blake <>
8 years agogetcwd: fix compile error in configure check
Pádraig Brady [Wed, 4 Dec 2013 12:33:54 +0000 (12:33 +0000)]
getcwd: fix compile error in configure check

Introduced in commit ca369c8d, 2013-02-03

* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h

8 years agoregex: suppress core dumps from detection code
Pádraig Brady [Wed, 4 Dec 2013 12:11:40 +0000 (12:11 +0000)]
regex: suppress core dumps from detection code

* m4/regex.m4 (gl_REGEX): Catch the SIGABRT and convert to SIGTERM
to suppress core dumps that may well occur on glibc systems.
These core dumps might not be cleaned up automatically, or could
trigger some system core dump handling logic.

8 years agomd5, sha1, sha256, sha512: support mandating use of openssl
Pádraig Brady [Tue, 3 Dec 2013 13:53:03 +0000 (13:53 +0000)]
md5, sha1, sha256, sha512: support mandating use of openssl

* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Adjust the --with-openssl
description, to list the now 3 separate options.  Also don't
mention the default=no, since this is implicit given the option
is described as --with-openssl rather than --without-openssl.
If projects change the default they're free to document that.
With --with-openssl[=yes] we now error out when the specified
hash algorithm is not available in libcrypto.

8 years agotest-xvasprintf: disable some -Wformat-security diagnostics
Ivailo [Tue, 3 Dec 2013 14:20:22 +0000 (14:20 +0000)]
test-xvasprintf: disable some -Wformat-security diagnostics

* tests/test-xvasprintf.c: Disable -Wformat-zero-length and
-Wformat-nonliteral checks, as these edge cases are part of the test.

8 years agoregex: avoid glibc deadlock during configure
Eric Blake [Tue, 3 Dec 2013 17:34:13 +0000 (10:34 -0700)]
regex: avoid glibc deadlock during configure

glibc has a known bug where certain corruptions of the heap can
cause malloc to default to printing a debug message that includes
a backtrace, but the act of getting the backtrace uses dlopen
which in turn calls into malloc, causing a recursive lock ending
in deadlock.  Thus, when configure is probing for a known glibc
heap corruption bug, the overall configure would hang.

The solution suggested by glibc developers is to force malloc
to quit printing debug messages, which avoids recursive malloc.

* m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when
glibc bug 15078 in turn triggers bug 16159.
Reported by Michal Privoznik.

Signed-off-by: Eric Blake <>
8 years agomd5, sha1, sha256, sha512: use openssl routines if available
Pádraig Brady [Sat, 30 Nov 2013 05:19:32 +0000 (05:19 +0000)]
md5, sha1, sha256, sha512: use openssl routines if available

--with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256
routines will be used if available, requiring apps to link @LIB_CRYPTO@

* lib/gl_openssl.h: Provide wrappers for specified openssl hash.
* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto
in the standard system location.
* m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1.
* m4/sha256.m4: Likewise with SHA256.
* m4/sha512.m4: Likewise with SHA512.
* m4/md5.m4: Likewise with MD5.
* m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests.
* lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1.
* lib/sha256.h: Likewise with SHA256.
* lib/sha512.h: Likewise with SHA512.
* lib/md5.h: Likewise with MD5.
* lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1.
* lib/sha256.c: Likewise with SHA256.
* lib/sha512.c: Likewise with SHA512.
* lib/md5.c: Likewise with MD5.
* modules/crypto/sha1 (Link:): Add the new optional lib.
(Depends-on:): Add dependency on extern-inline.
* modules/crypto/sha256: Likewise.
* modules/crypto/sha512: Likewise.
* modules/crypto/md5: Likewise.
* modules/crypto/sha1-tests: Reference the lib here too.
* modules/crypto/md5-tests: Likewise.
* modules/crypto/gc-des-tests: Likewise.
* modules/crypto/gc-hmac-md5-tests: Likewise.
* modules/crypto/gc-hmac-sha1-tests: Likewise.
* modules/crypto/gc-hmac-sha256-tests: Likewise.
* modules/crypto/gc-hmac-sha512-tests: Likewise.
* modules/crypto/gc-md5-tests: Likewise.
* modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
* modules/crypto/gc-sha1-tests: Likewise.
* modules/crypto/gc-tests: Likewise.
* modules/crypto/hmac-md5-tests: Likewise.
* modules/crypto/hmac-sha1-tests: Likewise.
* modules/crypto/hmac-sha256-tests: Likewise.
* modules/crypto/hmac-sha512-tests: Likewise.

8 years agobase64: fix recent compilation regression on some compilers
RV971 [Fri, 29 Nov 2013 15:35:33 +0000 (15:35 +0000)]
base64: fix recent compilation regression on some compilers

This fixes a compile failure with
  "Sun C 5.8 Patch 121015-05 2007/08/01"
which returns:
  "base64.c", line 99: void function cannot return value

* lib/base64.c: Don't return the void function,
instead split to a separate return statement.

8 years agoautoupdate
Karl Berry [Thu, 28 Nov 2013 22:39:26 +0000 (14:39 -0800)]

8 years agoautoupdate
Karl Berry [Thu, 28 Nov 2013 16:46:55 +0000 (08:46 -0800)]

8 years agoignore-value: revert previous code change
Paul Eggert [Thu, 28 Nov 2013 08:46:06 +0000 (00:46 -0800)]
ignore-value: revert previous code change

* lib/ignore-value.h (ignore_value): Use __extension__ and
__typeof__ only for GCC 3.4 and later.  Reported by Eric Blake in
Change the comment to try to explain this better.

8 years agoselinux-h: improve stub types and add more stub functions
Pádraig Brady [Wed, 27 Nov 2013 21:53:19 +0000 (21:53 +0000)]
selinux-h: improve stub types and add more stub functions

* lib/ Change security_context_t to a typedef
rather than a define, as it's a pointer type and so is better
as a typedef to avoid issues declaring multiple variables
with the comma operator.  Also add stub for string_to_security_class().
* lib/ Add stub functions for

8 years agoignore-value: prefer GCC version back through 2.0
Paul Eggert [Wed, 27 Nov 2013 22:52:17 +0000 (14:52 -0800)]
ignore-value: prefer GCC version back through 2.0

The code didn't match the comments, so I did a bit of software
archaeology.  GCC 2.0 seems to support __extension__ and
__typeof__, so fix both code and comments to use 2.0.
* lib/ignore-value.h (ignore_value): Use __extension__ and
__typeof__ for GCC 2.0 through 3.3, too.

8 years agopty: Activate the signature wrapper of forkpty.
Mats Erik Andersson [Wed, 27 Nov 2013 15:20:43 +0000 (16:20 +0100)]
pty: Activate the signature wrapper of forkpty.

The intended preprocessor macro HAVE_FORKPTY is
never defined, yet `lib/forkpty.c' depends on it.

* m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis,
$HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.

8 years agomaint: fix permissions
Eric Blake [Wed, 27 Nov 2013 15:41:15 +0000 (08:41 -0700)]
maint: fix permissions

* build-aux/ Restore executable bit.

Signed-off-by: Eric Blake <>
8 years agoautoupdate
Karl Berry [Tue, 26 Nov 2013 13:18:07 +0000 (05:18 -0800)]

8 years agoquotearg: don't attempt to store 1 << 31 into an "int"
Jim Meyering [Tue, 19 Nov 2013 01:35:01 +0000 (17:35 -0800)]
quotearg: don't attempt to store 1 << 31 into an "int"

* lib/quotearg.c (quotearg_buffer_restyled): Building coreutils with
gcc's new -fsanitize=undefined and running its tests triggered some
new test failures due to undefined behavior, all with this diagnostic:
  lib/quotearg.c:629:62: runtime error: left shift of 1 by 31 places \
    cannot be represented in type int
Rather than shifting "1" left to form a mask, shift the bits right and
simply use "1" as the mask.
Co-authored-by: Paul Eggert <>
8 years agoerror: depend on stdio
Paul Eggert [Thu, 21 Nov 2013 20:12:45 +0000 (12:12 -0800)]
error: depend on stdio

Problem reported by Nikos Mavrogiannopoulos in
* modules/error (Depends-on): Add stdio.

8 years agodoc: Improve wording in relocatable-maint.texi.
Ben Pfaff [Tue, 19 Nov 2013 06:17:47 +0000 (22:17 -0800)]
doc: Improve wording in relocatable-maint.texi.

Reported by Reuben Thomas <>.

8 years agoFix indentation in previous patch.
Paul Eggert [Wed, 13 Nov 2013 15:55:37 +0000 (07:55 -0800)]
Fix indentation in previous patch.

8 years ago* lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:
Paul Eggert [Wed, 13 Nov 2013 15:51:40 +0000 (07:51 -0800)]
* lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:

New function and macro, to work around _DARWIN_C_SOURCE problem.
Reported by Jack Howarth in <>.

8 years agobase64: provide a fast path for encoding well sized buffers
Pádraig Brady [Mon, 11 Nov 2013 14:19:09 +0000 (14:19 +0000)]
base64: provide a fast path for encoding well sized buffers

Avoid conditionals in the base64 encoding loop,
which was seen to give a 60% throughput improvement
with the base64 utility from coreutils:

$ truncate -s100MiB
$ time base64-old -w0 < >/dev/null
real  0m0.302s
$ time base64-new -w0 < >/dev/null
real  0m0.182s

* lib/base64.c (base64_encode_fast): A new function to be called
when we don't want to NUL terminate, and we have enough space
in the output to encode the given input.
(base64_encode): Call the _fast() version when appropriate.
Also remove a redundant mask with 0x3F on the first encoded byte.

8 years agoextern-inline: port better to OS X 10.9
Paul Eggert [Fri, 8 Nov 2013 15:57:15 +0000 (07:57 -0800)]
extern-inline: port better to OS X 10.9

* m4/extern-inline.m4: Omit serial number; this file doesn't use them.
(gl_EXTERN_INLINE): Do not suppress the use of extern inline on
OS X 10.9, except for g++ where the bug is still present.
See <>.

8 years agofpending: fix typo
Eric Blake [Fri, 8 Nov 2013 15:44:02 +0000 (08:44 -0700)]
fpending: fix typo

Use correct witness macro name (reported by Paul Eggert).

* lib/fpending.h (__fpending): s/DECL_FPENDING/DECL___FPENDING/.

Signed-off-by: Eric Blake <>
8 years agofpending: fix regression on DragonFly BSD
Eric Blake [Fri, 8 Nov 2013 13:33:43 +0000 (06:33 -0700)]
fpending: fix regression on DragonFly BSD

Commit 3f5bf99e claimed that it is safe to declare __fpending twice,
but in reality this caused a regression on Dragonfly BSD.  Reported by
GW in <>,

* m4/fpending.m4 (gl_FUNC_FPENDING): Check for declaration.
* lib/fpending.h (__fpending): Don't declare twice.

Signed-off-by: Eric Blake <>
8 years agohash: relax license to LGPLv2+, for libguestfs
Jim Meyering [Tue, 5 Nov 2013 16:27:10 +0000 (08:27 -0800)]
hash: relax license to LGPLv2+, for libguestfs

* modules/hash (License): Change from GPL to LGPLv2+.

8 years agointprops: port to Oracle Studio c99
Paul Eggert [Mon, 4 Nov 2013 03:52:32 +0000 (19:52 -0800)]
intprops: port to Oracle Studio c99

* lib/intprops.h (_GL_HAVE___TYPEOF__) [__SUNPRO_C && __STDC__]:
Define to 0, to avoid diagnostics when Oracle Studio is pedantic.

8 years agoobstack: pacify HP C
Paul Eggert [Thu, 31 Oct 2013 16:44:44 +0000 (09:44 -0700)]
obstack: pacify HP C

* lib/obstack.h (obstack_free) [!__GNUC__]: Rewrite to avoid
warning "conversion from pointer to smaller integer" from HP
C-ANSI-C - cc version B9007AA/B3910B A.06.26.  It's safe to assume
C89 or later nowadays, so cast to void instead of int.  Privately
reported by H.Merijn Brand.  Also, change header to match glibc's,
to make checking against glibc easier.

8 years prefer gpgv2 over gpgv
Jim Meyering [Wed, 30 Oct 2013 05:01:44 +0000 (22:01 -0700)] prefer gpgv2 over gpgv

* top/ (gpgv): Use gpgv2 if present, else gpgv.
(gpg_key_ID): Use $(gpgv), rather than hard-coding "gpgv".
Reported by Gary Vaughan.

8 years agoisnan: port to VAX
Paul Eggert [Thu, 31 Oct 2013 03:51:39 +0000 (20:51 -0700)]
isnan: port to VAX

Reported by John Klos for NetBSD-5/VAX in
* lib/isnan.c (IEEE_FLOATING_POINT): New macro, stolen from Emacs.
(FUNC): Use it.

8 years agognulib-tool: protect against CDPATH
Jim Meyering [Mon, 28 Oct 2013 23:08:16 +0000 (16:08 -0700)]
gnulib-tool: protect against CDPATH

* gnulib-tool: Many "cd" built-in functions print a directory name
to stdout when CDPATH is set, e.g.,
  $ bash -c 'CDPATH=/; cd tmp'
Unset it, when possible.  Prompted by a comment from Bruce Korb.

8 years restore functionality removed by recent change v0.1
Jim Meyering [Mon, 28 Oct 2013 22:25:25 +0000 (15:25 -0700)] restore functionality removed by recent change

Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from
the context of a shallow-cloned gnulib repository: "git describe"
would fail in such a directory.  However, that change made it so
the reported gnulib revision no longer includes the version number
or a commit count, even when run from a full clone.
* top/ (gnulib-version): Use the full "git describe"
output when possible, e.g., the form above, rather than the
abbreviated, no-tag, no-commit-count string, and fall back to
using a 10-byte hash, rather than the default minimal-length
hash prefix, since while the minimal-length one may be fine today,
it is likely not to be unique for very long.

8 years agoRevert "error: make the module depend on vfprintf-posix"
Eric Blake [Mon, 28 Oct 2013 20:44:04 +0000 (14:44 -0600)]
Revert "error: make the module depend on vfprintf-posix"

This reverts commit 88e5b4d4641f294d8f824d770c9c55a1abe49768.

The GPL 'error' module is used by some of the gnulib testsuites;
and for some projects that use LGPL 'vasnprintf' in their lib/
directory, having 'error' depend on GPL 'vfprintf-posix' meant
that compilation breaks for those projects:

autoreconf: running: aclocal -I m4 --force -I m4
missing file gnulib/tests/vasnprintf.c error: expected source file, required through
AC_LIBSOURCES, not found
m4/gnulib-comp.m4:518: gl_INIT is expanded from... the top level
autom4te: /usr/bin/m4 failed with exit status: 1

I suspect that the problem encountered on OS/x was a warning from
gcc complaining about inconsistent use of __attribute__((__format__
__printf__)) vs. ((__format__ __gnu_printf__)); so perhaps the
real fix is to teach error.h to copy the extra care taken by
stdio.h with regards to whether merely system or full GNU printf
specifiers are being handled.  But without actually reproducing
that situation myself, the easiest action for now is to just revert
the dependency that violates the 'Comment' section of vfprintf-posix.

8 years fix "release" target to build _version
Jim Meyering [Sun, 27 Oct 2013 02:26:13 +0000 (19:26 -0700)] fix "release" target to build _version

This fixes a bug in README-release whereby following the outlined
steps, one would publish a tarball whose programs would report
--version output not consistent with the package version number.
This bug caused grep-2.15 to produce a grep program whose
--version option made it print 2.14.56-1e3d rather than 2.15.
* top/ (release): Making this target build "_version"
ensures that the new version number is reflected in configure.

8 years get current gnulib revision correctly.
Gary V. Vaughan [Sun, 27 Oct 2013 01:08:08 +0000 (14:08 +1300)] get current gnulib revision correctly.

* top/ (gnulib-version): Use git rev-parse to get the
current HEAD revision.

Signed-off-by: Gary V. Vaughan <>
8 years agoinstall-reloc: Support multi-binary installation.
Bruno Haible [Tue, 22 Oct 2013 05:48:35 +0000 (22:48 -0700)]
install-reloc: Support multi-binary installation.

* build-aux/install-reloc: Support installing multiple programs in
one invocation, as done by Automake starting with commit
4295fe33eb23f (Multi-file install for PROGRAMS.).  From Bruno
Haible <>, archived at
Reported by Sylvain <>.

8 years agoselinux-h: really build without selinux when library is missing
Michael Haubenwallner [Mon, 21 Oct 2013 19:39:15 +0000 (20:39 +0100)]
selinux-h: really build without selinux when library is missing

* m4/selinux-selinux-h.m4: When the selinux library is missing, really
continue without selinux, as already told in the warning message.

This is necessary for when the 64bit selinux development package is
installed only, but the package (tar-1.27 fex) is built as 32bit,
causing the header files to be found while the library already wasn't
found earlier.

8 years agoregex: also remove dependency on HAVE_WCSCOLL
Jim Meyering [Mon, 21 Oct 2013 21:54:30 +0000 (14:54 -0700)]
regex: also remove dependency on HAVE_WCSCOLL

* lib/regex_internal.h: Remove final vestige of the wcscoll dependency.

8 years agoxfreopen: fix typo: s/frepoen/freopen/
Reuben Thomas [Mon, 21 Oct 2013 19:42:42 +0000 (20:42 +0100)]
xfreopen: fix typo: s/frepoen/freopen/

* lib/xfreopen.c: Fix description.
* modules/xfreopen: Likewise.

8 years agoregex: don't depend on wcscoll
Jim Meyering [Mon, 21 Oct 2013 14:46:17 +0000 (07:46 -0700)]
regex: don't depend on wcscoll

* m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wcscoll.
It is no longer used.

8 years agoerror: add the printf attribute to a static function
Jim Meyering [Sun, 20 Oct 2013 18:32:58 +0000 (11:32 -0700)]
error: add the printf attribute to a static function

* lib/error.c (error_tail): Add the printf attribute, to placate
gcc's -Werror=suggest-attribute=format option.

8 years agoerror: make the module depend on vfprintf-posix
Jim Meyering [Sun, 13 Oct 2013 02:28:40 +0000 (19:28 -0700)]
error: make the module depend on vfprintf-posix

* modules/error (Depends-on): Add vfprintf-posix, since error
calls vfprintf unconditionally, via error_tail.

8 years agofpending, obstack, strerror-override: use pure+const function attrs
Jim Meyering [Mon, 30 Sep 2013 17:19:38 +0000 (10:19 -0700)]
fpending, obstack, strerror-override: use pure+const function attrs

* lib/fpending.h (__fpending): Declare with the "pure" attribute.
* lib/obstack.c (_obstack_allocated_p): Likewise.
* lib/obstack.h (_obstack_memory_used): Likewise.
(_obstack_memory_used): Likewise.
* lib/strerror-override.h (strerror_override): Declare with
the "const" attribute.

8 years agoextern-inline: make safe for -Wundef usage
Eric Blake [Fri, 18 Oct 2013 16:30:42 +0000 (10:30 -0600)]
extern-inline: make safe for -Wundef usage

Reported by Vladimir 'phcoder' Serbinenko in

* m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to older gcc.

Signed-off-by: Eric Blake <>
8 years agomkfifo-tests, etc.: allow HP-UX 11.11 bug
Paul Eggert [Wed, 16 Oct 2013 14:47:53 +0000 (07:47 -0700)]
mkfifo-tests, etc.: allow HP-UX 11.11 bug

Problem reported by Daniel Richard G. in
* doc/posix-functions/mkfifo.texi (mkfifo):
* doc/posix-functions/mkfifoat.texi (mkfifoat):
* doc/posix-functions/mknod.texi (mknod):
* doc/posix-functions/mknodat.texi (mknodat):
Document the HP-UX 11.11 bug.
* tests/test-mkfifo.h (test_mkfifo):
Allow the HP-UX 11.11 bug.

8 years agoacl: allow cross-compilation to Gentoo
Paul Eggert [Mon, 14 Oct 2013 21:25:06 +0000 (14:25 -0700)]
acl: allow cross-compilation to Gentoo

Problem reported by Gabriel Marcano in
* m4/acl.m4 (gl_ACL_GET_FILE): When cross-compiling,
test only whether it links.