gnulib.git
10 years agomaint.mk: restore functionality removed by recent change v0.1
Jim Meyering [Mon, 28 Oct 2013 22:25:25 +0000 (15:25 -0700)]
maint.mk: 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/maint.mk (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.

10 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
configure.ac:135: error: expected source file, required through
AC_LIBSOURCES, not found
m4/gnulib-comp.m4:518: gl_INIT is expanded from...
configure.ac:135: 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.

10 years agomaint.mk: fix "release" target to build _version
Jim Meyering [Sun, 27 Oct 2013 02:26:13 +0000 (19:26 -0700)]
maint.mk: 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/maint.mk (release): Making this target build "_version"
ensures that the new version number is reflected in configure.

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

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

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
10 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 <bruno@clisp.org>, archived at
http://lists.debian.org/debian-bsd/2012/05/msg00032.html.
Reported by Sylvain <beuc@gnu.org>.

10 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.

10 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.

10 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.

10 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.

10 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.

10 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.

10 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.

10 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
https://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00078.html

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

Signed-off-by: Eric Blake <eblake@redhat.com>
10 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
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00068.html>.
* 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.

10 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
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00058.html>.
* m4/acl.m4 (gl_ACL_GET_FILE): When cross-compiling,
test only whether it links.

10 years agomgetgroups: remove dependency on realloc-gnu
Paul Eggert [Mon, 14 Oct 2013 06:08:42 +0000 (23:08 -0700)]
mgetgroups: remove dependency on realloc-gnu

The dependency violates the comment in realloc-gnu, which
says that tests can't depend on realloc-gnu; some tests depend
on mgetgroups, so mgetgroups can't depend on realloc-gnu.
Problem reported by Daniel Richard G. in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00056.html>.
* lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0).
* modules/mgetgroups (Depends-on): Depend on realloc-posix,
not realloc-gnu.

10 years agoregex-tests: port to HP-UX 11.11
Paul Eggert [Sat, 12 Oct 2013 18:50:15 +0000 (11:50 -0700)]
regex-tests: port to HP-UX 11.11

Problem reported by Daniel Richard G. in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00052.html>.
* modules/regex-tests (test_regex_LDADD): Add LIBTHREAD, LIB_PTHREAD.

10 years agoverify: document some 'assume' pitfalls
Paul Eggert [Fri, 11 Oct 2013 04:30:16 +0000 (21:30 -0700)]
verify: document some 'assume' pitfalls

* doc/verify.texi (Compile-time Assertions):
Mention that 'assume (E)' can sometimes slow things down.
Use CHAR_MAX + 1, not UCHAR_MAX + 1.

10 years agostrtoumax: fix another typo in previous commit
Eric Blake [Thu, 10 Oct 2013 19:34:46 +0000 (13:34 -0600)]
strtoumax: fix another typo in previous commit

I missed one in the last commit...

* modules/strtoumax (configure.ac): Fix typo.
* modules/strtoimax (configure.ac): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agostrtoumax: fix typo in previous commit.
Eric Blake [Thu, 10 Oct 2013 18:24:59 +0000 (12:24 -0600)]
strtoumax: fix typo in previous commit.

Tom G. Christensen reported:

> I see this in the configure output:
> ./configure: line 7680: test: =: unary operator expected
>
> $ sed -n 7680p configure
>   if test $HAVE_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then

and indeed, we're only setting HAVE_DECL_STRTOUMAX.

* modules/strtoumax (Depends-on): Fix typo.
* modules/strtoimax (Depends-on): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agostrtoumax: port to Solaris 8
Paul Eggert [Thu, 10 Oct 2013 16:15:18 +0000 (09:15 -0700)]
strtoumax: port to Solaris 8

This problem was introduced in the recent HP-UX patch.
Reported by Tom G. Christensen in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00037.html>.
* modules/strtoumax (Depends-on): Test HAVE_STRTOUMAX
and REPLACE_STRTOUMAX rather than ac_cv_func_strtoumax.

10 years agoautoupdate
Karl Berry [Thu, 10 Oct 2013 16:13:26 +0000 (09:13 -0700)]
autoupdate

10 years agostrtoimax, strtoumax: port to HP-UX 11.11
Paul Eggert [Wed, 9 Oct 2013 15:05:24 +0000 (08:05 -0700)]
strtoimax, strtoumax: port to HP-UX 11.11

Problem reported by Daniel Richard G. in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00023.html>.
* lib/inttypes.in.h (strtoumax): Replace strtoumax if
REPLACE_STRTOUMAX, thus treating it consistently with strtoimax.
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Add default for
REPLACE_STRTOUMAX.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX):
* m4/strtoumax.m4 (gl_FUNC_STRTOUMAX):
Replace the function if defined as a macro but not as a function.
* modules/inttypes-incomplete (inttypes.h): Substitute
REPLACE_STRTOUMAX.
* modules/strtoumax (configure.ac): Replace strtoumax if
REPLACE_STRTOUMAX.

10 years agostrtoimax: port to HP-UX 11.11
Paul Eggert [Wed, 9 Oct 2013 06:27:49 +0000 (23:27 -0700)]
strtoimax: port to HP-UX 11.11

Problem reported by Daniel Richard G.
* lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
(strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
they might clash with inttypes.h.

10 years agoNew module 'count-trailing-zeros'.
Paul Eggert [Mon, 7 Oct 2013 06:58:00 +0000 (23:58 -0700)]
New module 'count-trailing-zeros'.

* MODULES.html.sh: Mention it.
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
* m4/count-trailing-zeros.m4, modules/count-trailing-zeros:
* modules/count-trailing-zeros-tests:
* tests/test-count-trailing-zeros.c:
New files.

10 years agocount-leading-zeros: port to MSC; support types wider than 64 bits
Paul Eggert [Mon, 7 Oct 2013 06:51:44 +0000 (23:51 -0700)]
count-leading-zeros: port to MSC; support types wider than 64 bits

The ideas behind the MSC port are stolen from Emacs.
* lib/count-leading-zeros.h:
Don't include verify.h: it's no longer needed, as types wider than
64 bits are now supported.
(COUNT_LEADING_ZEROS): New arg MSC_BUILTIN, for better
performance with MSC.  All uses changed.  Do not assume that TYPE
has at most 64 bits.
(count_leading_zeros_32): Assume 0 < X < 2**32, for speed.
All uses changed.  Fold the subtraction from 31 into the table.

10 years agocount-one-bits: port to MSC; support types wider than 64 bits
Paul Eggert [Mon, 7 Oct 2013 06:43:43 +0000 (23:43 -0700)]
count-one-bits: port to MSC; support types wider than 64 bits

The ideas behind the MSC port are stolen from Emacs.
* lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
* lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
Don't include verify.h: it's no longer needed, as types wider than
64 bits are now supported.
(COUNT_ONE_BITS_GENERIC): New macro.
(popcount_supported) [_MSC_VER]: New inline function.
(COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
performance with MSC.  All uses changed.  Do not assume that TYPE
has at most 64 bits.
* modules/count-one-bits (Depends-on): Do not depend on 'verify'.

10 years agomountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
Andrew Borodin [Sun, 6 Oct 2013 14:28:17 +0000 (18:28 +0400)]
mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS

* lib/mountlist.c (read_file_system_list): fix leak of directory
streams in case of #ifdef MOUNTED_INTERIX_STATVFS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
10 years agotests: improve diagnostic when an assertion fails
Paul Eggert [Sun, 6 Oct 2013 21:10:29 +0000 (14:10 -0700)]
tests: improve diagnostic when an assertion fails

* tests/macros.h (ASSERT): Report the assertion that failed.

10 years agoverify: new macro 'assume'
Paul Eggert [Thu, 3 Oct 2013 04:59:38 +0000 (21:59 -0700)]
verify: new macro 'assume'

This is taken from Emacs, and should be generally useful.
* doc/verify.texi (assume): Document it.
* lib/verify.h (assume): New macro.
(__has_builtin): Expand to 0 if not defined.

10 years agoautoupdate
Karl Berry [Tue, 1 Oct 2013 14:14:32 +0000 (07:14 -0700)]
autoupdate

10 years agodup2, dup3: work around another cygwin crasher
Eric Blake [Thu, 26 Sep 2013 13:07:07 +0000 (07:07 -0600)]
dup2, dup3: work around another cygwin crasher

Cygwin 1.7.25 can crash due to an off-by-one bug on an attempt to
duplicate a file into the current RLIMIT_NOFILE soft limit, when
that limit is smaller than the hard limit.  The intent in the
cygwin code was to allow the dup and auto-increase the soft limit,
which is itself questionable (and which we work around in the
gnulib getdtablesize module); but avoiding the crash is worth
doing even if the soft limit semantics are wrong.

http://cygwin.com/ml/cygwin/2013-09/msg00397.html
http://cygwin.com/ml/cygwin-developers/2013-q3/msg00010.html

* m4/dup2.m4 (gl_FUNC_DUP2): Expose the bug.
* m4/dup3.m4 (gl_FUNC_DUP3): Likewise.
* tests/test-dup2.c (main): Likewise.
* lib/dup2.c (rpl_dup2): Use setdtablesize to avoid it.
* lib/dup3.c (dup3): Likewise.
* doc/posix-functions/dup2.texi (dup2): Document it.
* doc/glibc-functions/dup3.texi (dup3): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agogetdtablesize: work around cygwin issue
Eric Blake [Thu, 26 Sep 2013 17:26:29 +0000 (11:26 -0600)]
getdtablesize: work around cygwin issue

Cygwin 1.7.25 has a bug that even though it claims to support
RLIMIT_NOFILE inheritance, there is no enforcement of the soft
limit, and getdtablesize() automatically grows until it reaches
the hard limit which cannot be changed by setrlimit().  Best is
to just treat things as an invariant limit, as several other
modules assume that getdtablesize() will not change without an
intervening setrlimit().

* m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
* modules/getdtablesize (configure.ac): Build replacement.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
* modules/unistd (Makefile.am): Expose the witness.
* lib/unistd.in.h (getdtablesize): Declare replacement.
* lib/getdtablesize.c (rpl_getdtablesize): Work around it.
* tests/test-getdtablesize.c (main): Test it.
* doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agopmccabe2html: escaping of special characters
Mats Erik Andersson [Wed, 25 Sep 2013 20:27:03 +0000 (22:27 +0200)]
pmccabe2html: escaping of special characters

The C code characters '<', '>', and '&' were improperly
escaped in HTML output, and their multiplicity was ignored.

10 years agomanywarnings: enable nicer gcc warning messages
Eric Blake [Tue, 24 Sep 2013 12:33:40 +0000 (06:33 -0600)]
manywarnings: enable nicer gcc warning messages

With gcc 4.3.4, -Wdisabled-optimization is noisy unless you also
use -funit-at-a-time.

With gcc 4.4.7, there is no indication which warning option
triggered a particular message unless you also use
-fdiagnostics-show-option.

Both of these options are default in newer gcc (such as 4.8.1);
but including them in the list of possible warnings makes the
experience nicer on older platforms.

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
some -f options for optimal warnings.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agotimespec: use the new TIMESPEC_RESOLUTION in a few more places
Jim Meyering [Sat, 21 Sep 2013 16:11:49 +0000 (09:11 -0700)]
timespec: use the new TIMESPEC_RESOLUTION in a few more places

* lib/timespec-add.c (timespec_add): Also replace 999999999
with TIMESPEC_RESOLUTION - 1.
* lib/timespec-sub.c (timespec_sub): Likewise.

10 years agowarnings: port --enable-gcc-warnings to Solaris Studio 12.3
Paul Eggert [Mon, 23 Sep 2013 17:16:13 +0000 (10:16 -0700)]
warnings: port --enable-gcc-warnings to Solaris Studio 12.3

Problem reported by Dagobert Michelsen via Eric Blake in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00052.html>.
* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
not AC_COMPILE_IFELSE.

10 years agoconfigmake: support new --runstatedir option
Eric Blake [Thu, 12 Sep 2013 22:23:31 +0000 (16:23 -0600)]
configmake: support new --runstatedir option

http://lwn.net/Articles/436012/ documents that many distros
are now preferring to use /run rather than /var/run for
storage of pid files and other per-process temporary files
that must not be cleaned out during arbitrary TMPDIR sweeps.
As such, the GNU Coding Standards were recently changed to
recommend a new configure option to make it easy to choose
this directory at configure time, and autoconf 2.70 will
support the new directory by default.  This patch adds support
for propagating results of the new option (for new enough
autotools) or providing a sane default (for older autotools)
into C code.

* m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir
even if autoconf was too old to provide the command line option.
* modules/configmake (Makefile.am): Propagate it to .h file.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoctype, string: depend on extern-inline
Paul Eggert [Mon, 23 Sep 2013 04:25:25 +0000 (21:25 -0700)]
ctype, string: depend on extern-inline

This is needed to complete the recent OS X fixes.
Also, fix related documentation as suggested by Eric Blake.
* doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
* doc/posix-functions/isascii.texi, doc/posix-functions/iscntrl.texi:
* doc/posix-functions/isdigit.texi, doc/posix-functions/isgraph.texi:
* doc/posix-functions/islower.texi, doc/posix-functions/isprint.texi:
* doc/posix-functions/ispunct.texi, doc/posix-functions/isspace.texi:
* doc/posix-functions/isupper.texi, doc/posix-functions/isxdigit.texi:
* doc/posix-functions/toascii.texi, doc/posix-functions/tolower.texi:
* doc/posix-functions/toupper.texi:
List the 'ctype' gnulib module.
* doc/posix-functions/strcat.texi, doc/posix-functions/strcpy.texi:
* doc/posix-functions/strncpy.texi:
List the 'string' gnulib module.
* modules/memcpy, modules/memmove, modules/memset (Depends-on):
Add string.
* modules/ctype, modules/string (Depends-on): Add extern-inline.

10 years agouserspec: support optional parameters to parse_user_spec()
Pádraig Brady [Fri, 20 Sep 2013 02:51:27 +0000 (03:51 +0100)]
userspec: support optional parameters to parse_user_spec()

* lib/userspec.c (parse_user_spec): If the GID param is NULL,
then avoid group processing and treat the full spec as a user.
(parse_with_separator): Allow the USERNAME and GROUPNAME to
be optional params (NULL), in which case they're ignored.
* tests/test-userspec.c (main): Ensure NULL params are ignored.

10 years agotimespec: new function make_timespec, and new constants
Paul Eggert [Thu, 19 Sep 2013 21:12:29 +0000 (14:12 -0700)]
timespec: new function make_timespec, and new constants

* lib/timespec.h: Incorporate recent changes on the Emacs trunk.
(TIMESPEC_RESOLUTION, LOG10_TIMESPEC_RESOLUTION): New constants.
(make_timespec): New function.
* lib/dtotimespec.c (dtotimespec):
* lib/timespec-add.c (timespec_add):
* lib/timespec-sub.c (timespec_sub):
* lib/utimens.c (validate_timespec):
* lib/utimensat.c (rpl_utimensat):
Use these new constants and functions.

10 years agostdio: OS X port of putc_unlocked + extern inline
Paul Eggert [Thu, 19 Sep 2013 20:25:43 +0000 (13:25 -0700)]
stdio: OS X port of putc_unlocked + extern inline

* lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
* doc/posix-functions/putc_unlocked.texi:
* doc/posix-functions/putchar_unlocked.texi:
Document this portability problem.

10 years agosignal: OS X port of sigaddset etc. + extern inline
Paul Eggert [Thu, 19 Sep 2013 20:24:03 +0000 (13:24 -0700)]
signal: OS X port of sigaddset etc. + extern inline

* lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
(sigismember): #undef on problematic Apple platforms.
* doc/posix-functions/sigaddset.texi:
* doc/posix-functions/sigdelset.texi:
* doc/posix-functions/sigemptyset.texi:
* doc/posix-functions/sigfillset.texi:
* doc/posix-functions/sigismember.texi:
Document this portability problem.

10 years agoextern-inline: do not always suppress extern inline on OS X
Paul Eggert [Thu, 19 Sep 2013 20:21:39 +0000 (13:21 -0700)]
extern-inline: do not always suppress extern inline on OS X

* m4/extern-inline.m4 (gl_EXTERN_INLINE): Suppress the use of
extern inline on Apple only if the particular compile-time
configuration is known to have the problem.
(_GL_EXTERN_INLINE_APPLE_BUG): New private macro, to implement this.
(_GL_EXTERN_LNLINE_IN_USE): New macro, intended for use by
other Gnulib modules.

10 years agoextern-inline: document fixes for ctype and wctype macros
Paul Eggert [Thu, 19 Sep 2013 19:57:18 +0000 (12:57 -0700)]
extern-inline: document fixes for ctype and wctype macros

* doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
* doc/posix-functions/isascii.texi, doc/posix-functions/isblank.texi:
* doc/posix-functions/iscntrl.texi, doc/posix-functions/isdigit.texi:
* doc/posix-functions/isgraph.texi, doc/posix-functions/islower.texi:
* doc/posix-functions/isprint.texi, doc/posix-functions/ispunct.texi:
* doc/posix-functions/isspace.texi, doc/posix-functions/isupper.texi:
* doc/posix-functions/iswalnum.texi, doc/posix-functions/iswalpha.texi:
* doc/posix-functions/iswcntrl.texi, doc/posix-functions/iswctype.texi:
* doc/posix-functions/iswdigit.texi, doc/posix-functions/iswgraph.texi:
* doc/posix-functions/iswlower.texi, doc/posix-functions/iswprint.texi:
* doc/posix-functions/iswpunct.texi, doc/posix-functions/iswspace.texi:
* doc/posix-functions/iswupper.texi, doc/posix-functions/iswxdigit.texi:
* doc/posix-functions/isxdigit.texi, doc/posix-functions/toascii.texi:
* doc/posix-functions/memcpy.texi, doc/posix-functions/memmove.texi:
* doc/posix-functions/memset.texi, doc/posix-functions/stpcpy.texi:
* doc/posix-functions/stpncpy.texi, doc/posix-functions/strcat.texi:
* doc/posix-functions/strcpy.texi, doc/posix-functions/strncat.texi:
* doc/posix-functions/strncpy.texi:
* doc/posix-functions/tolower.texi, doc/posix-functions/toupper.texi:
* doc/posix-functions/towlower.texi, doc/posix-functions/towupper.texi:
Document that Gnulib fixes portability problems with these
functions on OS X 10.8 and earlier when called from plain inline
or extern inline functions.

10 years agofflush, freadahead, fseeko: Fix for Android
Kevin Cernekee [Sat, 7 Sep 2013 03:00:38 +0000 (20:00 -0700)]
fflush, freadahead, fseeko: Fix for Android

* lib/stdio-impl.h: Use local __sfileext definition.

Suggested by Bruno Haible in:
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00306.html>

fflush, freadahead, and fseeko have trouble compiling on Android[1]
because they need access to internal elements of the FILE struct.
Bionic libc[2], like OpenBSD libc[3], puts the ungetc buffer "_ub"
at the beginning of the __sfileext struct.  Therefore we can reuse the
existing OpenBSD implementation for Android.

Test results (Android 4.2.2, ARMv7, NDK r9):

    root@android:/data/local/tmp # export srcdir=`pwd`
    root@android:/data/local/tmp # ./test-fflush2.sh ; echo $?
    0
    root@android:/data/local/tmp # ./test-freadahead.sh ; echo $?
    0
    root@android:/data/local/tmp # ./test-fseeko.sh ; echo $?
    0
    root@android:/data/local/tmp # ./test-fseeko2.sh ; echo $?
    Skipping test: ungetc cannot handle arbitrary bytes
    77
    root@android:/data/local/tmp # ./test-fseeko3.sh ; echo $?
    0
    root@android:/data/local/tmp # ./test-fseeko4.sh ; echo $?
    0

[1] http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00295.html
[2] https://android.googlesource.com/platform/bionic/+/android-4.3_r2.2/libc/stdio/fileext.h
[3] http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=1.2;content-type=text%2Fplain

10 years agopmccabe2html: fix portability issues
Mats Erik Andersson [Thu, 19 Sep 2013 17:47:29 +0000 (19:47 +0200)]
pmccabe2html: fix portability issues

Allow awk versions other than Gawk.
Correct wrong HTML tag closures.

10 years agogetgroups: statement without effect
Mats Erik Andersson [Wed, 18 Sep 2013 16:04:26 +0000 (18:04 +0200)]
getgroups: statement without effect

* lib/getgroups.c (rpl_getgroups) [HAVE_GETGROUPS]:
Change equality conditional to expected assignment.

10 years agoautoupdate
Karl Berry [Fri, 13 Sep 2013 22:25:29 +0000 (15:25 -0700)]
autoupdate

10 years agoupdate from texinfo
Karl Berry [Fri, 13 Sep 2013 14:02:33 +0000 (07:02 -0700)]
update from texinfo

10 years agoupdate from texinfo
Karl Berry [Wed, 11 Sep 2013 16:29:59 +0000 (09:29 -0700)]
update from texinfo

10 years agoglob: fix compilation
Eric Blake [Mon, 9 Sep 2013 12:23:44 +0000 (06:23 -0600)]
glob: fix compilation

Sometimes, it just isn't my day.  The previous patch missed an #endif.

* lib/glob.in.h (__THROW): Fix missing line in previous commit.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoglob: fix build for platforms without __THROW
Eric Blake [Sat, 7 Sep 2013 13:23:32 +0000 (07:23 -0600)]
glob: fix build for platforms without __THROW

The previous fix for glibc broke builds on non-glibc platforms
that don't pre-define __THROW.  Perhaps we could make the code
more optimal by using gcc attributes instead of expanding to
nothing, to match the glibc usage; but for now this fixes the
build.  Reproted by Tom G. Christensen.

* lib/glob.in.h (__THROW): Add definition again.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoautoupdate
Karl Berry [Fri, 6 Sep 2013 12:36:05 +0000 (05:36 -0700)]
autoupdate

10 years agoregex-quote: fix buffer access out of bounds
Anton Ovchinnikov [Thu, 5 Sep 2013 00:09:39 +0000 (17:09 -0700)]
regex-quote: fix buffer access out of bounds

http://lists.gnu.org/archive/html/bug-gnulib/2013-09/msg00001.html
* lib/regex-quote.c (regex_quote_spec_pcre):
Fix typo that resulted in an out-of-bounds read.

10 years agoglob: avoid -Wattribute warnings on glibc
Eric Blake [Wed, 4 Sep 2013 23:06:35 +0000 (17:06 -0600)]
glob: avoid -Wattribute warnings on glibc

Colin Watson reported that some versions of gcc warn about the use
of attribute((leaf)) on static functions, since it is documented to
have an effect only on external functions.

* lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use
__THROWNL, not __THROW, on static functions.
* lib/glob.in.h (__THROW): Adjust...
(__THROWNL): ...accordingly.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoheaders: check that _GL_INLINE_HEADER_BEGIN is defined
Paul Eggert [Thu, 29 Aug 2013 01:49:38 +0000 (18:49 -0700)]
headers: check that _GL_INLINE_HEADER_BEGIN is defined

Suggested by Bruce Korb in:
http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00070.html
* doc/extern-inline.texi (extern inline):
Suggest checking that _GL_INLINE_HEADER_BEGIN is defined.
* lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h:
* lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h:
* lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h:
* lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h:
* lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h:
* lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h:
* lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h:
* lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h:
* lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h:
* lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h:
* lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h:
* lib/xtime.h:
Check that _GL_INLINE_HEADER_BEGIN is defined.

10 years agobootstrap: remove the --version requirement from ancillary tools
Pádraig Brady [Sun, 18 Aug 2013 01:05:51 +0000 (02:05 +0100)]
bootstrap: remove the --version requirement from ancillary tools

* build-aux/bootstrap (check_exists): A new refactored function to
determine if a command exists.
(find_tool): Use the new function which does not require the
--version option to be supported.
(check_versions): Use the new function.

10 years agogc: support HMAC-SHA256 and HMAC-SHA512.
Simon Josefsson [Mon, 26 Aug 2013 19:31:15 +0000 (21:31 +0200)]
gc: support HMAC-SHA256 and HMAC-SHA512.

* lib/gc.h: Add gc_hmac_sha256 and gc_hmac_sha512.
* lib/gc-libgcrypt.c (gc_hmac_sha256, gc_hmac_sha512): New
functions.
(gc_hmac_md5): Use symbolic constant.
* lib/gc-gnulib.c: Include hmac.h for HMAC-SHA256/512 too.
(gc_hmac_sha256, gc_hmac_sha512): New functions.
* lib/hmac.h: Add hmac_sha256 and hmac_sha512 prototypes.
* m4/sha256.m4: Protect against empty expansion.
* m4/sha512.m4: Likewise.
* lib/hmac-sha256.c: New file.
* lib/hmac-sha512.c: Likewise.
* m4/gc-hmac-sha256.m4: Likewise.
* m4/gc-hmac-sha512.m4: Likewise.
* m4/gc-sha256.m4: Likewise.
* m4/gc-sha512.m4: Likewise.
* modules/crypto/gc-hmac-sha256: Likewise.
* modules/crypto/gc-hmac-sha256-tests: Likewise.
* modules/crypto/gc-hmac-sha512: Likewise.
* modules/crypto/gc-hmac-sha512-tests: Likewise.
* modules/crypto/hmac-sha256: Likewise.
* modules/crypto/hmac-sha256-tests: Likewise.
* modules/crypto/hmac-sha512: Likewise.
* modules/crypto/hmac-sha512-tests: Likewise.
* tests/test-gc-hmac-sha256.c: Likewise.
* tests/test-gc-hmac-sha512.c: Likewise
* tests/test-hmac-sha256.c: Likewise.
* tests/test-hmac-sha512.c: Likewise

10 years agogettext: update to version 0.18.3.1
Daiki Ueno [Sat, 24 Aug 2013 08:29:35 +0000 (10:29 +0200)]
gettext: update to version 0.18.3.1

* m4/intl.m4: Update from gettext-0.18.3.1, which fixes a misuse
of AC_CHECK_DECLS.

10 years agoselinux-at: omit unnecessary include
Paul Eggert [Fri, 23 Aug 2013 20:53:46 +0000 (13:53 -0700)]
selinux-at: omit unnecessary include

* lib/selinux-at.c: Don't include dosname.h; not needed, since
this source file doesn't use its macros, and subsidiary files that
use the macros already include it.

10 years agoautoupdate
Karl Berry [Thu, 22 Aug 2013 22:18:26 +0000 (15:18 -0700)]
autoupdate

10 years agod-ino: avoid false negative on symlink
Eric Blake [Wed, 21 Aug 2013 22:10:18 +0000 (16:10 -0600)]
d-ino: avoid false negative on symlink

If the first entry listed in a directory is a symlink, we
had a spurious mismatch between d_ino (which should match the
symlink) and stat() results (which chases the symlink).
Reported by Stephane Chazelas <stephane.chazelas@gmail.com>.

* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use lstat.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoupdate from texinfo
Karl Berry [Tue, 20 Aug 2013 18:06:51 +0000 (11:06 -0700)]
update from texinfo

10 years agoautoupdate
Karl Berry [Fri, 16 Aug 2013 13:32:22 +0000 (06:32 -0700)]
autoupdate

10 years agobootstrap: port to OpenBSD sed
Mike Miller [Tue, 13 Aug 2013 03:39:29 +0000 (23:39 -0400)]
bootstrap: port to OpenBSD sed

* build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
does not interpret `-' as a file argument to mean stdin.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agowarnings: minor optimization
Eric Blake [Thu, 15 Aug 2013 19:45:55 +0000 (13:45 -0600)]
warnings: minor optimization

Paul Eggert suggested that expr is more efficient than echo|sed.

* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use fewer processes.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agowarnings: check -Wfoo rather than -Wno-foo
Eric Blake [Wed, 14 Aug 2013 23:02:58 +0000 (17:02 -0600)]
warnings: check -Wfoo rather than -Wno-foo

As reported by Christophe Fergeau and others, use of the
warnings modules is awkward when probing for negative
warning flags.  For example, clang recognizes
-Wno-unused-command-line-argument, but gcc does not;
gcc silently ignores unknown warnings in isolation, but when
something else also causes a compilation problem, gcc then
compounds the overall message by also complaining about the
unrecongized command line option at that time.  The gcc manual
documents that this behavior is intentional so that someone
can add a -Wno-foo silencer to CFLAGS for a warning that older
gcc does not understand, and where the warning is undesired
under newer gcc; it also documents that probing for the -Wfoo
positive form of the error is a reliable way to tell if the
negative form will actually suppress anything.  Clang will
warn for both positive and negative forms of an unknown
option.

Since common usage includes:

for w in $list; do
  gl_WARN_ADD([$w])
done

the solution must be polymorphic to work on both m4 literals
and shell variables (similar to AS_VAR_SET polymorphism).

* m4/warnings.m4 (gl_COMPILER_OPTION_IF): If name begins with
-Wno-, test if the compiler recognizes the positive form instead.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoaccept doclicense option
Karl Berry [Thu, 15 Aug 2013 18:01:29 +0000 (11:01 -0700)]
accept doclicense option

10 years agoaccept doclicense option
Karl Berry [Thu, 15 Aug 2013 18:01:13 +0000 (11:01 -0700)]
accept doclicense option

10 years agoxvasprintf-tests: port to GCC with hardening flags
Paul Eggert [Tue, 13 Aug 2013 20:47:29 +0000 (13:47 -0700)]
xvasprintf-tests: port to GCC with hardening flags

* tests/test-xvasprintf.c (test_xasprintf): Pass another arg to
xasprintf, to pacify GCC.  Reported by Santiago Vila in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00002.html

10 years agofpending: port to recent Cygwin change to stdio_ext.h
Paul Eggert [Sun, 11 Aug 2013 23:36:16 +0000 (16:36 -0700)]
fpending: port to recent Cygwin change to stdio_ext.h

Reported by LRN in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00028.html>.
* lib/fpending.h: Don't worry about HAVE_DECL___FPENDING;
just declare __fpending unless it's a macro.
A duplicate decl shouldn't hurt.
* m4/fpending.m4 (gl_FUNC_FPENDING): Check that an __fpending
call compiles and links, instead of separately checking for
decl and lib function.
* modules/fpending (configure-ac):
Adjust to fpending.m4's renaming of shell variable.

10 years agono need for tendentious comment
Karl Berry [Sun, 11 Aug 2013 15:35:08 +0000 (08:35 -0700)]
no need for tendentious comment

10 years agoregenerate
Karl Berry [Sun, 11 Aug 2013 15:31:43 +0000 (08:31 -0700)]
regenerate

10 years agoautoupdate
Karl Berry [Sun, 11 Aug 2013 15:30:18 +0000 (08:30 -0700)]
autoupdate

10 years agosys_time: port to OpenBSD
Paul Eggert [Sun, 11 Aug 2013 05:02:58 +0000 (22:02 -0700)]
sys_time: port to OpenBSD

* lib/sys_time.in.h: Simply delegate to the system's header
in the BSDish cases as well.  Problem reported by Mike Miller in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00016.html>.
* tests/test-sys_select.c, tests/test-sys_time.c (verify_tv_sec_type):
Allow platforms like 64-bit OpenBSD where timeval's tv_sec is
wider than time_t.

10 years agoautoupdate
Karl Berry [Sat, 10 Aug 2013 14:10:55 +0000 (07:10 -0700)]
autoupdate

10 years agobootstrap: support checksum utils without a --status option
Pádraig Brady [Thu, 8 Aug 2013 10:08:49 +0000 (11:08 +0100)]
bootstrap: support checksum utils without a --status option

* build-aux/bootstrap: Only look for sha1sum if updating po files.
Add sha1 to the list of supported checksum utils since it's now
supported through adjustments below.
(update_po_files): Remove the use of --status
in a way that will suppress all error messages, but since this is
only used to minimize updates, it shouldn't cause an issue.
Exit early if there is a problem updating the po file checksums.
(find_tool): Remove the check for --version support as this
is optional as per commit 86186b17.  Don't even check for the
presence of the command as if that is needed, it's supported
through configuring prerequisites in bootstrap.conf.
Prompt that when a tool isn't found, one can define an environment
variable to add to the hardcoded search list.

10 years agoupdate from texinfo
Karl Berry [Fri, 9 Aug 2013 16:27:34 +0000 (09:27 -0700)]
update from texinfo

10 years agoFix ChangeLog typo.
Paul Eggert [Fri, 9 Aug 2013 15:49:19 +0000 (08:49 -0700)]
Fix ChangeLog typo.

10 years agoautoupdate
Karl Berry [Fri, 9 Aug 2013 15:03:30 +0000 (08:03 -0700)]
autoupdate

10 years agoregex: port to non-glibc/lock-using systems
Jim Meyering [Mon, 5 Aug 2013 18:24:26 +0000 (11:24 -0700)]
regex: port to non-glibc/lock-using systems

Since 29-05-2013 commit, 55ba71f4, compilation on a non-glibc
system with GNULIB_LOCK would fail due to absence of the
included "glthread/lock.h".  This would affect any package
for which the "lock" module is used only by the regex module,
and not explicitly used.
* m4/regex.m4 (gl_PREREQ_REGEX): Require gl_GLIBC21.
* modules/regex (Depends-on) [!GLIBC && $ac_use_included_regex]:
Add a dependency on the "lock" module.

10 years agoupdate from texinfo
Karl Berry [Tue, 6 Aug 2013 17:57:33 +0000 (10:57 -0700)]
update from texinfo

10 years agoautoupdate
Karl Berry [Sat, 20 Jul 2013 21:38:08 +0000 (14:38 -0700)]
autoupdate

10 years agolocalecharset: make locale_charset thread-safe on Mac OS X
Daiki Ueno [Sat, 20 Jul 2013 14:03:38 +0000 (07:03 -0700)]
localecharset: make locale_charset thread-safe on Mac OS X

* lib/localcharset.c (locale_charset) [DARWIN7]: Use MB_CUR_MAX_L
instead of MB_CUR_MAX.

10 years agogettext: update to version 0.18.3
Daiki Ueno [Sat, 20 Jul 2013 01:23:31 +0000 (18:23 -0700)]
gettext: update to version 0.18.3

* m4/intl.m4, m4/po.m4: Update from gettext-0.18.3.  In particular,
require AC_PROG_SED to allow user to specify custom sed command when
generating en@quot PO file.

10 years agoautoupdate
Karl Berry [Fri, 19 Jul 2013 22:08:53 +0000 (15:08 -0700)]
autoupdate

10 years agobootstrap: use correct source when copying build-aux files
Werner LEMBERG [Fri, 21 Jun 2013 22:52:22 +0000 (00:52 +0200)]
bootstrap: use correct source when copying build-aux files

in my setup for ttfautohint (http://repo.or.cz/w/ttfautohint.git) I
have the following assignment in `bootstrap.conf':

  build_aux=gnulib

It seems that the patch below is necessary to make this really work
(at least it works for me): if I understand the issue correctly,
$build_aux is a *destination* variable, so it must not be used for the
files listed in $gnulib_extra_files which uses the directory structure
of the `gnulib' repository.

* build-aux/bootstrap (gnulib_extra_files): This variable is
relative to upstream gnulib layout, not downstream.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agotmpdir: fix bug in VMS port
Paul Eggert [Wed, 17 Jul 2013 13:03:43 +0000 (06:03 -0700)]
tmpdir: fix bug in VMS port

* lib/tmpdir.c (path_search) [__VMS]: Never add slash.
See Steven M. Schweda in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00026.html>.

10 years agotmpdir: fix typo in previous change
Paul Eggert [Mon, 15 Jul 2013 21:43:20 +0000 (14:43 -0700)]
tmpdir: fix typo in previous change

10 years ago* lib/tmpdir.c: Simplify code to add slash; no need for a loop.
Paul Eggert [Mon, 15 Jul 2013 20:32:24 +0000 (13:32 -0700)]
* lib/tmpdir.c: Simplify code to add slash; no need for a loop.

10 years agotmpdir: port to VMS, to // != /, and to long dirs
Paul Eggert [Mon, 15 Jul 2013 16:44:19 +0000 (09:44 -0700)]
tmpdir: port to VMS, to // != /, and to long dirs

* lib/tmpdir.c (__libc_secure_getenv) [!_LIBC]: Rename from
__secure_getenv, so that we're more like the glibc version.
All uses changed.
(path_search): Don't put slash after directory if __VMS.
Problem reported by Steven M. Schweda in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00019.html>.
Do not remove trailing slash from "//".
Do not assume dlen <= INT_MAX.

10 years agoregex: port to --with-included-regex --enable-gcc-warnings non-threaded
Paul Eggert [Tue, 9 Jul 2013 18:35:01 +0000 (11:35 -0700)]
regex: port to --with-included-regex --enable-gcc-warnings non-threaded

* lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid
gcc warnings in the non-threaded case.  Reported by Charlie Brown in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00015.html>.

10 years agoaccept4, dup3, pipe2: port to Cygwin
Paul Eggert [Tue, 9 Jul 2013 17:00:58 +0000 (10:00 -0700)]
accept4, dup3, pipe2: port to Cygwin

Problem reported for Emacs by Ken Brown in <http://bugs.gnu.org/14821>.
* lib/accept4.c (accept4) [O_BINARY]:
* lib/dup3.c (dup3) [O_BINARY]:
* lib/pipe2.c (pipe2) [O_BINARY]:
Use set_binary_mode, not setmode.
* lib/pipe2.c [!GNULIB_BINARY_IO]: Include binary-io.h.
* modules/binary-io (Depends-on): Remove module indicator.
These last two bits undo the previous change to pipe2 and binary-io.

10 years agomountlist: add support for deallocating returned list entries
Pádraig Brady [Tue, 9 Jul 2013 12:55:58 +0000 (13:55 +0100)]
mountlist: add support for deallocating returned list entries

* lib/mountlist.c (free_mount_entry): A new exported function
to deallocate a mount list entry.
* lib/mountlist.h: Declare the new function.
(read_file_system_list): Refactor to use the new deallocation function.
Suggested by Anton Ovchinnikov.

10 years agostdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
Paul Eggert [Mon, 8 Jul 2013 06:06:26 +0000 (23:06 -0700)]
stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11

Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>.
* lib/stdalign.in.h (_Alignas, _Alignof):
Port to FreeBSD 9.1, and to C11 and C++11.
(_Alignas): Also support ICC.
* lib/verify.h (_Static_assert): Undef if <stddef.h> defines it.
* m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.

10 years agofnmatch: don't goto over declaration
Paul Eggert [Sun, 7 Jul 2013 00:12:29 +0000 (17:12 -0700)]
fnmatch: don't goto over declaration

* lib/fnmatch_loop.c (FCT): Hoist local up one level, to avoid
undefined behavior for goto over a declaration.
Problem reported by Charlie Brown in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00009.html>.

10 years agopipe2: decouple from binary-io a bit
Paul Eggert [Sat, 6 Jul 2013 08:35:26 +0000 (01:35 -0700)]
pipe2: decouple from binary-io a bit

This is for Emacs, which needs pipe2 but not binary-io.
* lib/pipe2.c [!GNULIB_BINARY_IO]: Don't include binary-io.h.
* modules/binary-io (Depends-on): Add module indicator.

10 years agomgetgroups: relax license to LGPLv2+
Eric Blake [Wed, 3 Jul 2013 21:45:04 +0000 (15:45 -0600)]
mgetgroups: relax license to LGPLv2+

getgrouplist is part of glibc and LGPLv2+; the mgetgroups module
is merely an ease-of-use wrapper around this interface.  There's
nothing in the algorithm worth protecting by the more-restrictive
GPLv3+.  See also this thread.
https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00092.html

* modules/getugroups (License): Change from GPLv3+.
* modules/mgetgroups (License): Likewise.
* modules/getgroups (License): Change from LGPLv3+.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoxalloc-oversized: relax license to LGPLv2+
Eric Blake [Wed, 3 Jul 2013 21:38:07 +0000 (15:38 -0600)]
xalloc-oversized: relax license to LGPLv2+

Unlike the bulk of xalloc* which calls exit() on allocation failure,
and thus is unacceptable in a library, the xalloc-oversized.h header
is a mere macro that makes checks for allocation overflow possible in
all sorts of portable code.  In fact, the LGPLv2+ module malloca
already has a copy of this check, arguing that this header is more
useful under a permissive license.  See also this thread.
https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00092.html

* modules/xalloc-oversized (License): Change from GPLv3+.

Signed-off-by: Eric Blake <eblake@redhat.com>