]> Savannah Git Hosting - gnulib.git/log
gnulib.git
9 years agoautoupdate
Karl Berry [Wed, 8 Jul 2015 13:23:50 +0000 (06:23 -0700)]
autoupdate

9 years agolocalename: fix link error on Illumos
Daiki Ueno [Tue, 7 Jul 2015 06:36:43 +0000 (15:36 +0900)]
localename: fix link error on Illumos

Illumos defines __sun, but does not have getlocalename_l nor the
equivalent.  This partially reverts commit 387c214.
* m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
available, as well as uselocale.
* lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
use getlocalename_l if it is not available.

9 years agounistr/uN-strtok-tests: avoid a trivial leak
Daiki Ueno [Tue, 7 Jul 2015 06:12:52 +0000 (15:12 +0900)]
unistr/uN-strtok-tests: avoid a trivial leak

* tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
input and delim after the multibyte delimiter tests.

9 years agoacl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls
Andreas Gruenbacher [Sun, 5 Jul 2015 20:46:11 +0000 (22:46 +0200)]
acl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls

* lib/set-permissions.c (set_acls): Document where support for FreeBSD
ACL_TYPE_NFS4 acls should go.
* lib/get-permissions.c (get_permissions): Likewise.

9 years agoacl-permissions: Fix on FreeBSD
Andreas Gruenbacher [Tue, 30 Jun 2015 19:09:28 +0000 (21:09 +0200)]
acl-permissions: Fix on FreeBSD

When a directory doesn't have an ACL_TYPE_DEFAULT acl, acl_get_file will return
an empty acl, but when trying to set that acl, FreeBSD's acl_set_file will fail
with errno == EINVAL.  Instead, FreeBSD expects acl_delete_def_file to be used.
* lib/acl-internal.c (acl_default_nontrivial): Recognize empty default acls.
* lib/set-permissions.c (set_acls): Avoid calling acl_set_file for empty
ACL_TYPE_DEFAULT acls.

9 years agofile-has-acl, acl-permissions: fix some more HP-UX typos
Andreas Gruenbacher [Tue, 30 Jun 2015 19:09:28 +0000 (21:09 +0200)]
file-has-acl, acl-permissions: fix some more HP-UX typos

Problem reported by John David Anglin in: http://bugs.gnu.org/20979
* lib/set-permissions.c (context_acl_from_mode): Fix some more obvious
typos introduced by the recent ACL changes.

9 years agofile-has-acl, acl-permissions: fix HP-UX typos
Paul Eggert [Sat, 4 Jul 2015 18:05:00 +0000 (11:05 -0700)]
file-has-acl, acl-permissions: fix HP-UX typos

Problem reported by John David Anglin in: http://bugs.gnu.org/20979
* lib/file-has-acl.c (file_has_acl):
* lib/set-permissions.c (context_acl_from_mode)
(context_aclv_from_mode, set_acls):
Fix some obvious typos when HAVE_GETCL /* HP-UX */.
They were introduced by the recent ACL changes.

9 years agoregex: match current GNU grep behavior
Paul Eggert [Sat, 4 Jul 2015 15:25:21 +0000 (08:25 -0700)]
regex: match current GNU grep behavior

These symbols have not matched GNU grep behavior for quite some time.
Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
* lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
Change to match current GNU behavior.
Simplify by expressing it as differences from POSIX BREs and EREs.
(RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.

9 years agoset-permissions.c: adjust acl_from_mode's cpp guard
Jim Meyering [Fri, 3 Jul 2015 21:58:19 +0000 (14:58 -0700)]
set-permissions.c: adjust acl_from_mode's cpp guard

* lib/set-permissions.c (acl_from_mode): Guard with #ifdef
directives identical to those guarding the sole use.
Otherwise, on some systems, we'd get a warning about
the function being defined but not used.
Also, filter through cppi to correct misleading indentation
of cpp directives.

9 years agoautoupdate
Karl Berry [Fri, 3 Jul 2015 22:31:16 +0000 (15:31 -0700)]
autoupdate

9 years agotests: restrict shells to those that support 'local'
Pádraig Brady [Fri, 3 Jul 2015 13:52:47 +0000 (14:52 +0100)]
tests: restrict shells to those that support 'local'

The local keyword is very widely supported and used
in tests in coreutils and grep at least.  Therefore
restrict to testing with shells that support it.
This mainly excludes /bin/sh on Solaris.
Note standard ksh also doesn't support this keyword,
but that wasn't in the list of considered shells anyway.
For discussion on adding 'local' to POSIX, see:
http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/122267/focus=3271

* tests/init.sh (gl_shell_test_script_): Add a test for 'local'.

9 years agofix mistakes in ChangeLog entries
Daiki Ueno [Fri, 3 Jul 2015 03:00:44 +0000 (12:00 +0900)]
fix mistakes in ChangeLog entries

9 years agounistr/uN-strtok: handle multibyte delimiters
Seiya Kawashima [Fri, 3 Jul 2015 02:42:43 +0000 (11:42 +0900)]
unistr/uN-strtok: handle multibyte delimiters

Previously, uN_strtok moved PTR to the next unit to the token end.
When DELIM contained a multibyte character, the new position could
be a middle of a multibyte character.
* lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
after the token.
* lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
* modules/unistr/u8-strtok (Depends-on): Depend on
unistr/u8-strmblen.
* modules/unistr/u16-strtok (Depends-on): Depend on
unistr/u16-strmblen.
* modules/unistr/u32-strtok (Depends-on): Depend on
unistr/u32-strmblen.
* tests/unistr/test-u-strtok.h: New file.
* tests/unistr/test-u8-strtok.c: New file.
* tests/unistr/test-u16-strtok.c: New file.
* tests/unistr/test-u32-strtok.c: New file.
* modules/unistr/u8-strtok-tests: New file.
* modules/unistr/u32-strtok-tests: New file.
* modules/unistr/u16-strtok-tests: New file.
Copyright-paperwork-exempt: yes
Co-authored-by: Daiki Ueno <ueno@gnu.org>
9 years agoupdate-copyright: fix test failure with perl >= 5.22
Friedrich Haubensak [Thu, 2 Jul 2015 13:36:33 +0000 (14:36 +0100)]
update-copyright: fix test failure with perl >= 5.22

* build-aux/update-copyright: Escape a literal left curly bracket,
required with perl >= 5.22

9 years agou{16,32}-strstr-tests: relax timeout condition
Daiki Ueno [Thu, 2 Jul 2015 07:48:24 +0000 (16:48 +0900)]
u{16,32}-strstr-tests: relax timeout condition

On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr tests can
take longer than 5 seconds to complete.
Reported by Dagobert Michelsen in:
https://lists.gnu.org/archive/html/bug-libunistring/2015-06/msg00006.html
* tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
seconds to 10 seconds.
* tests/unistr/test-u32-strstr.c (main): Likewise.

9 years agognulib-common.m4: change the ARFLAGS default to 'cr'
Pavel Raiskup [Wed, 1 Jul 2015 07:38:35 +0000 (09:38 +0200)]
gnulib-common.m4: change the ARFLAGS default to 'cr'

In some GNU/Linux distributions people started to compile 'ar'
binary with --enable-deterministic-archives (binutils project).
That, however, in combination with previous autotools long time
working default AR{_,}FLAGS=cru causes warnings on such
installations:
ar: `u' modifier ignored since `D' is the default (see `U')

The 'u' option (at least with GNU binutils) did small optimization
during repeated builds because it instructed 'ar' to not
open/close unchanged *.o files and to rather read their contents
from old archive file.  However, its removal should not cause a
big performance hit for usual workflows.

Distributions started using --enable-deterministic-archives
knowing that it will disable the 'u', with the benefit of having
rather a bit more deterministic builds.

Also, to justify this change a bit more, keeping 'u' in ARFLAGS
could only result in many per-project changes to override
Automake's ARFLAGS default, just to silent such warnings.

* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
set already.

9 years agoupdate from texinfo
Karl Berry [Wed, 1 Jul 2015 14:25:52 +0000 (07:25 -0700)]
update from texinfo

9 years agoautoupdate
Karl Berry [Wed, 1 Jul 2015 13:53:25 +0000 (06:53 -0700)]
autoupdate

9 years agoselinux-h: avoid double free after *getfilecon()
Pavel Raiskup [Wed, 1 Jul 2015 10:30:57 +0000 (12:30 +0200)]
selinux-h: avoid double free after *getfilecon()

Originally reported by Ben Shelton on bug-tar:
http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00009.html

* lib/getfilecon.c (map_to_failure): Set the already freed '*con'
pointer to NULL.  Man getfilecon(3) says that any non-NULL '*con'
parameter should be freed by freecon(3) (regardless the return
value).

9 years agofix pty related tests issues on Windows
Pavel Fedin [Wed, 1 Jul 2015 07:18:11 +0000 (10:18 +0300)]
fix pty related tests issues on Windows

* lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows,
however it's still present in tests/ subdirectory of the final project.
Therefore avoid it to pass `make check`.
* tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty()
will just return -ENOSYS, so avoid this non applicable test allowing
the build to proceed.

9 years agoacl: fix definition of acl_from_mode on FreeBSD
Pádraig Brady [Tue, 30 Jun 2015 19:35:26 +0000 (20:35 +0100)]
acl: fix definition of acl_from_mode on FreeBSD

This was causing basic coreutils copy operations to fail
with ENOTSUP or ENOENT error messages.

* lib/acl-internal.h (acl_from_mode): Only define when
! defined HAVE_ACL_FROM_TEXT.  That allows the version
of acl_from_mode() defined in lib/set-permissions.c to
be used on FreeBSD at least.
* lib/set-permissions.c: Fix up comment spelling,
and a redundant variable assignment; noticed in passing.

9 years agoreadutmp: port to FreeBSD >= 9
Pádraig Brady [Tue, 30 Jun 2015 21:01:06 +0000 (22:01 +0100)]
readutmp: port to FreeBSD >= 9

* lib/readutmp.h: Map utmpxname() to setutxdb().
With that coreutils who(1) and pinky(1) tests pass.

9 years agomgetgroups: port to strict OS X
Paul Eggert [Tue, 30 Jun 2015 16:32:07 +0000 (09:32 -0700)]
mgetgroups: port to strict OS X

The previous fix wasn't working, so use a bigger hammer (Bug#20923).
* lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics.
(getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove.  All uses removed.
* m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.

9 years agomgetgroups: fix port to strict OS X
Paul Eggert [Tue, 30 Jun 2015 02:12:07 +0000 (19:12 -0700)]
mgetgroups: fix port to strict OS X

* m4/mgetgroups.m4 (gl_MGETGROUPS):
Use more-sensitive -Werror setting if available.

9 years agolinkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X
Jim Meyering [Mon, 29 Jun 2015 17:05:31 +0000 (10:05 -0700)]
linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X

It started like this when building coreutils' latest on OS X,
invoking ./configure with a nonempty --cache=.cache:

  lib/linkat.c:46:42: error: operator '||' has no right operand
  lib/linkat.c: In function 'rpl_linkat':
  lib/linkat.c:330:27: error: #if with no expression

Here's linkat.c's line 46:

  #if !HAVE_LINKAT || LINKAT_SYMLINK_NOTSUP

Here's some context:

  $ grep linkat_nofoll .cache
  gl_cv_func_linkat_nofollow=${gl_cv_func_linkat_nofollow=no}
  $ grep LINKAT_SYM lib/config.h
  #define LINKAT_SYMLINK_NOTSUP

The problem is that m4/linkat.m4's gl_FUNC_LINKAT
uses AC_CACHE_CHECK to set LINKAT_SYMLINK_NOTSUP,
but that violates a tenet of AC_CACHE_CHECK: it must
have no side effect other than setting its cache variable.

What happens is that when the cache is set, we'd skip the
code in that AC_CACHE_CHECK call, and leave LINKAT_SYMLINK_NOTSUP
defined to whatever value it happened to have in configure's
environment.  In my case, it was not defined, so this later code:

  AC_DEFINE_UNQUOTED([LINKAT_SYMLINK_NOTSUP], [$LINKAT_SYMLINK_NOTSUP],
    [Define to 1 if linkat can create hardlinks to symlinks])

would emit code with an empty RHS.

* m4/linkat.m4 (gl_FUNC_LINKAT): Move the setting of
$LINKAT_SYMLINK_NOTSUP out of the AC_CACHE_CHECK code block.

9 years agomgetgroups: port to strict OS X
Paul Eggert [Mon, 29 Jun 2015 06:43:35 +0000 (23:43 -0700)]
mgetgroups: port to strict OS X

* doc/glibc-functions/getgrouplist.texi (getgrouplist):
Document the getgrouplist problem.
* lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]:
New macro.
(mgetgroups): Use it.
* m4/mgetgroups.m4 (gl_MGETGROUPS):
Check for OS X signature for getgrouplist.

9 years agomountlist: avoid an unused-label warning on OS X
Jim Meyering [Sun, 28 Jun 2015 20:11:04 +0000 (13:11 -0700)]
mountlist: avoid an unused-label warning on OS X

* lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]:
Building on OS X, I saw a warning about the "free_then_fail" label
being unused.  Give it the _GL_UNUSED_LABEL attribute.

9 years agoerror.c: correct printf-style format: %d -> %u
Jim Meyering [Sun, 28 Jun 2015 17:38:46 +0000 (10:38 -0700)]
error.c: correct printf-style format: %d -> %u

* lib/error.c (error_at_line): Correct __fxprintf format to use %u,
rather than %d, to match the type of "line_number", unsigned int.

9 years agofts: avoid reading beyond the heap allocation
Pádraig Brady [Wed, 24 Jun 2015 22:52:24 +0000 (23:52 +0100)]
fts: avoid reading beyond the heap allocation

GCC 5.1.1 with -O2 and -fsanitize=address reports
the following from `chmod a+rx ..` for example:

  ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200000be48
  READ of size 4 at 0x61200000be48 thread T0
    #0 0x40f0a1 in fts_stat lib/fts.c:1821
    #1 0x4141ec in fts_open lib/fts.c:514
    #2 0x40ca6e in xfts_open lib/xfts.c:36
    #3 0x402c35 in process_files src/chmod.c:336
    #4 0x402c35 in main src/chmod.c:566
    #5 0x7f8fdc38678f in __libc_start_main (/lib64/libc.so.6+0x2078f)
    #6 0x404608 in _start (/home/padraig/git/coreutils/src/chmod+0x404608)

  0x61200000be4b is located 0 bytes to the right of
  267-byte region [0x61200000bd40,0x61200000be4b) allocated by thread T0 here:
    #0 0x7f8fdd4cfa0a in malloc (/lib64/libasan.so.2+0x98a0a)
    #1 0x40f22c in fts_alloc lib/fts.c:1916

The read of size 4 from a heap object of size 3 is indeed invalid,
though this may be due to incorrect padding assumptions by GCC, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661

The read is coming from the a[2] access in ISDOT() which GCC seems
to assume can access according to the alignment of the main structure,
since the flexible array members are being accessed directly.
One could cast the parameter to ISDOT() to (char const*) to restrict
to byte at a time access, however it seems more correct and maintainable
to increase the buffer size to the appropriate alignment to avoid this issue.
For reference some notes on alignment and flexible array members are at:
https://sites.google.com/site/embeddedmonologue/home/c-programming/data-alignment-structure-padding-and-flexible-array-member

* lib/fts.c (fts_alloc): Increase allocation to alignof(FTSENT).
* modules/fts: Depend on stdalign.

9 years agosavedir: avoid undefined behavior in qsort call
Pádraig Brady [Wed, 24 Jun 2015 18:08:08 +0000 (19:08 +0100)]
savedir: avoid undefined behavior in qsort call

GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
"runtime error: null pointer passed as argument 1,
 which is declared to never be null"
* lib/savedir.c (streamsavedir): Avoid the call with no entries.

9 years agouserspec: avoid undefined behavior in gettext call
Pádraig Brady [Wed, 24 Jun 2015 16:54:16 +0000 (17:54 +0100)]
userspec: avoid undefined behavior in gettext call

GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
"runtime error: null pointer passed as argument 2,
 which is declared to never be null"

* lib/userspec.c (parse_with_separator): Avoid passing NULL to gettext()

9 years agoupdate from texinfo
Karl Berry [Wed, 24 Jun 2015 22:41:35 +0000 (15:41 -0700)]
update from texinfo

9 years agogitlog-to-changelog: improve gitmerge.el commits
Glenn Morris [Sat, 20 Jun 2015 17:09:22 +0000 (10:09 -0700)]
gitlog-to-changelog: improve gitmerge.el commits

Let the Emacs ChangeLog generation process exclude "skipped"
messages from merge commits (Bug#20717).
* build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.

9 years agowchar: fix MinGW compilation warnings
Paul Eggert [Sat, 20 Jun 2015 16:57:08 +0000 (09:57 -0700)]
wchar: fix MinGW compilation warnings

This lets Texinfo compile cleanly.  See Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-06/msg00050.html
* lib/wchar.in.h: Do not use special invocation convention on MinGW.

9 years agouniname/uniname-tests: use pristine data files
Daiki Ueno [Sat, 20 Jun 2015 06:33:07 +0000 (15:33 +0900)]
uniname/uniname-tests: use pristine data files

For copyright and maintenance reasons, use the data files from UCD
without modification.
* tests/uniname/test-uninames.c (FIELDLEN): Remove.
(getfield): Remove.
(aliases_count): New global variable.
(fill_names): Skip comments and empty lines in the input.  Don't
use getfield.
(fill_aliases): Likewise.
(main): Change the expected command line arguments to:
NAMES... ["--" ALIASES...].
* tests/uniname/test-uninames.sh: Adjust to the change in
test-uninames.c.
* tests/uniname/UnicodeDataNames.txt: Remove.
* tests/uniname/UnicodeData.txt: New file, from Unicode 8.0.0.
* tests/uniname/NameAliases.txt: Use the pristine copy of the data
file from Unicode 8.0.0.

9 years agolinked-list, linkedhash-list: avoid compiler warnings
Pádraig Brady [Fri, 19 Jun 2015 13:06:17 +0000 (14:06 +0100)]
linked-list, linkedhash-list: avoid compiler warnings

* lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
-Werror=suggest-attribute=pure (from GCC 5.1.1).

9 years agolibunistring: bump minimum version to 0.9.6
Daiki Ueno [Fri, 19 Jun 2015 05:31:19 +0000 (14:31 +0900)]
libunistring: bump minimum version to 0.9.6

The modules are listed by a script that does:
* all modules depending on updated Unicode data: Regenerate.
The modules are listed by a script that does:
- for each file listed by: git show --oneline --name-only 705f4efc
  - deduce the containing modules, based on "Files:"
- deduce the modules which depend on the containing modules, based
  on "Depends-on:"

9 years agouniname/uniname: update to Unicode 8.0.0
Daiki Ueno [Thu, 18 Jun 2015 09:03:53 +0000 (18:03 +0900)]
uniname/uniname: update to Unicode 8.0.0

* lib/uniname/uninames.h: Regenerate.
* tests/uniname/NameAliases.txt: Update from Unicode 8.0.0.
* tests/uniname/UnicodeDataNames.txt: Update from Unicode 8.0.0.

9 years ago* lib/gen-uni-tables.c: Style fixes.
Daiki Ueno [Thu, 18 Jun 2015 08:58:24 +0000 (17:58 +0900)]
* lib/gen-uni-tables.c: Style fixes.

9 years agolibunistring: update to Unicode 8.0.0
Daiki Ueno [Thu, 18 Jun 2015 08:34:54 +0000 (17:34 +0900)]
libunistring: update to Unicode 8.0.0

* lib/gen-uni-tables.c (SIZEOF): New macro.
(output_numeric): Increase the maximum number of fractions from
128 to 160.  Increase the level3 value width from 7 bits to 8
bits.  Use SIZEOF instead of a hard-coded integer.
(output_blocks): Decrease the cut-off threshold from 0x30000 to
0x28000.
(fill_blocks): Increase the maximum number of blocks from 256 to
384.  Use SIZEOF instead of a hard-coded integer.
(get_lbp): Adjust to new characters added in Unicode 8.0.0.
* lib/unictype/numeric.c (uc_numeric_value): Adjust the level3
value width.
* lib/unilbrk/lbrktables.c (unilbrk_table): Implement LBP21b and
a new case added to LBP22.
* lib/uniwidth/width.c (nonspacing_table_data): Add U+08E3,
U+A69E, U+FE2E..U+FE2F, U+111CA..U+111CC, U+11300,
U+115DC..U+115DD, U+1171D..U+1171F, U+11722..U+11725,
U+11727..U+1172B, U+1DA00..U+1DA36, U+1DA3B..U+1DA6C, U+1DA75,
U+1DA84, U+1DA9B..U+1DA9F, and U+1DAA1..U+1DAAF.
* tests/uniwidth/test-uc_width2.sh: Same updates as in
lib/uniwidth/width.c.
* all generated files under lib/uni* and tests/uni*: Regenerate.

9 years agognu-web-doc-update: add --mirror to remove stale files
Pádraig Brady [Tue, 16 Jun 2015 05:39:42 +0000 (06:39 +0100)]
gnu-web-doc-update: add --mirror to remove stale files

* build-aux/gnu-web-doc-update: Add a --mirror option to remove
out of date files from the CVS server.  Since this is usually
appropriate, a prompt is given when the option is not specified,
along with the `cvs remove` command that would be run.

9 years ago* lib/set-permissions.c: Spelling fix.
Paul Eggert [Mon, 15 Jun 2015 05:50:18 +0000 (22:50 -0700)]
* lib/set-permissions.c: Spelling fix.

9 years agoupdate from texinfo
Karl Berry [Sun, 14 Jun 2015 22:34:45 +0000 (15:34 -0700)]
update from texinfo

9 years agoacl-permissions: pacify -Wsuggest-attribute=const
Paul Eggert [Sun, 7 Jun 2015 01:20:40 +0000 (18:20 -0700)]
acl-permissions: pacify -Wsuggest-attribute=const

Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
* lib/acl-internal.h (free_permission_context):
Declare with attribute const if ! (defined USE_ACL &&
(HAVE_ACL_GET_FILE || defined GETACL)).

9 years agofsync: document AIX misbehavior
Paul Eggert [Sat, 6 Jun 2015 07:56:01 +0000 (00:56 -0700)]
fsync: document AIX misbehavior

* doc/posix-functions/fsync.texi (fsync):
Document failure on AIX with read-only file descriptor.

9 years agoacl-permissions: more porting to AIX
Paul Eggert [Fri, 5 Jun 2015 18:47:37 +0000 (11:47 -0700)]
acl-permissions: more porting to AIX

* lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]:
* lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]:
* lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]:
Add cast for AIX, whose system calls are declared to accept
char * even though the arguments are really char const *.
* lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]:
Rework types to pacify xlc.

9 years agostdio: Don't redefine gets when using C++
Jonathan Perkin [Thu, 4 Jun 2015 11:10:34 +0000 (12:10 +0100)]
stdio: Don't redefine gets when using C++

We've hit this failure a few times in pkgsrc with packages which embed gnulib,
an example being the latest gnutls:

  ../../src/gl/stdio.h:1034:1: error: 'char* gets(char*)' conflicts with a previous declaration
   _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
   ^

  /opt/tools/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.2/include-fixed/iso/stdio_iso.h:259:14: note: previous declaration 'char* std::gets(char*)'
   extern char *gets(char *);
                ^

Full build log is here:

  http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-trunk32/20150602.2233/gnutls-3.3.15/build.log

We've fixed it a few different ways over time:

  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/devel/m4/patches/patch-lib_stdio.in.h
  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/math/octave/patches/patch-libgnu_stdio.in.h
  https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/security/gnutls/patches/patch-gl_stdio.in.h

but the cleanest fix appears to be the last, so I am proposing it here for
inclusion upstream.

Message-Id: <20150604111034.GG66573@joyent.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoacl-permissions: add a cast to port to older AIX
Paul Eggert [Fri, 5 Jun 2015 15:20:21 +0000 (08:20 -0700)]
acl-permissions: add a cast to port to older AIX

9 years agoacl-permissions: port to older AIX, C89 HP-UX
Paul Eggert [Fri, 5 Jun 2015 14:50:51 +0000 (07:50 -0700)]
acl-permissions: port to older AIX, C89 HP-UX

* lib/get-permissions.c (get_permissions):
If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99.
If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl
that broke a build, reported by Michael Felt.

9 years agoupdate from texinfo
Karl Berry [Wed, 3 Jun 2015 23:08:10 +0000 (16:08 -0700)]
update from texinfo

9 years agovasprintf-posix: avoid compiling vasnprintf where possible
Pádraig Brady [Wed, 3 Jun 2015 03:38:03 +0000 (04:38 +0100)]
vasprintf-posix: avoid compiling vasnprintf where possible

* modules/vasprintf-posix: Avoid compiling the large vasnprintf
module where not required.  For example on a GNU/Linux system
when gnulib-tool is run with the --conditional-dependencies option.

9 years agofile-has-acl: fix build on Mac OS X 10
Pádraig Brady [Mon, 1 Jun 2015 23:53:48 +0000 (00:53 +0100)]
file-has-acl: fix build on Mac OS X 10

This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4
which has an incompatible 6 parameter getxattr() call.

* doc/glibc-functions/getxattr.texi: Mention the divergent getxattr()
call on Mac OS X >= 10.4.
* doc/glibc-functions/fgetxattr.texi: Likewise.
* lib/file-has-acl.c: Revert to more complete combined check.
* m4/acl.m4 (gl_FILE_HAS_ACL): Likewise.
Reported by Jack Howarth.

9 years agoprefix-gnulib-mk: remove no longer needed special case
Pádraig Brady [Mon, 1 Jun 2015 23:06:52 +0000 (00:06 +0100)]
prefix-gnulib-mk: remove no longer needed special case

* build-aux/prefix-gnulib-mk (prefix): Since commit e3704b9c,
continued lib_SOURCES lines are no longer present,
so special case handling of such entries is not required.

9 years agoacl: don't depend on the deprecated qacl module
Pádraig Brady [Mon, 1 Jun 2015 22:59:36 +0000 (23:59 +0100)]
acl: don't depend on the deprecated qacl module

* modules/acl (Depends-on): Use q{copy,set}-acl instead.

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