gnulib.git
11 years agofts: when there is no risk of overlap, use memcpy, not memmove
Jim Meyering [Tue, 4 Sep 2012 09:31:09 +0000 (11:31 +0200)]
fts: when there is no risk of overlap, use memcpy, not memmove

* lib/fts.c (fts_alloc): Fix unjustified memmove: s/memmove/memcpy/

11 years agoautoupdate
Karl Berry [Mon, 3 Sep 2012 00:23:28 +0000 (17:23 -0700)]
autoupdate

11 years agoautoupdate
Karl Berry [Mon, 3 Sep 2012 00:23:01 +0000 (17:23 -0700)]
autoupdate

11 years agomanywarnings: update the list of "all" warnings
Jim Meyering [Wed, 30 Nov 2011 13:25:35 +0000 (14:25 +0100)]
manywarnings: update the list of "all" warnings

* m4/manywarnings.m4: Unite lists, and add many new options.
* build-aux/gcc-warning: New file.

Run this command with the latest gcc to see if they have added
options not yet on our list:

gl=.; comm -1 -3 \
  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' $gl/m4/manywarnings.m4 |sort) \
  <(gcc --help=warnings|sed -n 's/^  \(-[^ ]*\) .*/\1/p' |sort \
    |grep -v --line-regexp -f <(cut -f1 $gl/build-aux/gcc-warning.spec))

11 years ago* lib/stdbool.in.h (_Bool) [__cplusplus]: bool, not _Bool.
Paul Eggert [Thu, 30 Aug 2012 00:43:04 +0000 (17:43 -0700)]
* lib/stdbool.in.h (_Bool) [__cplusplus]: bool, not _Bool.

11 years agostdbool: be more compatible with mixed C/C++ compiles
Paul Eggert [Wed, 29 Aug 2012 14:52:32 +0000 (07:52 -0700)]
stdbool: be more compatible with mixed C/C++ compiles

* lib/stdbool.in.h (_Bool, true, false) [__cplusplus]:
Define to bool, true, false, respectively, as GCC's builtin
stdbool.h does.  Problem reported by Michael Goffioul in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00143.html>.

11 years agorevert last change: it was not needed
Jim Meyering [Tue, 28 Aug 2012 11:56:25 +0000 (13:56 +0200)]
revert last change: it was not needed

* tests/test-vc-list-files-git.sh: There's already a test for
a working git, just below.

11 years agotests: test-vc-list-files-git.sh: skip if git is not available
Jim Meyering [Tue, 28 Aug 2012 11:49:37 +0000 (13:49 +0200)]
tests: test-vc-list-files-git.sh: skip if git is not available

* tests/test-vc-list-files-git.sh: Skip this test when git is
not available.

11 years agognulib-tool: Remove no-op option --no-changelog.
Bruno Haible [Sun, 26 Aug 2012 15:04:56 +0000 (17:04 +0200)]
gnulib-tool: Remove no-op option --no-changelog.

* gnulib-tool (func_usage): Don't mention --no-changelog.
(do_changelog): Remove variable.
Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.

11 years agoautoupdate
Karl Berry [Sat, 25 Aug 2012 15:39:03 +0000 (08:39 -0700)]
autoupdate

11 years agodoc: remove fdl-1.2.texi
Paul Eggert [Fri, 24 Aug 2012 23:42:56 +0000 (16:42 -0700)]
doc: remove fdl-1.2.texi

It is no longer used or maintained, and its use of @acronym
is problematic.  See the thread containing
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00134.html>.
* config/srclist.txt: Remove doc/old-licenses/fdl-1.2.texi.
* doc/old-licenses/fdl-1.2.texi: Remove.

11 years agoexecinfo: port to FreeBSD
Paul Eggert [Fri, 24 Aug 2012 10:29:39 +0000 (03:29 -0700)]
execinfo: port to FreeBSD

* m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
if needed, as in FreeBSD.  Reported by Bastien Roucariès in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00113.html>.
* modules/execinfo (Link): Add $(LIB_EXECINFO).

11 years agoxstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
Jim Meyering [Thu, 23 Aug 2012 20:02:39 +0000 (22:02 +0200)]
xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning

* lib/xstrtol.h: Put "_Noreturn" before "void" in declaration,
to placate gcc's -Wold-style-declaration.

11 years agodoc: do not use @acronym
Paul Eggert [Fri, 24 Aug 2012 09:19:57 +0000 (02:19 -0700)]
doc: do not use @acronym

* doc/inet_ntoa.texi (inet_ntoa):
* doc/parse-datetime.texi (Seconds since the Epoch)
(Specifying time zone rules):
* doc/posix-functions/inet_ntoa.texi (inet_ntoa):
Don't use @acronym.  Problem reported by John Darlington in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00124.html>.

11 years agostdnoreturn: port to newer GCCs
Paul Eggert [Thu, 23 Aug 2012 23:40:05 +0000 (16:40 -0700)]
stdnoreturn: port to newer GCCs

* m4/stdnoreturn.m4 (gl_STDNORETURN_H): Avoid problems with
bleeding-edge GCC that complains about 'int _Noreturn foo (void);'.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00121.html>.
Also, rename the 'test' function to a void a clash with the
already-supplied 'main' function; this fixes a bug that incorrectly
rejected GCC 4.7.1's <stdnoreturn.h>.
* doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
Document GCC problem.

11 years agopipe-filter: fix comment typo
Reuben Thomas [Wed, 22 Aug 2012 16:52:02 +0000 (10:52 -0600)]
pipe-filter: fix comment typo

* lib/pipe-filter.h: Mention correct function.

11 years agoexecinfo: new module
Paul Eggert [Wed, 22 Aug 2012 08:47:05 +0000 (01:47 -0700)]
execinfo: new module

This is for Emacs.  Currently, it provides a no-effect stub
on all platforms where it does not already work.
It already works on glibc-based systems, and on Solaris 11.
* lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo:
New files.
* doc/glibc-headers/execinfo.texi (execinfo.h):
* MODULES.html.sh (Misc): Document it.

11 years agoextern-inline: support old GCC 'inline'
Paul Eggert [Tue, 21 Aug 2012 00:01:18 +0000 (17:01 -0700)]
extern-inline: support old GCC 'inline'

* m4/extern-inline.m4 (gl_EXTERN_INLINE): Use pre-C99 GCC 'inline'
if available.  This applies to GCC versions 2.7 through 4.2, or
when newer GCC is using -fgnu89-inline.  The goal is to address
some of the performance issues mentioned by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00097.html>.

11 years agomaint.mk: avoid redundant file name in message
Eric Blake [Mon, 20 Aug 2012 15:38:54 +0000 (09:38 -0600)]
maint.mk: avoid redundant file name in message

$(_sc_search_regexp) already prefixes its errors with $(ME), so
failure on one of these rules looked like:

maint.mk: maint.mk: replace strcmp calls above with STREQ/STRNEQ

* top/maint.mk (sc_prohibit_strcmp, sc_unmarked_diagnostics)
(sc_prohibit_defined_have_decl_tests, sc_const_long_option)
(sc_makefile_path_separator_check): Remove bogus $(ME).

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agotimer-time: fix link order when static linking on glibc
Mike Frysinger [Mon, 20 Aug 2012 00:42:39 +0000 (01:42 +0100)]
timer-time: fix link order when static linking on glibc

* m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
_after_ -lrt so that it's significant.

11 years agotimespec: omit unnecessary AC_C_INLINE
Paul Eggert [Sat, 18 Aug 2012 23:27:56 +0000 (16:27 -0700)]
timespec: omit unnecessary AC_C_INLINE

* m4/timespec.m4 (gl_TIMESPEC): Do not require AC_C_INLINE.

11 years agostat-time: omit unnecessary AC_C_INLINE
Paul Eggert [Sat, 18 Aug 2012 23:21:15 +0000 (16:21 -0700)]
stat-time: omit unnecessary AC_C_INLINE

* m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
Do not require AC_C_INLINE.

11 years agoignore-value: omit unnecessary AC_C_INLINE
Paul Eggert [Sat, 18 Aug 2012 23:18:18 +0000 (16:18 -0700)]
ignore-value: omit unnecessary AC_C_INLINE

* modules/ignore-value (configure.ac): Do not require AC_C_INLINE.

11 years agosys_select: avoid 'static inline'
Paul Eggert [Sat, 18 Aug 2012 22:46:14 +0000 (15:46 -0700)]
sys_select: avoid 'static inline'

* lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.

11 years agomktime: avoid 'static inline'
Paul Eggert [Sat, 18 Aug 2012 22:34:37 +0000 (15:34 -0700)]
mktime: avoid 'static inline'

* lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline.
* m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.

11 years agoautoupdate
Karl Berry [Sun, 19 Aug 2012 16:29:26 +0000 (09:29 -0700)]
autoupdate

11 years agognulib-tool: Improve coding style.
Bruno Haible [Sun, 19 Aug 2012 12:13:11 +0000 (14:13 +0200)]
gnulib-tool: Improve coding style.

* gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
func_emit_lib_Makefile_am.
Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.

11 years agognulib-tool: Fix indentation.
Bruno Haible [Sun, 19 Aug 2012 12:08:12 +0000 (14:08 +0200)]
gnulib-tool: Fix indentation.

* gnulib-tool (func_import): Fix indentation.

11 years agognulib-tool: Remove old file names from .cvsignore, .gitignore.
Bruno Haible [Sun, 19 Aug 2012 12:06:50 +0000 (14:06 +0200)]
gnulib-tool: Remove old file names from .cvsignore, .gitignore.

* gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
on the list of removed files.

11 years agotest-parse-datetime: avoid glibc leap-second glitch
Paul Eggert [Fri, 17 Aug 2012 18:09:12 +0000 (11:09 -0700)]
test-parse-datetime: avoid glibc leap-second glitch

* tests/test-parse-datetime.c (main): Set TZ to US Eastern time
with the 2012 rules.  Problem reported by Bruce Dubbs in
<http://bugs.gnu.org/12206>.

11 years agoautoupdate
Karl Berry [Wed, 15 Aug 2012 13:55:24 +0000 (06:55 -0700)]
autoupdate

11 years agognulib-tool: Fix indentation of generated gnulib-comp.m4 file.
Bruno Haible [Tue, 14 Aug 2012 23:29:28 +0000 (01:29 +0200)]
gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.

* gnulib-tool (func_emit_autoconf_snippet): Initialize indentation
from argument.
Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.

11 years agoldexp: relax license
Eric Blake [Tue, 14 Aug 2012 16:51:18 +0000 (10:51 -0600)]
ldexp: relax license

* modules/ldexp (License): Trivial relax, since the module only
provides a permissively licensed m4 file.

11 years agoupdate from texinfo
Karl Berry [Mon, 13 Aug 2012 22:48:24 +0000 (15:48 -0700)]
update from texinfo

11 years agognulib-tool: Fix persistence of --witness-c-macro option.
Bruno Haible [Mon, 13 Aug 2012 10:49:34 +0000 (12:49 +0200)]
gnulib-tool: Fix persistence of --witness-c-macro option.

* gnulib-tool (func_import): Fix typo in emit of gl_WITNESS_C_MACRO.
Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.

11 years agocount-leading-zeros: use a lookup table on non-gcc compilers
Eric Blake [Sat, 11 Aug 2012 13:34:00 +0000 (07:34 -0600)]
count-leading-zeros: use a lookup table on non-gcc compilers

While this only affects non-gcc compilers, we can assume that
lookups are faster than conditionals, even if it results in
a slightly larger executable size.

* lib/count-leading-zeros.h (count_leading_zeros_32): Use an
alternate implementation, suggested by Jim Meyering.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agocount-leading-zeros: new module
Eric Blake [Fri, 10 Aug 2012 22:51:08 +0000 (16:51 -0600)]
count-leading-zeros: new module

I needed gcc's clz to determine the most significant bit of a
number (useful for things like truncating to a power of 2),
and was surprised it is not a standardized function (the
opposite direction of finding the least significant bit is
given by ffs).  This borrows heavily from the design of the
count-one-bits module.

* modules/count-leading-zeros: New module.
* m4/count-leading-zeros.m4: New file.
* lib/count-leading-zeros.h: Likewise.
* modules/count-leading-zeros-tests: New test.
* tests/test-count-leading-zeros.c: New file.
* MODULES.html.sh (Integer arithmetic functions): Document it.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaintainer-makefile: Fix syntax error with dash.
Simon Josefsson [Tue, 7 Aug 2012 06:53:55 +0000 (08:53 +0200)]
maintainer-makefile: Fix syntax error with dash.

* top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): Quote arguments.
(sc_vulnerable_makefile_CVE-2012-3386): Likewise.

11 years agoextern-inline: also ignore -Wmissing-declarations
Jim Meyering [Sun, 5 Aug 2012 16:41:53 +0000 (18:41 +0200)]
extern-inline: also ignore -Wmissing-declarations

* m4/extern-inline.m4: Also ignore -Wmissing-declarations,
required with gcc-4.8.0-to-be.

11 years agoautoupdate
Karl Berry [Sun, 5 Aug 2012 13:44:31 +0000 (06:44 -0700)]
autoupdate

11 years agomaint.mk: sc_prohibit_magic_number_exit: avoid new false positives
Jim Meyering [Sun, 5 Aug 2012 09:19:19 +0000 (11:19 +0200)]
maint.mk: sc_prohibit_magic_number_exit: avoid new false positives

* top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches
for /error ?([^,]*)/.  This avoids false-positives for strings like
"Unknown error (252)", introduced via commit v0.0-7538-g92875a6.

11 years agognumakefile: better interaction with Automake-NG
Stefano Lattarini [Thu, 2 Aug 2012 16:51:08 +0000 (18:51 +0200)]
gnumakefile: better interaction with Automake-NG

* modules/gnumakefile [Makefile.am]: The makefiles generated by
Automake-NG always contain a definition of VPATH, even in non-VPATH
builds (its value being simply '.' in that case).  So, in the
'clean-GNUmakefile' rule, to determine whether running under a
VPATH setup, compare '$(srcdir)' to '.' rather than checking whether
'$(VPATH)' expands to the empty string.

11 years agobase64: Use extern C scope in header file, for C++.
Simon Josefsson [Thu, 2 Aug 2012 21:21:02 +0000 (23:21 +0200)]
base64: Use extern C scope in header file, for C++.

* lib/base64.h: Add C++ namespace protection.

11 years agostat-time, timespec, u64: support naive out-of-dir builds
Paul Eggert [Thu, 2 Aug 2012 21:17:33 +0000 (14:17 -0700)]
stat-time, timespec, u64: support naive out-of-dir builds

* lib/stat-time.c, lib/timespec.c, lib/u64.c:
Use '#include "foo.h"', not '#include <foo.h>', when including
one's own interface.  This works better when configuring with
out-of-directory builds, since packages need not add an
otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.

11 years agoFix typo: 'linline' -> 'inline' (thanks to Eric Blake).
Paul Eggert [Wed, 1 Aug 2012 21:51:19 +0000 (14:51 -0700)]
Fix typo: 'linline' -> 'inline' (thanks to Eric Blake).

11 years agoKeep the extern-inline macros closer together.
Paul Eggert [Wed, 1 Aug 2012 21:30:54 +0000 (14:30 -0700)]
Keep the extern-inline macros closer together.

11 years agoFix indenting.
Paul Eggert [Sat, 28 Jul 2012 15:34:01 +0000 (08:34 -0700)]
Fix indenting.

11 years agoutimens: use extern-inline
Paul Eggert [Sat, 28 Jul 2012 14:23:54 +0000 (07:23 -0700)]
utimens: use extern-inline

* lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h.
* lib/utimens.h: Add copyright notice, since this is now large enough
to copyright.  Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
(_GL_UTIMENS_INLINE): New macro.  Use it instead of 'static inline'.
* modules/utimens (Depends-on): Add extern-inline.

11 years agou64: use extern-inline
Paul Eggert [Sat, 28 Jul 2012 14:20:59 +0000 (07:20 -0700)]
u64: use extern-inline

* lib/u64.c: New file.
* lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
(_GL_U64_INLINE): New macro.  Use it instead of 'static inline'.
* modules/u64 (Files): Add lib/u64.c.
(Depends-on): Add extern-inline.
(configure.ac): No need to require AC_C_INLINE, since extern-inline
does that now.
(lib_SOURCES): Add u64.c.

11 years agotimespec: use extern-inline
Paul Eggert [Sat, 28 Jul 2012 14:18:23 +0000 (07:18 -0700)]
timespec: use extern-inline

* lib/timespec.c: New file.
* lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
(_GL_TIMESPEC_INLINE): New macro.  Use it instead of 'static inline'.
* modules/timespec (Files): Add lib/timespec.c.
(Depends-on): Add extern-inline.
(lib_SOURCES): Add timespec.c.

11 years agostat-time: use extern-inline
Paul Eggert [Sat, 28 Jul 2012 14:15:59 +0000 (07:15 -0700)]
stat-time: use extern-inline

* lib/stat-time.c: New file.
* lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
(_GL_STAT_TIME_INLINE): New macro.  Use it instead of 'static inline'.
* modules/stat-time (Files): Add lib/stat-time.c.
(Depends-on): Add extern-inline.
(lib_SOURCES): Add stat-time.c.

11 years agoextern-inline: new module
Paul Eggert [Sat, 28 Jul 2012 14:11:58 +0000 (07:11 -0700)]
extern-inline: new module

* modules/extern-inline, m4/extern-inline.m4: New files.
This is for better support of 'extern inline' a la ISO C99,
with a portable alternative on compilers that do not support
C99-style 'extern inline'.  Using 'extern inline' shrinks the size
of the Emacs executable, when compiled with debugging disabled,
which is a typical way that Emacs is built while developing.

11 years agomaint.mk: a "release-commit" wrapper to do-release-commit-and-tag
Akim Demaille [Wed, 1 Aug 2012 07:55:49 +0000 (09:55 +0200)]
maint.mk: a "release-commit" wrapper to do-release-commit-and-tag

* build-aux/do-release-commit-and-tag: Move variable definitions
together.
($branch): Instead of defaulting to "master", default to the current
branch (as gnu-web-doc-update does).
(help): Display the current values of the option arguments.
* top/maint.mk (release-commit): New.
* top/README-release: Simplify the corresponding step.

11 years agoautoupdate
Karl Berry [Tue, 31 Jul 2012 14:02:42 +0000 (07:02 -0700)]
autoupdate

11 years agoautoupdate
Karl Berry [Mon, 30 Jul 2012 16:48:02 +0000 (09:48 -0700)]
autoupdate

11 years agomaint.mk: use silent-rules support from Automake
Akim Demaille [Mon, 30 Jul 2012 11:49:49 +0000 (13:49 +0200)]
maint.mk: use silent-rules support from Automake

* top/maint.mk (news-check, vc-diff-check, announcement)
(no-submodule-changes, alpha beta stable, release-prep)
(web-manual, update-copyright): Use $(AM_V_GEN) and $(AM_V_at).

11 years agomaint.mk: provide a web-manual-update target
Akim Demaille [Mon, 30 Jul 2012 11:41:01 +0000 (13:41 +0200)]
maint.mk: provide a web-manual-update target

* top/maint.mk: here.
* top/README-release: Use it to simplify the web manual update step.

11 years agoREADME-release: shorten the circuit to post a news
Akim Demaille [Mon, 30 Jul 2012 10:27:29 +0000 (12:27 +0200)]
README-release: shorten the circuit to post a news

* top/README-release: Point directly to the news submission form.

11 years agognu-web-doc-update: fix --help
Akim Demaille [Mon, 30 Jul 2012 10:26:43 +0000 (12:26 +0200)]
gnu-web-doc-update: fix --help

* build-aux/gnu-web-doc-update: The information "top level" was written
twice.

11 years agopassfd: fix comment on recvfd
Eric Blake [Mon, 30 Jul 2012 12:20:26 +0000 (06:20 -0600)]
passfd: fix comment on recvfd

* lib/passfd.c (recvfd): Fix comment.
Reported by Jann Horn <jannhorn@googlemail.com>.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint.mk: avoid a sub-shell
Jim Meyering [Mon, 30 Jul 2012 09:30:53 +0000 (11:30 +0200)]
maint.mk: avoid a sub-shell

* top/maint.mk (release-prep): Remove unneeded sub-shell.

11 years agomaint.mk: absolute VPATH issue
Akim Demaille [Mon, 30 Jul 2012 09:09:15 +0000 (11:09 +0200)]
maint.mk: absolute VPATH issue

* top/maint.mk (release-prep): Help Git find .git/.
From Jim Meyering.

11 years agoupdate from texinfo
Karl Berry [Mon, 30 Jul 2012 00:15:18 +0000 (17:15 -0700)]
update from texinfo

11 years agogitlog-to-changelog: fix previous change
Akim Demaille [Sun, 29 Jul 2012 11:30:12 +0000 (13:30 +0200)]
gitlog-to-changelog: fix previous change

* build-aux/gitlog-to-changelog: Fix condition.
Add missing ";".

11 years agogitlog-to-changelog: don't expect .git to be in $srcdir
Akim Demaille [Sun, 29 Jul 2012 06:46:55 +0000 (08:46 +0200)]
gitlog-to-changelog: don't expect .git to be in $srcdir

Reported by Bruno Haible.
<http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00265.html>

* build-aux/gitlog-to-changelog (&git_dir_option): New.
Use it.

11 years agomaint.mk: absolute VPATH build fix
Akim Demaille [Sat, 28 Jul 2012 10:40:53 +0000 (12:40 +0200)]
maint.mk: absolute VPATH build fix

* top/maint.mk (gpg_key_ID): Help git find .git when, for instance,
$(srcdir) is not a parent of $(builddir).

11 years agoclean-temp: Fix memory leak.
John Darrington [Sat, 28 Jul 2012 22:30:48 +0000 (00:30 +0200)]
clean-temp: Fix memory leak.

* lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
'files' members of tmpdir.

11 years agomaint: fix grammar in a ChangeLog entry
Jim Meyering [Sat, 28 Jul 2012 07:53:15 +0000 (09:53 +0200)]
maint: fix grammar in a ChangeLog entry

11 years agomaint.mk: new rule: refresh-gnulib-patches
Jim Meyering [Fri, 27 Jul 2012 10:12:42 +0000 (12:12 +0200)]
maint.mk: new rule: refresh-gnulib-patches

I noticed that 8 of coreutils' 9 gl/**/*.diff files was stale.
Use this rule to refresh them.
* top/maint.mk (refresh-gnulib-patches): New rule.

11 years agognulib-tool: Fix handling of inctests variable.
Bruno Haible [Tue, 24 Jul 2012 21:35:41 +0000 (23:35 +0200)]
gnulib-tool: Fix handling of inctests variable.

* gnulib-tool: Canonicalize $inctests also in 'update' mode.
Reported by Nick Bowler <nbowler@elliptictech.com>.

11 years agogetpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
Bruno Haible [Sun, 22 Jul 2012 19:31:42 +0000 (21:31 +0200)]
getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.

* lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
Remove exemption for getpass.h.
Suggested by Eric Blake.

11 years agoverify: document conflict with -Wnested-externs
Eric Blake [Fri, 20 Jul 2012 22:48:46 +0000 (16:48 -0600)]
verify: document conflict with -Wnested-externs

Our implementation of verify() relies on nested extern declarations,
so it is incompatible with gcc < 4.6 coupled with -Wnested-externs
when used inside a function body.  But inside a function body, you
can always arrange to use verify_expr() instead, which is warning-free.

* lib/verify.h: Give hint about usage when gcc warnings are enabled.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint.mk: forbid exit(-1)
Eric Blake [Fri, 20 Jul 2012 21:29:22 +0000 (15:29 -0600)]
maint.mk: forbid exit(-1)

Libvirt accidentally had an 'exit (-1)' which got by the syntax
checker; generally, exiting with 255 is not a wise idea.

* top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agofsusage: port back to Solaris
Paul Eggert [Fri, 20 Jul 2012 08:39:19 +0000 (01:39 -0700)]
fsusage: port back to Solaris

* lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time
error (fsd not declared) on Solaris 10.  Reported privately by
Andrew Borodin.

11 years agognu-web-doc-update: fix error messages
Akim Demaille [Thu, 19 Jul 2012 10:04:35 +0000 (12:04 +0200)]
gnu-web-doc-update: fix error messages

* build-aux/gnu-web-doc-update: Don't pass $ME to die.

11 years agognu-web-doc-update: check the requirements.
Akim Demaille [Thu, 19 Jul 2012 09:43:37 +0000 (11:43 +0200)]
gnu-web-doc-update: check the requirements.

* build-aux/gnu-web-doc-update (find_tool): Import from bootstrap.
($CVS, $CVSU, $GIT, $RSYNC, $XARGS): New.
* build-aux/bootstrap (find_tool): Comment change.

11 years agomaint.mk: minor simplification.
Akim Demaille [Tue, 17 Jul 2012 08:31:35 +0000 (10:31 +0200)]
maint.mk: minor simplification.

* top/maint.mk (_sc_excl): Use $(or...) instead of $(if...)
for default values.

11 years agogitlog-to-changelog: VPATH build issues.
Akim Demaille [Sun, 15 Jul 2012 14:22:31 +0000 (16:22 +0200)]
gitlog-to-changelog: VPATH build issues.

If builddir is not a subdirectory of srcdir, running git from it will
fail.

* build-aux/gitlog-to-changelog (--srcdir): New option.

11 years agofpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
Bruno Haible [Sun, 15 Jul 2012 21:00:48 +0000 (23:00 +0200)]
fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.

* lib/fpending.h: Assume HAVE_DECL___FPENDING is defined.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests)
Remove exemption for fpending.h.
Suggested by Eric Blake.

11 years agopthread_sigmask: fix bug on FreeBSD 9
Paul Eggert [Sun, 15 Jul 2012 18:06:11 +0000 (11:06 -0700)]
pthread_sigmask: fix bug on FreeBSD 9

* lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
Include string.h.
(pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
but pthread_sigmask (1729, NULL, NULL) returns zero.
See <http://bugs.gnu.org/11884>.
Avoid the need to call pthread_sigmask (1729, ...) in most cases,
by inspecting whether the main call changed the old mask.

11 years agoREADME-release: make it more legible
Reuben Thomas [Fri, 13 Jul 2012 10:54:21 +0000 (11:54 +0100)]
README-release: make it more legible

* top/README-release: improve typography slightly.

11 years agoautoupdate
Karl Berry [Sun, 15 Jul 2012 14:20:06 +0000 (07:20 -0700)]
autoupdate

11 years agomaint: require that each sc_... command start with "@"
Jim Meyering [Sun, 15 Jul 2012 13:15:46 +0000 (15:15 +0200)]
maint: require that each sc_... command start with "@"

* Makefile (sc_prohibit_sc_omitted_at): New rule so that
"make sc_maint" helps us avoid this nit.

11 years agomaint.mk: add leading "@" to quiet new "make syntax-check" rule
Jim Meyering [Sun, 15 Jul 2012 12:40:29 +0000 (14:40 +0200)]
maint.mk: add leading "@" to quiet new "make syntax-check" rule

* top/maint.mk (sc_prohibit_defined_have_decl_tests): Add "@".

11 years agoautoupdate
Karl Berry [Sat, 14 Jul 2012 13:16:28 +0000 (06:16 -0700)]
autoupdate

11 years agomaint.mk: new syntax check for HAVE_DECL checks
Eric Blake [Fri, 13 Jul 2012 20:02:05 +0000 (14:02 -0600)]
maint.mk: new syntax check for HAVE_DECL checks

Based on Karel's report, we might as well enforce a syntax check
to help avoid future problems.
https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html

Exempt a few files that still get picked up in the wild rather
than as a full gnulib module with m4 files.

* top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
* cfg.mk
(exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
Exempt some false positives.
Based on a report by Karel Zak.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoargp: make HAVE_DECL usage consistent
Eric Blake [Fri, 13 Jul 2012 17:50:59 +0000 (11:50 -0600)]
argp: make HAVE_DECL usage consistent

Autoconf guarantees that AC_CHECK_DECLS always defines the
corresponding HAVE_DECL_*.  But our hand-coded use of AC_CHECK_DECL
did not define the macro to 0, leading to a false positive complaint:
https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html
By sticking to conventions, we avoid the false positive.

* lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL
macros, not whether they are defined.
* m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per
convention with other declaration checks.
Reported by Karel Zak, with suggestions from Paul Eggert.

11 years agostat-time: relax license to LGPLv2+
Eric Blake [Fri, 13 Jul 2012 18:49:36 +0000 (12:49 -0600)]
stat-time: relax license to LGPLv2+

As discussed here:
https://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00138.html

[This was done once before to LGPLv3+, see commit 20e165d.]

* modules/stat-time (License): Relax, with consent of all authors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agostrndup: fix m4 usage error
Eric Blake [Fri, 13 Jul 2012 17:43:40 +0000 (11:43 -0600)]
strndup: fix m4 usage error

Autoconf guarantees that AC_CHECK_DECLS_ONCE always defines the
corresponding HAVE_DECL_*, so checking #ifndef HAVE_DECL_* is bogus.
https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html

* m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always
defined, to either 0 or 1.
Reported by Karel Zak.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint: enable the sc_avoid_if_before_free syntax-check rule
Jim Meyering [Wed, 11 Jul 2012 15:25:27 +0000 (17:25 +0200)]
maint: enable the sc_avoid_if_before_free syntax-check rule

* cfg.mk (local-checks-to-skip): Enable sc_avoid_if_before_free.
(if_before_free_offenders_): Define.
(if_before_free_basename_re_): Define.
Exempt current files with useless if-before-free.

11 years agogettext: do not assume '#define ... defined ...' behavior
Paul Eggert [Thu, 12 Jul 2012 04:16:27 +0000 (21:16 -0700)]
gettext: do not assume '#define ... defined ...' behavior

* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
Do not use '#define FOO ... defined BAR ...', as the C standard says
it's not portable to expect that this works after macro expansion.
Problem reported for gzip by Steven M. Schweda in
<http://lists.gnu.org/archive/html/bug-gzip/2012-07/msg00000.html>.

11 years agogetloadavg: clean out old Emacs and Autoconf cruft
Paul Eggert [Tue, 10 Jul 2012 23:50:06 +0000 (16:50 -0700)]
getloadavg: clean out old Emacs and Autoconf cruft

See Glenn Morris in <http://bugs.gnu.org/11905>.
* lib/getloadavg.c: Include <config.h>, <stdbool.h> always.
Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix.
(LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook.
* m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.

11 years agobootstrap: let warn be like tests/init.sh's warn_
Akim Demaille [Fri, 6 Jul 2012 13:01:53 +0000 (15:01 +0200)]
bootstrap: let warn be like tests/init.sh's warn_

Reported by Jim Meyering.
* build-aux/bootstrap (warn): Remove, replaced by...
(warnf_, warn_): these.
Adjust callers.
Shorten messages that no longer fit in 80 columns.

11 years agogetopt: Simplify after Emacs changed.
Bruno Haible [Mon, 9 Jul 2012 19:56:56 +0000 (21:56 +0200)]
getopt: Simplify after Emacs changed.

* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
(gl_GETOPT_IFELSE): Remove macro.

11 years agomaint.mk: add sc_vulnerable_makefile_CVE-2012-3386
Jim Meyering [Mon, 9 Jul 2012 14:24:00 +0000 (16:24 +0200)]
maint.mk: add sc_vulnerable_makefile_CVE-2012-3386

* top/maint.mk (sc_vulnerable_makefile_CVE-2012-3386): New rule.

11 years agomaint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
Jim Meyering [Mon, 9 Jul 2012 14:11:34 +0000 (16:11 +0200)]
maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix

Bugs in both of those conspired to make the
sc_vulnerable_makefile_CVE-2009-4029 rule 99% useless.
_sc_search_regexp's handling of non-empty $in_files would filter
out any offending file names.  sc_vulnerable_makefile_CVE-2009-4029's
choice of in_files value meant there would be no match in most
projects, due to the presence of two or more Makefile.in files.
* top/maint.mk (_sc_search_regexp) [in_vc_files,in_files]: Clarify.
Fix a bug in how a non-empty $$in_files was processed:
(sc_vulnerable_makefile_CVE-2009-4029): Fix erroneous use of in_files:
in spite of the name, it's a regexp, not a list of file names.

11 years agogetloadavg, getopt: fix commentary re configure.in
Paul Eggert [Mon, 9 Jul 2012 08:17:51 +0000 (01:17 -0700)]
getloadavg, getopt: fix commentary re configure.in

Autoconf is deprecating the name 'configure.in', so change it to
to the new name 'configure.ac' in a couple of places.
* lib/getloadavg.c: configure.in -> configure.ac, in comment.
* m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
(gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
Emacs has renamed it to configure.ac, and it no longer refers
to these macros anyway.

11 years agotimespec: mark functions with const attributes
Paul Eggert [Mon, 9 Jul 2012 07:52:53 +0000 (00:52 -0700)]
timespec: mark functions with const attributes

* lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
Mark with _GL_ATTRIBUTE_CONST.

11 years agocanonicalize[-lgpl]: handle "guessing" values when cross-building
Ludovic Courtès [Sat, 7 Jul 2012 00:04:55 +0000 (02:04 +0200)]
canonicalize[-lgpl]: handle "guessing" values when cross-building

* m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
(gl_CANONICALIZE_LGPL): Check whether $gl_cv_func_realpath_works
matches "*yes" instead of just "yes".  Regression introduced in commit
e0bcf6626cde8dad4bfbdc4045c744f0cd8b9e24.

11 years agocanonicalize: make the right guess when cross-compiling to GNU
Ludovic Courtès [Sat, 7 Jul 2012 00:04:54 +0000 (02:04 +0200)]
canonicalize: make the right guess when cross-compiling to GNU

* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Match also "gnu*" to
determine whether cross-compiling to glibc systems, so as to
include GNU/Hurd.