]> Savannah Git Hosting - gnulib.git/log
gnulib.git
9 years agognulib-tool: concatenate lib_SOURCES to a single line
Pádraig Brady [Mon, 1 Jun 2015 20:50:13 +0000 (21:50 +0100)]
gnulib-tool: concatenate lib_SOURCES to a single line

* gnulib-tool: Refactor the line merging sed logic,
and use that to output a single lib_SOURCES line for each module.
gnulib using projects often postprocess this output to prepend
subdir paths to each item, and having a single line simplifies this
processing allowing better decoupling from the gnulib-tool output.
This avoids a new issue with coreutils where it failed to prepend
a path on the new {get,set}-permissions.c items (which were
on continued lines in modules/acl-permissions).

9 years agopthread_sigmask: discount system version if a simple macro
Pavel Fedin [Mon, 1 Jun 2015 06:43:07 +0000 (09:43 +0300)]
pthread_sigmask: discount system version if a simple macro

MinGW64 has: #define pthread_sigmask(H, S1, S2) 0

* m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the
function to ensure it's available.

9 years agoreadlinkat: avoid OS X 10.10 trailing slash bug
Pádraig Brady [Sun, 31 May 2015 02:08:52 +0000 (03:08 +0100)]
readlinkat: avoid OS X 10.10 trailing slash bug

* doc/posix-functions/readlink.texi: Mention that OS X 10.10
has this bug.
* doc/posix-functions/readlinkat.texi: Likewise.  Also mention
that OS X 10.10 has this function.
* lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug,
as done for readlink().
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink()
trailing slash bug, and assume readlinkat() has the same issue.
Also fix a typo where $gl_cv_decl_readlink_works was tested,
rather than the correct $gl_cv_decl_readlinkat_works.

9 years agoacl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
Andreas Gruenbacher [Fri, 29 May 2015 18:47:45 +0000 (20:47 +0200)]
acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)

* lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
module rewrite.

9 years agoacl-permissions: Fix build on Solaris and Cygwin
Andreas Gruenbacher [Fri, 29 May 2015 17:47:40 +0000 (19:47 +0200)]
acl-permissions: Fix build on Solaris and Cygwin

Reported by Tom G. Christensen <tgc@jupiterrise.com>:
* lib/set-permissions.c (set_acls): The count, entries, ace_count, and
ace_entries variables have moved into struct permission_context but
they were still accessed as local variables here.

9 years agolinkat: avoid OS X 10.10 trailing slash with symlink bug
Pádraig Brady [Fri, 29 May 2015 02:11:59 +0000 (03:11 +0100)]
linkat: avoid OS X 10.10 trailing slash with symlink bug

On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",)
causes the symlink to be dereferenced, and if it points
to a non existent file, that file will be created as
a hard link to "path1".
This fixes a test failure in test-linkat.c.

* m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with
this case.  The existing workaround in linkat.c for
trailing slash issues, suffices for this case.
* doc/posix-functions/linkat.texi: Add OS X 10.10 to
the list of platforms with trailing slash issues.

9 years agounlinkat: handle ignoring of ".." on Darwin 14
Pádraig Brady [Thu, 28 May 2015 13:15:08 +0000 (14:15 +0100)]
unlinkat: handle ignoring of ".." on Darwin 14

* lib/unlinkat.c: unlinkat() has the same bug as unlink()
on Mac OS X 10.10, where it ignores paths with a trailing "..",
so handle in the same manner.
* m4/unlinkat.m4: Comment on this Darwin issue.
* doc/posix-functions/unlink.texi: Update the latest version
where the issue was seen.
* doc/posix-functions/unlinkat.texi: Mention this issue.
Fixes a test failure in test-unlinkat.c.

9 years agoqacl: split into qcopy-acl and qset-acl
Paul Eggert [Wed, 27 May 2015 23:05:44 +0000 (16:05 -0700)]
qacl: split into qcopy-acl and qset-acl

Emacs needs the former, but not the latter.
* modules/acl-permissions: New file, containing most of the old qacl.
* modules/file-has-acl (Depends-on): Depend on acl-permissions, not qacl.
* modules/qacl: Now merely depends on qcopy-acl and qset-acl.
* modules/qcopy-acl, modules/qset-acl: New files.
* MODULES.html.sh (File system functions):
Mention the new modules, and mention qacl while we're at it.

9 years agogitlog-to-changelog: new option --ignore-line
Glenn Morris [Wed, 27 May 2015 21:44:16 +0000 (14:44 -0700)]
gitlog-to-changelog: new option --ignore-line

(This patch is imported from the GNU Emacs master.)
This option ignores individual commit lines matching a pattern.
* build-aux/gitlog-to-changelog: Add --ignore-line option.

9 years agoqacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
Andreas Gruenbacher [Sat, 11 Apr 2015 12:44:30 +0000 (14:44 +0200)]
qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)

Implement get_permissions and set_permissions primitives for getting all
the permissions of a file, storing them, and later setting them. (In the
minimal case, the permissions consist only of a file mode.) Reimplement
qset_acl and qcopy_acl based on these new primitives: this avoids code
duplication and makes error handling more consistent.

The Solaris and Cygwin code still uses duplicate code paths for setting
a file mode while making sure that no acls exist and setting an explicit
acl; this is no worse than before, but could be cleaned up.  The AIX
code still doesn't read ACLs, it only makes sure that acls don't get in
the way when setting a file mode.

* lib/acl-internal.h (struct permission_context): New data structure.
(get_permissions, set_permissions, free_permission_context): Declare.
* lib/acl-internal.c (free_permission_context): New helper function.
* lib/get-permissions.c (get_permissions): New helper function split off
from qcopy_acl.
* lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and
AIX, set a file's permissions based only on a file mode.
(acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All
other platforms construct a temporary acl from the file mode and set
that acl in the same way as setting an acl read from the source file.
This should help avoid code duplication and inconsistent / buggy
behavior.
(set_acls): New helper function Split off from qcopy_acl.
(chmod_or_fchmod): Moved here from qset-acl.c.
(set_permissions): New helper function.
* lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and
set_permissions.
* lib/qset-acl.c (qset_acl): Rewrite using set_permissions.
* modules/qacl: Add get-permissions.c and set-permissions.c.

9 years agofile-has-acl: Split feature tests again (Bug#20667)
Andreas Gruenbacher [Tue, 28 Apr 2015 10:01:19 +0000 (12:01 +0200)]
file-has-acl: Split feature tests again (Bug#20667)

* lib/file-has-acl.c: Instead of testing for
XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT,
define them when needed.
* m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's
GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.

9 years agostring: fix build failure on BSD/OSX with FORTIFY_SOURCE
Pádraig Brady [Wed, 27 May 2015 11:59:05 +0000 (12:59 +0100)]
string: fix build failure on BSD/OSX with FORTIFY_SOURCE

This avoids a conflict with "FORTIFY_SOURCE" variants
of the string functions when they're replaced on NetBSD-6.0.1
and Darwin-14.3.0 at least.  On these platforms, the system
<string.h> re-includes "string.h" through <strings.h>, before
going on to redefine the "FORTIFY_SOURCE" _chk variants.
For example rpl_strncat is redefined to __builtin___strncat_chk.

Note strncat is being replaced as the configure check is failing
with GCC 4.5.0, due to the builtin strncat failing the check.
I.E. when compiled with -O2 the test fails, but passes when
-fno-builtin-strncat is also specified.  -D_FORTIFY_SOURCE has
no impact on the configure test result.

* lib/string.in.h: Avoid including our "lib/string.h" while
including the system <string.h>.

9 years agostdio: limit __gnu_printf__ witness to gcc 4.4+
Eric Blake [Wed, 27 May 2015 03:27:44 +0000 (21:27 -0600)]
stdio: limit __gnu_printf__ witness to gcc 4.4+

If we start adding more places that need to conditionally label
functions with __gnu_printf__, it will be nicer if the logic for
determining that gcc even supports that attribute is done once
up front rather than in each caller.

* lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...
* m4/stdio_h.m4 (gl_STDIO_H): ...here.

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoerror: use correct printf attributes on mingw
Eric Blake [Tue, 26 May 2015 23:26:15 +0000 (17:26 -0600)]
error: use correct printf attributes on mingw

Now that we always turn on __USE_MINGW_ANSI_STDIO when extensions
are in use, we need to replicate the same logic in error.h as
we have in stdio.h, for selecting the correct format string that
will squelch gcc -Wformat=2 warnings.

Reported by Assaf Gordon.

* lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define.

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoupdate from texinfo
Karl Berry [Tue, 26 May 2015 22:05:18 +0000 (15:05 -0700)]
update from texinfo

9 years agointtypes: force correct mingw PRIdMAX even without <stdio.h>
Eric Blake [Tue, 26 May 2015 21:00:50 +0000 (15:00 -0600)]
inttypes: force correct mingw PRIdMAX even without <stdio.h>

The mingw trick of using __USE_MINGW_ANSI_STDIO only changes the
definitions in <inttypes.h> if <stdio.h> is also included.  But
since we want to always use the __gnu_printf__ flavor when
available, we want to make sure that including <inttypes.h> in
isolation will give the desired "lld" answer.

Reported by Assaf Gordon.

* modules/inttypes (Depends-on): Require extensions, so that mingw
always uses GNU style inttypes.
* lib/inttypes.in.h: On mingw, include <stdio.h>.

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agostdio: fix probe on mingw under gcc 5.1
Eric Blake [Wed, 20 May 2015 23:18:20 +0000 (17:18 -0600)]
stdio: fix probe on mingw under gcc 5.1

Per https://gcc.gnu.org/gcc-5/porting_to.html, gcc 5.1 intentionally
changed the preprocessor to emit multiple lines, rather than one
line, when expanding text that includes literal markers combined with
a macro expansion obtained from a header.  This in turn breaks the
probe for whether mingw headers support GNU-style "lld" for PRIdMAX,
as the probe text was no longer on one line.

This patch changes from grepping preprocessor output (with its
indeterminate layout due to differences in preprocessors) to instead
using a compile-time check of the length of the macro expansion.

It feels a bit gross, but the grossness is limited to mingw, which
is the only platform where using __gnu_printf__ instead of __printf__
will make a difference.

Based on a report by Suren Hajyan.

* m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work
around new gcc preprocessor rules.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoautoupdate
Karl Berry [Fri, 8 May 2015 15:35:11 +0000 (08:35 -0700)]
autoupdate

10 years agogitlog-to-changelog: parse "Tiny-change"
Glenn Morris [Fri, 8 May 2015 14:58:00 +0000 (07:58 -0700)]
gitlog-to-changelog: parse "Tiny-change"

* build-aux/gitlog-to-changelog: Treat "Tiny-change" like
"Copyright-paperwork-exempt".  (Bug#20324)

10 years agoupdate from texinfo
Karl Berry [Wed, 6 May 2015 18:21:10 +0000 (11:21 -0700)]
update from texinfo

10 years agodoc: document glibc posix_fallocate() issues
Pádraig Brady [Wed, 6 May 2015 15:23:56 +0000 (16:23 +0100)]
doc: document glibc posix_fallocate() issues

* doc/posix-functions/posix_fallocate.texi: Mention the
glibc efficiency problems and issues with NFS.

10 years agogendocs.sh: document new htmlarg default
Karl Berry [Tue, 5 May 2015 23:14:12 +0000 (16:14 -0700)]
gendocs.sh: document new htmlarg default

10 years agoextern-inline: no need for workaround in GCC 5.1
Paul Eggert [Thu, 30 Apr 2015 02:47:12 +0000 (19:47 -0700)]
extern-inline: no need for workaround in GCC 5.1

* doc/extern-inline.texi (extern inline):
* m4/extern-inline.m4 (gl_EXTERN_INLINE):
GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work
around these bugs in GCC 5.1 and later.  Maybe in a decade or
two we can remove these workarounds.

10 years agoupdate from texinfo
Karl Berry [Wed, 29 Apr 2015 19:36:59 +0000 (12:36 -0700)]
update from texinfo

10 years agoeealloc, pagealign_alloc, xalloc: avoid clang warnings
Pádraig Brady [Tue, 28 Apr 2015 21:24:45 +0000 (22:24 +0100)]
eealloc, pagealign_alloc, xalloc: avoid clang warnings

Avoid [-Wunknown-attributes] warnings like:
warning: unknown attribute '__alloc_size__' ignored

* lib/xalloc.h: Don't use the __alloc_size__  attribute
with clang, as support has been fully removed as of clang 3.5:
https://github.com/llvm-mirror/clang/commit/c047507a
* lib/eealloc.h: Likewise.
* lib/pagealign_alloc.h: Likewise.

10 years agotests: pacify GCC 5.1's stricter printf checking
Paul Eggert [Mon, 27 Apr 2015 08:23:29 +0000 (01:23 -0700)]
tests: pacify GCC 5.1's stricter printf checking

* tests/test-dirname.c (main):
* tests/test-getaddrinfo.c (simple):
* tests/test-getlogin.c (main):
* tests/test-getndelim2.c (main):
* tests/test-inttostr.c (CK):
* tests/test-md5.c (main):
* tests/test-read-file.c (main):
* tests/test-sha1.c (main):
Fix mismatches between printf format and value signedness.
* tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max):
Remove, as CAST_VAL always returned a value of type uintmax_t.

10 years agofts: port to GCC 5.1 with --enable-gcc-warnings
Paul Eggert [Mon, 27 Apr 2015 08:19:03 +0000 (01:19 -0700)]
fts: port to GCC 5.1 with --enable-gcc-warnings

Without this fix, GCC 5.1 (correctly) warns about a subscript
error on the fts_name component of FTSENT.  It's actually a
flexible member, so define it that way on C99 or later hosts.
* lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a
structure that now has a flexible array member.
* lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro.
(FTSENT): fts_name is now flexible on C99-or-later platforms.
* modules/fts (Depends-on): Add flexmember.

10 years agofile-has-acl: port to CentOS 6
Paul Eggert [Sun, 26 Apr 2015 16:20:34 +0000 (09:20 -0700)]
file-has-acl: port to CentOS 6

Problem reported by Tom G. Christensen in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-04/msg00074.html
* lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a
combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and
HAVE_GETXATTR.
* m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of
linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS,
and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what what
file-has-acl.c actually needs.

10 years agofile-has-acl: always return false when ACLs aren't supported
Pádraig Brady [Sat, 25 Apr 2015 20:49:43 +0000 (21:49 +0100)]
file-has-acl: always return false when ACLs aren't supported

* lib/file-has-acl.c (file_has_acl): Consistent with other paths,
change the GNU/Linux getxattr path, to transform "not supported"
errors to a false return rather than an error.  This is handled
within file_has_acl() due to the platform specific tests to
determine if ACLs are not supported.

10 years agogettext: propagate po/Makefile.in.in too
Paul Eggert [Sun, 26 Apr 2015 00:28:45 +0000 (17:28 -0700)]
gettext: propagate po/Makefile.in.in too

* build-aux/po/Makefile.in.in: Copy from latest gettext.
* config/srclist.txt: In build-aux/po, copy Makefile.in.in and
remove-potcdate.sin from $GETTEXT.  This fixes a version mismatch
between Makefile.in.in and the gettext-runtime m4 files.

10 years agofile-has-acl: new module, split from acl
Paul Eggert [Sat, 25 Apr 2015 05:07:56 +0000 (22:07 -0700)]
file-has-acl: new module, split from acl

And add a new module file-has-acl-tests to match.
I ran into a problem with the recent changes to the acl module,
as they introduced a typo 'test use_xattrs = 0' into 'configure'.
When using the fixed version with Emacs, I discovered that
file-has-acl wasn't separated out well enough for Emacs (e.g., it
had multiple libraries, but needed only one), so I fixed that too.
* NEWS: Document this incompatible change.
* modules/file-has-acl, modules/file-has-acl-tests: New files.
* m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL.
Initialize gl_need_lib_has_acl.
(gl_FUNC_ACL): Require it.
Simplify use of 'test'.  Set LIB_HAS_ACL if gl_need_lib_has_acl.
Move the file-has-acl.c-relevant stuff to ...
(gl_FILE_HAS_ACL): ... this new macro.  Rewrite to fix 'test
use_xattrs = 0' typo, and omit some needless work.  Set
gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set
when gl_FUNC_ACL is called.
* modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c.
(Link): Remove $(LIB_HAS_ACL).
* modules/acl-tests (Files, Depends-on, configure.ac, TESTS)
(check_PROGRAMS): Move stuff relevant to file-has-acl to
modules/file-has-acl-tests.
(test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.

10 years agomanywarnings: add GCC 5.1 warnings
Paul Eggert [Fri, 24 Apr 2015 19:58:46 +0000 (12:58 -0700)]
manywarnings: add GCC 5.1 warnings

* build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds,
-Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat,
-Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation,
-Wsuggest-override, -Wuse-without-only.  Change
-Wnormalized=... operands to match 5.1.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare,
-Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers,
-Wdiscarded-qualifiers, -Wformat-signedness,
-Wincompatible-pointer-types, -Wint-conversion,
-Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr,
-Wshift-count-negative, -Wshift-count-overflow,
-Wsizeof-array-argument, -Wsuggest-final-methods,
-Wsuggest-final-types, -Wswitch-bool.  Remove -Warray-bounds,
and add -Warray-bounds=2 as a special case.

10 years agoautoupdate
Karl Berry [Fri, 24 Apr 2015 14:44:45 +0000 (07:44 -0700)]
autoupdate

10 years agodoc: update FDL template to match FDL examples.
Simon Josefsson [Tue, 21 Apr 2015 08:40:50 +0000 (10:40 +0200)]
doc: update FDL template to match FDL examples.

* doc/alloca-opt.texi:
* doc/alloca.texi:
* doc/c-ctype.texi:
* doc/c-strcase.texi:
* doc/c-strcaseeq.texi:
* doc/c-strcasestr.texi:
* doc/c-strstr.texi:
* doc/c-strtod.texi:
* doc/c-strtold.texi:
* doc/ctime.texi:
* doc/error.texi:
* doc/gcd.texi:
* doc/gnulib-tool.texi:
* doc/inet_ntoa.texi:
* doc/intprops.texi:
* doc/lib-symbol-visibility.texi:
* doc/maintain.texi:
* doc/parse-datetime.texi:
* doc/quote.texi:
* doc/regexprops-generic.texi:
* doc/standards.texi: Remove spurious 'with' in FDL license template.

10 years agolstat: fix cross-compilation 'ln -s' problem
Paul Eggert [Tue, 21 Apr 2015 07:22:00 +0000 (00:22 -0700)]
lstat: fix cross-compilation 'ln -s' problem

* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
Have the test program call 'symlink' rather than a separate
script run 'ln -s'; this is more likely to work in
cross-compilation environments.  Reported by Pavel Fedin in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-04/msg00060.html

10 years agogendocs.sh: default to a common CSS style sheet for HTML output
Ludovic Courtès [Thu, 11 Dec 2014 15:49:21 +0000 (16:49 +0100)]
gendocs.sh: default to a common CSS style sheet for HTML output

* build-aux/gendocs.sh (htmlarg): Change default value.

10 years agognulib-tool: output bold attribute more portably
Mats Erik Andersson [Wed, 15 Apr 2015 16:31:46 +0000 (18:31 +0200)]
gnulib-tool: output bold attribute more portably

* gnulib-tool (func_show_module_list): Change hexadecimal
numbers to octal in BOLD_ON and BOLD_OFF.  The use of hex
encoded numbers as arguments to `printf' is not portable,
and is not claimed by POSIX.  This is the case with FreeBSD.

10 years agoqacl: Simplify HP-UX acl_nontrivial check
Andreas Gruenbacher [Sun, 12 Apr 2015 14:36:38 +0000 (16:36 +0200)]
qacl: Simplify HP-UX acl_nontrivial check

* lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of
acl_nontrivial. Check if the acl has at most three entries instead (it must
have exactly three entries according to the HP-UX documentation). Ignore
uids and gids as long as an entry is either for a user (i.e., the owner),
a group (i.e., the owning group), or others.
* lib/acl-internal.h: Change HP-UX's acl_nontrivial prototype.
* lib/qcopy-acl.c (qcopy_acl): With that, we no longer need to stat the source
file.

10 years agoacl: On Linux, check for acls without libacl
Andreas Gruenbacher [Sun, 12 Apr 2015 14:36:37 +0000 (16:36 +0200)]
acl: On Linux, check for acls without libacl

On Linux, use the getxattr syscall instead of the acl_extended_file libacl
library function to check for the presence of acls, avoiding a library
dependency.

* lib/file-has-acl.c: Include xattr headers if we have them.
(file_has_acl): On Linux, use getxattr().
* m4/acl.m4 (gl_FUNC_ACL): Define LIB_HAS_ACL as the libraries to link with for
file_has_acl(). Check for xattr headers and getxattr().
* modules/acl: Add a dep on the stdbool module which was already needed.
Add the new reduced dependency LIB_HAS_ACL reference.

10 years agoacl, qacl: split off shared functions into separate object file
Andreas Gruenbacher [Sun, 12 Apr 2015 14:36:36 +0000 (16:36 +0200)]
acl, qacl: split off shared functions into separate object file

Some of the helper functions in file-has-acl.c are used from qcopy-acl.c while
file_has_acl() isn't needed there.  Split the shared functions off into
acl-internal.c.

* lib/file-has-acl.c: Remove helper functions here.
* lib/acl-internal.c: Add helper functions here.
* modules/qacl: Use acl-internal.c instead of file-has-acl.c here.
* modules/acl: Add file-has-acl.c now that qacl doesn't use it anymore.

10 years agogit-version-gen: revert "detect untagged revisions"
Mats Erik Andersson [Tue, 14 Apr 2015 20:25:59 +0000 (21:25 +0100)]
git-version-gen: revert "detect untagged revisions"

Revert commit bedd7833 as it breaks `make dist` in Inetutils
at least, due to the interdependencies with top/GNUMakefile,
which depend on the tag prefixes.  This results in `make dist`
inducing a new call to autoconf where a simple tar-ball build
would be expected.

10 years agotempname: avoid unused parameter warnings
Ángel González [Tue, 14 Apr 2015 10:47:52 +0000 (11:47 +0100)]
tempname: avoid unused parameter warnings

* lib/tempname.c (try_dir): Tag with __GL_UNUSED.
(try_nocreate): Likewise.

10 years agogit-version-gen: detect untagged revisions
Mats Erik Andersson [Mon, 13 Apr 2015 21:00:35 +0000 (23:00 +0200)]
git-version-gen: detect untagged revisions

* build-aux/git-version-gen: If fallback string is empty,
but git is available, use "git describe --always" to extract
a revision, and prefix it with "g".  This is much better than
responding "UNKNOWN" and it applies to shallow clones!

10 years agofseeko: fix build failure on NetBSD >= 6
HIRAMATSU Yoshifumi [Tue, 14 Apr 2015 10:16:47 +0000 (11:16 +0100)]
fseeko: fix build failure on NetBSD >= 6

* lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.

10 years agogitlog-to-changelog: port to MS-Windows
Paul Eggert [Thu, 9 Apr 2015 16:25:12 +0000 (09:25 -0700)]
gitlog-to-changelog: port to MS-Windows

* build-aux/gitlog-to-changelog (git_dir_option):
Use strftime with "%Y-%m-%d", not "%F", to avoid a bug in
MS-Windows Perl.  Reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00504.html

10 years agogendocs: new option --tex for texi2dvi options
Karl Berry [Tue, 7 Apr 2015 21:50:26 +0000 (14:50 -0700)]
gendocs: new option --tex for texi2dvi options

10 years agosync gettext .m4 files from gettext
Karl Berry [Tue, 7 Apr 2015 16:46:17 +0000 (09:46 -0700)]
sync gettext .m4 files from gettext

10 years agouniname/uniname-tests: fix failure due to alias
Daiki Ueno [Tue, 7 Apr 2015 02:09:23 +0000 (11:09 +0900)]
uniname/uniname-tests: fix failure due to alias

Reported by Jack Howarth in:
<https://lists.gnu.org/archive/html/bug-libunistring/2015-04/msg00000.html>.
* tests/uniname/test-uninames.c (name_has_alias): New function.
(test_inverse_lookup): Exclude character name with valid alias,
from randomly generated character names.
(main): Fill unicode_aliases before calling test functions.

10 years agohash: remove deprecated hash_insert0 function
Giuseppe Scrivano [Fri, 3 Apr 2015 13:58:12 +0000 (14:58 +0100)]
hash: remove deprecated hash_insert0 function

* lib/hash.h (hash_insert0): Remove deprecated function.
* lib/hash.c (hash_insert0): Likewise.
* NEWS: Document the interface change.

10 years agomountlist: remove dependency on libmount
Pádraig Brady [Thu, 2 Apr 2015 03:18:02 +0000 (04:18 +0100)]
mountlist: remove dependency on libmount

* lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo
directly, rather than depending on libmount, which has many
dependencies due to its dependence on libselinux, as detailed at:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00063.html
Note we restrict this to __linux__ as that's probably where this
interface will remain.  If ever porting, it would be best
to first pull the makedev() wrapper from coreutils to a gnulib module.
Note also we don't add a getline dependency to the mountlist module,
as all Linux versions are sufficient.

10 years agostddef: port to pre-C11 GCC on x86
Paul Eggert [Thu, 2 Apr 2015 17:35:53 +0000 (10:35 -0700)]
stddef: port to pre-C11 GCC on x86

On this platform, max_align_t should have an alignment of 8 even
though the storage alignments of double, long, etc. max out at 4.
Inspired by a comment of Andreas Schwab's here:
https://sourceware.org/ml/libc-alpha/2015-04/msg00017.html
* lib/stddef.in.h (_GL_STDDEF_ALIGNAS) [!HAVE_MAX_ALIGN_T]: New macro.
(max_align_t) [!HAVE_MAX_ALIGN_T]: Use it.
* tests/test-stddef.c: Test __alignof__ too, if available.

10 years agoquotearg-simple-tests: add missing gl_FUNC_MMAP_ANON dependency
Pádraig Brady [Tue, 24 Mar 2015 12:23:28 +0000 (12:23 +0000)]
quotearg-simple-tests: add missing gl_FUNC_MMAP_ANON dependency

* modules/quotearg-simple-tests: Reference m4/mmap-anon.m4

10 years agoyesno: make EOL optional in ENABLE_NLS case also
Tobias Stoeckmann [Tue, 24 Mar 2015 12:15:27 +0000 (12:15 +0000)]
yesno: make EOL optional in ENABLE_NLS case also

yesno behaves differently in a corner case depending on ENABLE_NLS.
With an input of "y" followed by an EOF the input is considered to
be "no", because the last character is replaced with '\0'.  It was
assumed that there is a newline, which doesn't have to be true.

If ENABLE_NLS is not set, getchar() reads y and accepts it as "yes",
looping through more getchar() calls until reaching newline or EOF.

* lib/yesno.c (yesno): Check for EOL before replacing.
* tests/test-yesno.sh: Add a test case (test along with gettext).

10 years agofdopendir-tests: test it does not close its arg
Paul Eggert [Mon, 23 Mar 2015 02:47:24 +0000 (19:47 -0700)]
fdopendir-tests: test it does not close its arg

* tests/test-fdopendir.c (main): Test that fdopendir does not
close its argument.  From a suggestion by David Grayson in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-03/msg00039.html

10 years agogitlog-to-changelog: trim trailing white space
Paul Eggert [Sat, 21 Mar 2015 01:09:24 +0000 (18:09 -0700)]
gitlog-to-changelog: trim trailing white space

* build-aux/gitlog-to-changelog (main):
Trim trailing white space from commit message lines.
This is helpful for processing the GNU Emacs repository,
which dates back to 1985 and contains a lot of such lines.

10 years agogitlog-to-changelog: new option --ignore-matching
Paul Eggert [Sat, 21 Mar 2015 00:40:37 +0000 (17:40 -0700)]
gitlog-to-changelog: new option --ignore-matching

* build-aux/gitlog-to-changelog (usage, git_dir_option, main):
Support new option --ignore-matching=PAT, which ignores all
commit messages whose first line matches PAT.

10 years agofdopendir: port better to MinGW
Paul Eggert [Thu, 19 Mar 2015 19:11:07 +0000 (12:11 -0700)]
fdopendir: port better to MinGW

* lib/fdopendir.c (fd_clone_opendir) [REPLACE_FCHDIR]:
Use 'dup' if dirfd fails.  Suggested by Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-03/msg00033.html
* modules/fdopendir (Depends-on): Add dirfd.

10 years agofdopendir: fix typo in comment
Paul Eggert [Wed, 18 Mar 2015 19:47:12 +0000 (12:47 -0700)]
fdopendir: fix typo in comment

* lib/fdopendir.c (fdopendir_with_dup): REPLACE_FCHDIR was misspelled.

10 years agoerror: document all entry points provided
Eric Blake [Mon, 9 Mar 2015 15:48:19 +0000 (09:48 -0600)]
error: document all entry points provided

Based on a report by Mohammad Akhlaghi.

* doc/glibc-functions/error_print_progname.texi
(error_print_progname): Mention the error module.
* doc/glibc-functions/error_at_line.texi (error_at_line):
Likewise.
* doc/glibc-functions/error_message_count.texi
(error_message_count): Likewise.
* doc/glibc-functions/error_one_per_line.texi
(error_one_per_line): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoautoupdate
Karl Berry [Sun, 8 Mar 2015 14:22:10 +0000 (07:22 -0700)]
autoupdate

10 years agoautoupdate
Karl Berry [Fri, 6 Mar 2015 14:09:06 +0000 (06:09 -0800)]
autoupdate

10 years agoautoupdate
Karl Berry [Wed, 4 Mar 2015 14:41:45 +0000 (06:41 -0800)]
autoupdate

10 years agovasnprintf: pacify clang 3.5.0
Paul Eggert [Tue, 3 Mar 2015 15:48:40 +0000 (07:48 -0800)]
vasnprintf: pacify clang 3.5.0

Problem reported by Werner Lemberg in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-03/msg00000.html
* lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to.
The casts aren't needed, since the characters in question are ASCII.

10 years agoglob, etc.: port to MSVC v18 on MS-Windows 8.1
Paul Eggert [Wed, 25 Feb 2015 04:44:32 +0000 (20:44 -0800)]
glob, etc.: port to MSVC v18 on MS-Windows 8.1

* lib/dirent--.h (GNULIB_defined_opendir):
* lib/dirent.in.h (GNULIB_defined_opendir)
(GNULIB_defined_closedir):
* lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir):
#undef only if Gnulib defined it.

10 years agopoll: port to MSVC v18 on MS-Windows 8.1
Paul Eggert [Wed, 25 Feb 2015 00:16:19 +0000 (16:16 -0800)]
poll: port to MSVC v18 on MS-Windows 8.1

Problem reported by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00139.html
* lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
* modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
Add sys_socket.

10 years agotests: support stderr verification with returns_()
Pádraig Brady [Mon, 16 Feb 2015 17:20:39 +0000 (17:20 +0000)]
tests: support stderr verification with returns_()

* tests/init.sh (returns_): Disable tracing for this wrapper
function, so that stderr of the wrapped command is unchanged,
allowing for verification of the contents.

10 years agopassfd: avoid valgrind uninitalised data warning
Pavel Hrdina [Tue, 24 Feb 2015 12:58:46 +0000 (12:58 +0000)]
passfd: avoid valgrind uninitalised data warning

Running libvirt using valgrind produced:
 Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
   at ??? (in /lib64/libpthread-2.19.so)
   by sendfd (passfd.c:86)
   by virNetSocketSendFD (virnetsocket.c:1766)
   by virNetServerClientDispatchWrite (virnetserverclient.c:1271)
   by virNetServerClientDispatchEvent (virnetserverclient.c:1371)
   by virEventPollDispatchHandles (vireventpoll.c:508)
   by virEventPollRunOnce (vireventpoll.c:657)
   by virEventRunDefaultImpl (virevent.c:308)
   by virNetServerRun (virnetserver.c:1139)
   by main (libvirtd.c:1491)
 Address 0xffefff3f4 is on thread 1's stack
 in frame #1, created by sendfd (passfd.c:51)

* lib/passfd.c (sendfd): Reset the msg_controllen of msghdr,
to include just the fd we've initialised, rather than including
the extra space used for alignment.

10 years agouniwbrk/u32-wordbreaks-tests: fix copyright
Paul Eggert [Mon, 23 Feb 2015 23:52:58 +0000 (15:52 -0800)]
uniwbrk/u32-wordbreaks-tests: fix copyright

* tests/uniwbrk/test-uc-wordbreaks.c: Fix copyright date.

10 years agodup2: doc and test for Android bug
Paul Eggert [Mon, 23 Feb 2015 18:34:40 +0000 (10:34 -0800)]
dup2: doc and test for Android bug

Reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00125.html
* doc/posix-functions/dup2.texi (dup2): Document the bug.
* m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.

10 years agoReplace dup2() on Android
Kevin Cernekee [Mon, 23 Feb 2015 17:38:14 +0000 (09:38 -0800)]
Replace dup2() on Android

* m4/dup2.m4 (gl_FUNC_DUP2): Android implements dup2() using dup3().
Since dup3(fd, fd) fails but dup2(fd, fd) should pass, test-dup2
fails.  Using rpl_dup2() fixes this because it has an explicit test
for this condition.

10 years agoAndroid doesn't define RLIM_SAVED_*
Paul Eggert [Mon, 23 Feb 2015 03:07:46 +0000 (19:07 -0800)]
Android doesn't define RLIM_SAVED_*

Portability problem reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00122.html
* doc/posix-headers/sys_resource.texi (sys/resource.h):
Mention the portability problem.
* lib/getdtablesize.c (RLIM_SAVED_CUR, RLIM_SAVED_MAX):
Define if not defined.
* m4/dup2.m4 (gl_FUNC_DUP2):
* m4/fcntl.m4 (gl_FUNC_FCNTL):
Likewise.

10 years agoautoupdate
Karl Berry [Sat, 21 Feb 2015 14:19:32 +0000 (06:19 -0800)]
autoupdate

10 years agovasnprintf-posix-tests: use consistent test
Paul Eggert [Sat, 21 Feb 2015 08:43:33 +0000 (00:43 -0800)]
vasnprintf-posix-tests: use consistent test

* tests/test-vasnprintf-posix.c (test_function):
Use "<" in assert instead of "<=", for consistency with other tests.

10 years agoprintf, isinf, etc.: noncanonical != NaN
Paul Eggert [Sat, 21 Feb 2015 02:09:47 +0000 (18:09 -0800)]
printf, isinf, etc.: noncanonical != NaN

Do not require that isinf, printf, etc. treat noncanonical
values as NaNs.  Instead, require only that they do not crash.
Problem reported by Joseph Myers in:
https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html
* doc/posix-functions/dprintf.texi (dprintf):
* doc/posix-functions/fprintf.texi (fprintf):
* doc/posix-functions/isfinite.texi (isfinite):
* doc/posix-functions/isinf.texi (isinf):
* doc/posix-functions/isnan.texi (isnan):
* doc/posix-functions/printf.texi (printf):
* doc/posix-functions/snprintf.texi (snprintf):
* doc/posix-functions/sprintf.texi (sprintf):
* doc/posix-functions/vdprintf.texi (vdprintf):
* doc/posix-functions/vfprintf.texi (vfprintf):
* doc/posix-functions/vprintf.texi (vprintf):
* doc/posix-functions/vsnprintf.texi (vsnprintf):
* doc/posix-functions/vsprintf.texi (vsprintf):
Document this.
* m4/isfinite.m4 (gl_ISFINITEL_WORKS):
* m4/isinf.m4 (gl_ISINFL_WORKS):
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS):
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE):
* tests/test-isfinite.c (test_isfinitel):
* tests/test-isinf.c (test_isinfl):
* tests/test-isnan.c (test_long_double):
* tests/test-isnanl.h (main):
* tests/test-snprintf-posix.h (test_function):
* tests/test-sprintf-posix.h (test_function):
* tests/test-vasnprintf-posix.c (test_function):
* tests/test-vasprintf-posix.c (test_function):
o Test only that noncanonical values do not cause crashes, not that
they are treated as NaNs.  In some cases this means a larger
output buffer is needed.

10 years agofts: remove redundant close() (trivial)
Jaroslav Skarvada [Fri, 20 Feb 2015 22:53:52 +0000 (22:53 +0000)]
fts: remove redundant close() (trivial)

* lib/fts.c (fts_read): Remove redundant call to close().
Spotted by coverity.

10 years agogetdtablesize: port better for Android
Paul Eggert [Fri, 20 Feb 2015 18:53:10 +0000 (10:53 -0800)]
getdtablesize: port better for Android

Problem reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00112.html
* doc/glibc-functions/getdtablesize.texi (getdtablesize): Mention bug.
* lib/getdtablesize.c (getdtablesize): Don't fall back on _SC_OPEN_MAX.
Instead, just use getrlimit, taking care to avoid Cygwin bug.

dup2, fcntl: cross-compile better for Android

10 years agopoll: fixes for large fds
Paul Eggert [Fri, 20 Feb 2015 18:37:49 +0000 (10:37 -0800)]
poll: fixes for large fds

* lib/poll.c (poll): Don't check directly for NFD too large.
Don't rely on undefined behavior in FD_SET when an arg exceeds
FD_SETSIZE.  Always set revents afterwards, even if to zero.
* tests/test-poll.c (poll1): Set revents to -1 instead of 0,
as that makes the test a bit stricter.

10 years agofcntl: Fix cross compiling
Kevin Cernekee [Thu, 19 Feb 2015 18:11:19 +0000 (10:11 -0800)]
fcntl: Fix cross compiling

* m4/fcntl.m4 (gl_FUNC_FCNTL): Assign the guessed result to the
correct variable name (gl_cv_func_fcntl_f_dupfd_works).

10 years agodup2, fcntl: cross-compiler better for Android
Paul Eggert [Thu, 19 Feb 2015 07:20:55 +0000 (23:20 -0800)]
dup2, fcntl: cross-compiler better for Android

Problem reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00109.html
* m4/dup2.m4 (gl_FUNC_DUP2): Don't guess no when cross-compiling
for a Linux kernel.  That kernel bug was fixed on 2009-05-11, and
there's little need to cross-compile for older kernels nowadays.
* m4/fcntl.m4 (gl_FUNC_FCNTL): When cross-compiling, guess no only
for systems where the bug is known to occur (AIX, Cygwin, Haiku).

10 years agogetopt: give accurate ambiguity diagnostic on mem exhaustion
Pádraig Brady [Wed, 18 Feb 2015 22:37:31 +0000 (22:37 +0000)]
getopt: give accurate ambiguity diagnostic on mem exhaustion

* lib/getopt.c (_getopt_internal_r): The previous commit broke
out the loop too early, which could give a false indication
of ambiguous options under memory exhaustion.

10 years agogetopt: don't crash on memory exhaustion
Pádraig Brady [Wed, 18 Feb 2015 02:23:35 +0000 (02:23 +0000)]
getopt: don't crash on memory exhaustion

* lib/getopt.c (_getopt_internal_r): Use degraded diagnostics on
memory exhaustion.  In the _LIBC case we use alloca() as is
already done in glibc, so we don't need to consider the separate
error path in that awkward case.  Also fix a memory leak when
ambiguous options are present.
Reported by Tobias Stoeckmann

10 years agotempname: allow compilation with C++ (trivial)
Mike Miller [Wed, 18 Feb 2015 06:04:51 +0000 (22:04 -0800)]
tempname: allow compilation with C++ (trivial)

* lib/tempname.h [C++]: Specify extern "C" linkage.
* lib/tempname.h (try_tempname):
* lib/tempname.c (__try_tempname, __gen_tempname):
Rename 'try' to 'tryfunc'.

10 years agodup2, fcntl: port to AIX
Paul Eggert [Wed, 18 Feb 2015 02:34:17 +0000 (18:34 -0800)]
dup2, fcntl: port to AIX

* m4/dup2.m4 (gl_FUNC_DUP2):
* m4/fcntl.m4 (gl_FUNC_FCNTL):
Prefer getrusage (RLIM_NOFILE ...)/rlim_cur to sysconf (_SC_OPEN_MAX).
The former works on AIX 7.1 but the latter does not.
Also, this may work better with Android; see:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00100.html

10 years agogetdtablesize, dup2, fcntl: port to Android
Paul Eggert [Tue, 17 Feb 2015 05:38:02 +0000 (21:38 -0800)]
getdtablesize, dup2, fcntl: port to Android

Problem reported by Kevin Cernekee in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00092.html
* doc/glibc-functions/getdtablesize.texi (getdtablesize):
Mention that getdtablesize doesn't work on Android.
* lib/getdtablesize.c: Use getrlimit substitute only if
getdtablesize is declared.  This should suffice for Cygwin
while not breaking Android.
* m4/dup2.m4 (gl_FUNC_DUP2):
* m4/fcntl.m4 (gl_FUNC_FCNTL):
Prefer sysconf (_SC_OPEN_MAX) to getdtablesize, as the former is
standardized but the latter is not, and sysconf works on Android.
* m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE):
Also check that getdtablesize is declared.
This removes the need for a special case for Android.

10 years agolocalename: Implement gl_locale_name_thread_unsafe for Android
Kevin Cernekee [Tue, 17 Feb 2015 01:26:49 +0000 (17:26 -0800)]
localename: Implement gl_locale_name_thread_unsafe for Android

* lib/localename.c: Android API level >= 21 supports two hardcoded
locales: C (POSIX) and C.UTF-8.  Distinguish them by checking
the internal __locale_t struct.

10 years agoMore changelog fixes
Kevin Cernekee [Tue, 17 Feb 2015 05:38:56 +0000 (21:38 -0800)]
More changelog fixes

10 years agofts: avoid crash when a cycle is added while traversing
Kamil Dudka [Wed, 11 Feb 2015 17:41:43 +0000 (18:41 +0100)]
fts: avoid crash when a cycle is added while traversing

This could be triggered by auto-mounting a recursive bind mount.
Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498
* lib/fts.c (fts_read): Avoid removing the original hash table item
when leaving a directory that caused a cycle, and preserve the FTS_DC
flag.

10 years agouniname/uniname: support character alias
Daiki Ueno [Mon, 16 Feb 2015 06:44:14 +0000 (15:44 +0900)]
uniname/uniname: support character alias

* lib/uniname/gen-uninames.lisp (main): New argument ALIASFILE.
Generate one-way mapping from aliases to codepoints in the
generated tables.  Special case variation selectors to reduce
table size.
* lib/uniname/uniname.c (unicode_character_name): Special case
variation selectors.
(unicode_name_character): Special case variation selectors and
their aliases.
* lib/uniname/uninames.h: Regenerate.
* tests/uniname/NameAliases.txt: New file, taken from UCD 7.0.0.
* modules/uniname/uniname-tests (Files): Add
tests/uniname/NameAliases.txt.
* tests/uniname/test-uninames.c: Mark as static.
(ALIASLEN): Define.
(struct unicode_alias): New struct.
(unicode_aliases): New variable.
(fill_aliases): New function.
(test_alias_lookup): New test function.
(main): Run the 'test_alias_lookup' test if the second argument is
given.
* tests/uniname/test-uninames.sh: Supply NameAliases.txt as the
second argument.

10 years agoFix ChangeLog botches in my recent commits
Paul Eggert [Thu, 12 Feb 2015 06:19:01 +0000 (22:19 -0800)]
Fix ChangeLog botches in my recent commits

10 years agoduplocale: Fix Android build of duplocale-tests
Kevin Cernekee [Wed, 11 Feb 2015 23:22:58 +0000 (15:22 -0800)]
duplocale: Fix Android build of duplocale-tests

* modules/duplocale-tests (Depends-on): Add langinfo, as the header
is included by test-duplocale.c (but not by duplocale.c).
* modules/duplocale-tests (configure.ac): Check for monetary.h.
* tests/test-duplocale.c: Skip test if monetary.h is absent.
* doc/posix-headers/monetary.texi: Add Android to the list of
platforms missing monetary.h.

10 years agosignal_h: Fix Android build
Kevin Cernekee [Wed, 11 Feb 2015 23:22:57 +0000 (15:22 -0800)]
signal_h: Fix Android build

* lib/signal.in.h: Add Android to the list of platforms that declare
pthread_sigmask() in <pthread.h> instead of <signal.h>.

10 years agonet_if: Handle content-free <net/if.h> system headers
Kevin Cernekee [Wed, 11 Feb 2015 23:22:56 +0000 (15:22 -0800)]
net_if: Handle content-free <net/if.h> system headers

* m4/net_if_h.m4: Check to make sure <net/if.h> actually defines
struct if_nameindex.  If not, enable the replacement header.

10 years agolinkat_nofollow: Add fallback case for cross compiling
Kevin Cernekee [Wed, 11 Feb 2015 23:22:55 +0000 (15:22 -0800)]
linkat_nofollow: Add fallback case for cross compiling

* m4/linkat.m4: Guess no for Darwin, yes otherwise.

10 years agoeuidaccess: Fix Android build
Kevin Cernekee [Wed, 11 Feb 2015 23:22:54 +0000 (15:22 -0800)]
euidaccess: Fix Android build

* modules/euidaccess (Depends-on): Add fcntl-h to ensure that
AT_EACCESS gets declared.

10 years agogetugroups: Fix Android build
Kevin Cernekee [Wed, 11 Feb 2015 23:22:53 +0000 (15:22 -0800)]
getugroups: Fix Android build

* lib/getugroups.c: Don't reference unsupported {get,set,end}grent
functions.

10 years agolocalename: Fix Android build
Kevin Cernekee [Wed, 11 Feb 2015 23:22:52 +0000 (15:22 -0800)]
localename: Fix Android build

* modules/localename (Depends-on): Add langinfo.

10 years agogetdtablesize: Fix Android build
Kevin Cernekee [Wed, 11 Feb 2015 23:22:51 +0000 (15:22 -0800)]
getdtablesize: Fix Android build

* m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
versions have this symbol in the .so library (at least 32-bit
platforms) but are missing the declaration in the header file,
causing the m4 logic to guess incorrectly.

10 years agoAssume unbroken ungetc() on Android
Kevin Cernekee [Wed, 11 Feb 2015 23:22:50 +0000 (15:22 -0800)]
Assume unbroken ungetc() on Android

* m4/ungetc.m4: Add Android case to host OS check.  The ungetc()
test case passed when running on an Android host, and the code
hasn't really changed since 2009.

10 years agoFix FILE struct compatibility with Android API level >= 21
Kevin Cernekee [Wed, 11 Feb 2015 23:22:49 +0000 (15:22 -0800)]
Fix FILE struct compatibility with Android API level >= 21

* lib/stdio-impl.h: Test explicitly for __ANDROID__ instead of
__sferror.  Recent versions of Bionic's stdio.h no longer define
__sferror.
* lib/fbufmode.c: Likewise.
* lib/fflush.c: Likewise.
* lib/fpurge.c: Likewise.
* lib/freadable.c: Likewise.
* lib/freadahead.c: Likewise.
* lib/freading.c: Likewise.
* lib/freadptr.c: Likewise.
* lib/freadseek.c: Likewise.
* lib/fseeko.c: Likewise.
* lib/fseterr.c: Likewise.
* lib/fwritable.c: Likewise.
* lib/fwriting.c: Likewise.

10 years agotests: avoid recent -Werror=unused-variable regression in test-locale
Pádraig Brady [Wed, 11 Feb 2015 03:52:57 +0000 (03:52 +0000)]
tests: avoid recent -Werror=unused-variable regression in test-locale

* tests/test-locale.c (main): Reference the variable to avoid the
"unused variable" warning.