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.
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.
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.
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>.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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'.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
* 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.
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.
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.
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>.
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.
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.
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.
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>.
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.
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+.
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+.