Bruno Haible [Thu, 5 Jan 2012 17:47:38 +0000 (18:47 +0100)]
strtoimax: Work around AIX 5.1 bug.
* lib/inttypes.in.h (strtoimax): Allow overriding the system's
definition.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Check against the AIX 5.1 bug.
Set HAVE_STRTOIMAX.
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize
REPLACE_STRTOIMAX.
* modules/inttypes-incomplete (Makefile.am): Substitute
REPLACE_STRTOIMAX.
* modules/strtoimax (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
(configure.ac): Test HAVE_STRTOIMAX, REPLACE_STRTOIMAX.
(Depends-on): Update conditions.
* tests/test-strtoimax.c (main): Add tests for large values.
* doc/posix-functions/strtoimax.texi: Mention the AIX 5.1 bug.
Bruno Haible [Thu, 5 Jan 2012 17:42:08 +0000 (18:42 +0100)]
inttypes: Modernize.
* lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
* modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
(Makefile.am): Update inttypes.h rule.
Jim Meyering [Thu, 5 Jan 2012 15:45:50 +0000 (16:45 +0100)]
init.sh: don't waste a subshell just to redirect stderr
* tests/init.sh: In testing for diff -u and diff -c, use a
stderr-redirecting exec inside `...` rather than a subshell.
Jim Meyering [Thu, 5 Jan 2012 15:43:04 +0000 (16:43 +0100)]
test-init.sh: avoid failure on HP-UX 11.00
* tests/test-init.sh: Skip "diff -u"-comparing step when compare
resolves to diff -c or cmp. Reported by Bruno Haible.
Bruno Haible [Thu, 5 Jan 2012 16:29:33 +0000 (17:29 +0100)]
Tests for module 'strtoull'.
* modules/strtoull-tests: New file.
* tests/test-strtoull.c: New file, based on tests/test-strtoumax.c.
Bruno Haible [Thu, 5 Jan 2012 16:29:03 +0000 (17:29 +0100)]
Tests for module 'strtoll'.
* modules/strtoll-tests: New file.
* tests/test-strtoll.c: New file, based on tests/test-strtoimax.c.
Bruno Haible [Thu, 5 Jan 2012 16:28:29 +0000 (17:28 +0100)]
Tests for module 'strtoul'.
* modules/strtoul-tests: New file.
* tests/test-strtoul.c: New file, based on tests/test-strtoumax.c.
Bruno Haible [Thu, 5 Jan 2012 16:27:59 +0000 (17:27 +0100)]
Tests for module 'strtol'.
* modules/strtol-tests: New file.
* tests/test-strtol.c: New file, based on tests/test-strtoimax.c.
Karl Berry [Thu, 5 Jan 2012 15:20:01 +0000 (07:20 -0800)]
update from texinfo
Karl Berry [Thu, 5 Jan 2012 15:19:28 +0000 (07:19 -0800)]
autoupdate
Jim Meyering [Wed, 4 Jan 2012 19:19:37 +0000 (20:19 +0100)]
test-init.sh: accommodate Solaris 5.10's different diff -u output
* tests/test-init.sh: Also exempt @@ lines from the comparison
of diff output, since Solaris 5.10 and GNU diff formats differ.
Reported by Stefano Lattarini.
Paul Eggert [Thu, 5 Jan 2012 00:04:38 +0000 (16:04 -0800)]
test-posixtm: don't assume signed integer wraparound
* tests/test-posixtm.c (main): Don't assume wraparound semantics
after signed integer overflow. Inspired by (though it may not
fix) Bruno Haible's bug report in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00066.html>.
Paul Eggert [Wed, 4 Jan 2012 17:33:32 +0000 (09:33 -0800)]
Spell out "Windows 9x" and "Windows XP".
* lib/poll.c, lib/select.c: In comments, replace "Win9x" with
"Windows 9x" and "WinXP" with "Windows XP".
Jim Meyering [Wed, 4 Jan 2012 16:54:57 +0000 (17:54 +0100)]
test-vc-list-files-cvs.sh: remove obsolete comment
* tests/test-vc-list-files-cvs.sh: Remove obsolete comment about
double exit. Now that's all encapsulated via skip_ and Exit.
Karl Berry [Wed, 4 Jan 2012 14:05:53 +0000 (06:05 -0800)]
autoupdate
Karl Berry [Wed, 4 Jan 2012 14:01:22 +0000 (06:01 -0800)]
update from texinfo
Bruno Haible [Wed, 4 Jan 2012 13:31:33 +0000 (14:31 +0100)]
Talk about "native Windows API", not "Win32".
* lib/classpath.c: Update comments to mention native Windows.
* lib/csharpexec.c: Likewise.
* lib/dup2.c: Likewise.
* lib/error.c: Likewise.
* lib/fcntl.c: Likewise.
* lib/filename.h: Likewise.
* lib/findprog.c: Likewise.
* lib/get-rusage-as.c: Likewise.
* lib/get-rusage-data.c: Likewise.
* lib/getpagesize.c: Likewise.
* lib/javaexec.c: Likewise.
* lib/msvc-inval.c: Likewise.
* lib/msvc-nothrow.c: Likewise.
* lib/nanosleep.c: Likewise.
* lib/nonblocking.c: Likewise.
* lib/printf-parse.c: Likewise.
* lib/setlocale.c: Likewise.
* lib/sigaction.c: Likewise.
* lib/strerror_r.c: Likewise.
* lib/tmpdir.c: Likewise.
* lib/vasnprintf.c: Likewise.
* lib/w32spawn.h: Likewise.
* lib/waitpid.c: Likewise.
* lib/stdio.in.h (fdopen, fopen, freopen): Likewise.
* m4/locale-ar.m4: Likewise.
* m4/locale-fr.m4: Likewise.
* m4/locale-ja.m4: Likewise.
* m4/locale-tr.m4: Likewise.
* m4/locale-zh.m4: Likewise.
* m4/printf.m4: Likewise.
* tests/test-cloexec.c: Likewise.
* tests/test-copy-acl.sh: Likewise.
* tests/test-copy-file.sh: Likewise.
* tests/test-file-has-acl.sh: Likewise.
* tests/test-set-mode-acl.sh: Likewise.
* tests/test-dup-safer.c: Likewise.
* tests/test-dup2.c: Likewise.
* tests/test-dup3.c: Likewise.
* tests/test-fcntl.c: Likewise.
* tests/test-nonblocking-pipe.h: Likewise.
* tests/test-nonblocking-socket.h: Likewise.
* tests/test-pipe.c: Likewise.
* tests/test-pipe2.c: Likewise.
* tests/test-spawn-pipe-child.c: Likewise.
* doc/acl-resources.txt: Likewise.
* lib/getaddrinfo.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
* tests/test-poll.c (WINDOWS_NATIVE): Likewise.
* tests/test-select.h (WINDOWS_NATIVE): Likewise.
* lib/localcharset.c: Update comments to mention native Windows.
(WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
* lib/localename.c: Likewise.
* lib/progreloc.c: Likewise.
* lib/relocatable.c: Likewise.
* lib/poll.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
(windows_compute_revents): Renamed from win32_compute_revents.
(windows_compute_revents_socket): Renamed from
win32_compute_revents_socket.
* lib/select.c: Update comments to mention native Windows.
(windows_poll_handle): Renamed from win32_poll_handle.
* m4/threadlib.m4: Update comments to mention native Windows.
(gl_THREADLIB_EARLY_BODY, gl_THREADLIB_BODY): Expect
--enable-threads=windows instead of --enable-threads=win32. Set
USE_WINDOWS_THREADS, not USE_WIN32_THREADS.
* lib/glthread/lock.h: Update comments to mention native Windows.
(USE_WINDOWS_THREADS): Renamed from USE_WIN32_THREADS.
* lib/glthread/lock.c (USE_WINDOWS_THREADS): Renamed from
USE_WIN32_THREADS.
* lib/glthread/cond.h (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/cond.c (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/thread.h (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/thread.c (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/tls.h (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/tls.c (USE_WINDOWS_THREADS): Likewise.
* lib/glthread/yield.h (USE_WINDOWS_THREADS): Likewise.
* tests/test-cond.c (USE_WINDOWS_THREADS): Likewise.
* tests/test-thread_create.c (USE_WINDOWS_THREADS): Likewise.
* tests/test-lock.c (USE_WINDOWS_THREADS): Likewise.
(TEST_WINDOWS_THREADS): Renamed from TEST_WIN32_THREADS.
* tests/test-tls.c: Likewise.
Rationale:
Microsoft renamed the "Win32 API" to "Windows API", as it is available
on both 32-bit and 64-bit Windows systems.
But in gnulib, we treat Cygwin like a Unix platform, therefore the main
line of distinction is between "native Windows" on one side and Unix/
POSIX systems on the other side. More details in
<https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00027.html>.
Suggested by Paul Eggert.
Bruno Haible [Tue, 3 Jan 2012 12:52:36 +0000 (13:52 +0100)]
isatty: Support for MSVC 9.
* doc/posix-functions/isatty.texi: Mention the MSVC problem.
* lib/isatty.c: Include <errno.h>, msvc-inval.h.
(_isatty_nothrow): New function.
(isatty): Use it instead of _isatty.
(IsConsoleHandle): Add comment, from Paolo Bonzini.
* lib/poll.c (IsConsoleHandle): Likewise.
* lib/select.c (IsConsoleHandle): Likewise.
* m4/isatty.m4 (gl_FUNC_ISATTY): Fix comment. Reported by Eli Zaretskii.
(gl_PREREQ_ISATTY): New macro.
* modules/isatty (Depends-on): Add msvc-inval.
(configure.ac): Invoke gl_PREREQ_ISATTY.
Jim Meyering [Tue, 3 Jan 2012 10:35:43 +0000 (11:35 +0100)]
maint.mk: remove temporary transition aid from over 1.5 years ago
* top/maint.mk (_prohibit_regexp): Remove definition whose sole
purpose was to aid in the transition (avoiding silent malfunction)
from that old name to the new _sc_search_regexp. This shim was
added by commit
219c504b.
Jim Meyering [Tue, 3 Jan 2012 07:21:09 +0000 (08:21 +0100)]
init.sh: do not try to accommodate compare arguments starting with "-"
* tests/init.sh (compare_dev_null_): Do not try to accommodate
compare arguments that start with "-". Besides, we do not worry
about this when invoking diff or cmp; why start now with sed?
Using "--" to separate options from argument would trigger sed
failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4,
OpenBSD 4.9 and NetBSD 5.1. Reported by Bruno Haible.
Bruno Haible [Tue, 3 Jan 2012 02:56:16 +0000 (03:56 +0100)]
Enhance tests for module 'isatty'.
* modules/isatty-tests (Depends-on): Add pipe-posix.
* tests/test-isatty.c: Include <fcntl.h>.
(DEV_NULL): New macro.
(main): Test the resut of isatty() also on regular files, pipes, and
/dev/null.
Bruno Haible [Tue, 3 Jan 2012 02:54:08 +0000 (03:54 +0100)]
New module 'isatty'.
* lib/unistd.in.h (isatty): New declaration.
* lib/isatty.c: New file, based on an idea of
Bastien Roucariès <roucaries.bastien@gmail.com>.
* m4/isatty.m4: New file.
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether isatty is declared.
(gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ISATTY, REPLACE_ISATTY.
* modules/unistd (Makefile.am): Substitute GNULIB_ISATTY,
REPLACE_ISATTY.
* modules/isatty: New file.
* doc/posix-functions/isatty.texi: Mention the new module.
Suggested by Paolo Bonzini.
Bruno Haible [Tue, 3 Jan 2012 00:08:24 +0000 (01:08 +0100)]
canonicalize: Tweak 2011-12-29 commit.
* lib/canonicalize.c (canonicalize_filename_mode): Fix typo in comment.
* lib/canonicalize.h (canonicalize_filename_mode): Update specification.
Jim Meyering [Mon, 2 Jan 2012 14:53:06 +0000 (15:53 +0100)]
gitlog-to-changelog: describe input syntax in --help output
* build-aux/gitlog-to-changelog (usage) [SPECIAL SYNTAX]: New section.
Jim Meyering [Mon, 2 Jan 2012 09:59:17 +0000 (10:59 +0100)]
gitlog-to-changelog: fix typo in --help: show backslash before email @
* build-aux/gitlog-to-changelog (usage): An "@" was backslash-escaped
in sources, but not in actual output.
Jim Meyering [Fri, 30 Dec 2011 18:00:49 +0000 (19:00 +0100)]
gitlog-to-changelog: don't malfunction when name contains %-directive
* build-aux/gitlog-to-changelog (main): Don't let a %-directive
in a name string cause trouble. E.g., with a user name of "%s",
gitlog-to-changelog would fail with "Missing argument in sprintf at..."
Gary V. Vaughan [Fri, 30 Dec 2011 17:47:55 +0000 (18:47 +0100)]
gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
* build-aux/gitlog-to-changelog (main): Map the string, at beginning
of line in a git commit log, "Copyright-paperwork-exempt: yes", to
the " (tiny change)" notation that is appended to the standard
ChangeLog "date name email" header line.
Jim Meyering [Sun, 1 Jan 2012 16:51:36 +0000 (17:51 +0100)]
test-framework-sh: init.sh: fix "make dist" failure
When using gnulib-tool's --with-tests option and any module that
depends on test-framework-sh, "make dist" would fail due to the
lack of init.sh *in lib/*. The EXTRA_DIST += init.sh is required
in the gltests directory, and not in the gllib/ directory.
One way to work around that is to move the EXTRA_DIST += init.sh
from the primary module to the -tests one:
* modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
* modules/test-framework-sh (Makefile.am): ...not here.
Reported by Tom G. Christensen in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
Karl Berry [Sun, 1 Jan 2012 16:45:03 +0000 (08:45 -0800)]
autoupdate
Jim Meyering [Sun, 1 Jan 2012 09:04:58 +0000 (10:04 +0100)]
maint: update all copyright year number ranges
Run "make update-copyright".
Jim Meyering [Sun, 1 Jan 2012 09:00:41 +0000 (10:00 +0100)]
version-etc: update copyright year reported by --version
* lib/version-etc.c (COPYRIGHT_YEAR): Update to 2012.
Copyright (C) 1997-2012 Free Software Foundation, Inc.
Pádraig Brady [Sat, 31 Dec 2011 11:03:58 +0000 (11:03 +0000)]
canonicalize: only stat() when required
* lib/canonicalize.c (canonicalize_filename_mode):
Avoid calling l?stat() when both CAN_MISSING,
and CAN_NOLINKS are set, as then we neither need
to resolve symlinks or test component existence.
Paul Eggert [Sat, 31 Dec 2011 21:38:25 +0000 (13:38 -0800)]
doc: cover st_ino issues once; add OpenVMS etc.
* doc/posix-functions/stat.texi (stat):
* doc/posix-functions/lstat.texi (lstat):
* doc/posix-functions/fstatat.texi (fstatat):
* doc/posix-functions/fstat.texi (fstat):
Move general 'struct stat' stuff to sys_stat.texi,
leaving behind a pointer.
* doc/posix-headers/sys_stat.texi (sys/stat.h):
Merge duplicate info about 'struct stat' problems into here.
Mention issues with OpenVMS, GNU/Linux NFS, NetApp, ClearCase,
and suggest partial workarounds.
Paul Eggert [Sat, 31 Dec 2011 21:19:53 +0000 (13:19 -0800)]
same-inode: port to OpenVMS
* lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
three st_ino values.
Pádraig Brady [Fri, 30 Dec 2011 15:36:50 +0000 (15:36 +0000)]
canonicalize: fix references to stat() and lstat()
* lib/canonicalize.c (canonicalize_filename_mode):
Ensure references always resolve to a replacement
function if required (even via a macro).
The issue was spotted by Eric Blake and is
adequately documented in the docs for stat and lstat.
Karl Berry [Fri, 30 Dec 2011 15:29:52 +0000 (07:29 -0800)]
autoupdate
Jim Meyering [Fri, 30 Dec 2011 14:53:33 +0000 (15:53 +0100)]
gitlog-to-changelog: remove a little duplication
* build-aux/gitlog-to-changelog (main): Grep @lines once,
rather than twice.
Pádraig Brady [Thu, 29 Dec 2011 23:49:53 +0000 (23:49 +0000)]
canonicalize: add support for not resolving symlinks
This will initially be used by a new coreutils realpath command.
* lib/canonicalize.h: Add the CAN_NOLINKS flag to
indicate we don't want to follow symlinks. Also
provide CAN_MODE_MASK to aid setting these existing
mutually exclusive values.
* lib/canonicalize.c (canonicalize_filename_mode):
Extract the flags from can_mode parameter, which
are currently just used to select between stat()
and lstat(). Also ensure that mutually exclusive
values are flagged immediately as invalid.
* tests/test-canonicalize.c: Verify symlinks are
not followed, and that invalid flag combinations
are diagnosed.
Karl Berry [Tue, 27 Dec 2011 15:00:31 +0000 (07:00 -0800)]
autoupdate
Karl Berry [Mon, 26 Dec 2011 22:15:05 +0000 (14:15 -0800)]
update from texinfo
Jim Meyering [Sun, 25 Dec 2011 15:14:36 +0000 (16:14 +0100)]
gitlog-to-changelog: do not clump multi-paragraph entries
Identical header lines (date,name,email+coauthors) are suppressed,
thus putting all entries with those same characteristics under
a single header. However, when a log entry consists of two or
more paragraphs, it may not be clear where it starts and ends.
This change makes it so that such an entry is always separated
from others by a header line, even when that header would
otherwise be suppressed.
* build-aux/gitlog-to-changelog: Implement the above.
Inspired by a related request from Stefano Lattarini in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29456
Karl Berry [Mon, 26 Dec 2011 01:23:01 +0000 (17:23 -0800)]
update from texinfo
Paul Eggert [Sun, 25 Dec 2011 18:32:13 +0000 (10:32 -0800)]
announce-gen: fix `cmd' typo in diagnostic
* build-aux/announce-gen (print_changelog_deltas): Fix typo in
diagnostic: a missing '$' meant that the command was not output.
Karl Berry [Sun, 25 Dec 2011 01:12:46 +0000 (17:12 -0800)]
update from texinfo
Karl Berry [Sat, 24 Dec 2011 01:51:08 +0000 (17:51 -0800)]
autoupdate
Jim Meyering [Fri, 23 Dec 2011 15:44:55 +0000 (16:44 +0100)]
test-framework-sh: distribute init.sh
* modules/test-framework-sh (EXTRA_DIST): Append init.sh.
Otherwise, "make -C gnulib-tests check" (at least in grep) would
fail due to the lack of init.sh.
Karl Berry [Fri, 23 Dec 2011 14:56:25 +0000 (06:56 -0800)]
autoupdate
Jim Meyering [Fri, 23 Dec 2011 11:14:15 +0000 (12:14 +0100)]
maint: remove explicit Files: tests/init.sh; depend on test-framework-sh
* modules/atexit-tests: Rather than listing tests/init.sh,
now that there's a module for it, simply depend on that new module.
* modules/closein-tests: Likewise.
* modules/exclude-tests: Likewise.
* modules/getcwd-tests: Likewise.
* modules/perror-tests: Likewise.
* modules/pread-tests: Likewise.
* modules/pwrite-tests: Likewise.
* modules/vc-list-files-tests: Likewise.
* modules/verify-tests: Likewise.
* modules/xalloc-die-tests: Likewise.
* modules/xstrtoimax-tests: Likewise.
* modules/xstrtol-tests: Likewise.
* modules/xstrtoll-tests: Likewise.
* modules/xstrtoumax-tests: Likewise.
* modules/yesno-tests: Likewise.
Jim Meyering [Fri, 23 Dec 2011 09:54:46 +0000 (10:54 +0100)]
test-framework-sh: add minimal tests of init.sh's compare function
* modules/test-framework-sh-tests: New file.
* tests/test-init.sh: New file.
Jim Meyering [Fri, 23 Dec 2011 09:53:10 +0000 (10:53 +0100)]
test-framework-sh: new module
* modules/test-framework-sh: New file.
* MODULES.html.sh (Support for maintaining and releasing projects):
List it.
Jim Meyering [Thu, 22 Dec 2011 15:04:36 +0000 (16:04 +0100)]
init.sh: do not emit simulated diff output to stderr
* tests/init.sh (compare_dev_null_): Print to stdout, not stderr.
Reuben Thomas [Mon, 19 Dec 2011 08:38:14 +0000 (09:38 +0100)]
.gitignore: ignore gnulib.dvi and regex.info
* doc/.gitignore:add gnulib.dvi and regex.info
Jim Meyering [Thu, 22 Dec 2011 12:12:19 +0000 (13:12 +0100)]
init.sh: correct previous change
* tests/init.sh (compare): My previous change was wrong.
Don't clobber "$?". Spotted by Stefano Lattarini and Pádraig Brady.
Jim Meyering [Thu, 22 Dec 2011 11:58:50 +0000 (12:58 +0100)]
correct previous ChangeLog entry: s/set -x/set -e/
Spotted by Stefano Lattarini.
Jim Meyering [Thu, 22 Dec 2011 11:42:32 +0000 (12:42 +0100)]
init.sh: avoid unwarranted test failure when using "set -x"
* tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
Otherwise, in a test script that uses "set -x" (like many in vc-dwim)
a use like "compare exp out" would get evoke an unconditional failure.
Alfred M. Szmidt [Wed, 21 Dec 2011 09:47:03 +0000 (10:47 +0100)]
bootstrap: fix it to honor $ACLOCAL_FLAGS once again
The 2011-12-17 change, commit
767ccd40, replaced a manual invocation
of aclocal that used explicit $ACLOCAL_FLAGS with an invocation of
autoreconf that did not.
* build-aux/bootstrap: Use $ACLOCAL_FLAGS when invoking autoreconf.
Reported by Mats Erik Andersson <gnu@gisladisker.se>.
Jim Meyering [Sat, 17 Dec 2011 16:00:44 +0000 (17:00 +0100)]
bootstrap: remove some now-unneeded code
This script arose back when gnulib-tool was young.
Since then, it has seen improvements that render much of this
script unnecessary. In particular, it can now make symlinks
to the files it uses. Also, I no longer see as much value in
marking files as read-only via comments.
If you relied on the symlink-creation feature of the preceding
version of this script, you can get most of that functionality
by adding the --symlink option to the definition of
gnulib_tool_option_extras in your bootstrap.conf file.
* build-aux/bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions.
Run autopoint and libtoolize *before* gnulib-tool.
After it, run an abbreviated autoreconf, rather than a loop around
all tools.
(slirp, bt_mark_as_generated): Remove functions.
Paul Eggert [Mon, 19 Dec 2011 00:30:21 +0000 (16:30 -0800)]
ftoastr: fix typo
* lib/ftoastr.h: Fix misspelling in comment.
Reuben Thomas [Sun, 18 Dec 2011 14:23:31 +0000 (15:23 +0100)]
README-release: fix punctuation
* top/README-release: s/:/./
Jim Meyering [Sat, 17 Dec 2011 15:28:55 +0000 (16:28 +0100)]
bootstrap: correct the recent buildreq change
The 2011-12-07 commit,
39f5f1e4, omitted some '*'s, and thus
had no effect.
* build-aux/bootstrap (buildreq): Bracket each search term with
"*...*", so that the shell "case" statement works as intended.
Add comments.
Bernhard Voelker [Mon, 5 Sep 2011 11:28:20 +0000 (13:28 +0200)]
build: let bootstrap resort to wget for downloading .po files
* build-aux/bootstrap (download_po_files): Fallback to wget when
downloading the .po files via rsync failed. This is necessary to
bootstrap behind a strict firewall.
Paul Eggert [Fri, 16 Dec 2011 06:46:46 +0000 (22:46 -0800)]
* m4/stdint.m4 (gl_STDINT_H): Finish up previous change.
Paul Eggert [Thu, 15 Dec 2011 19:48:25 +0000 (11:48 -0800)]
stdint: don't assume C++11 when compiling with g++
Problem reported for glibc 2.14 and g++ by Alexander V. Lukyanov in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00099.html>.
* m4/stdint.m4 (gl_STDINT_H): Don't go to extra work to make it
work also in C++ before C++11, as that improperly inhibits
generating a substitute stdint.h for that case.
Paul Eggert [Thu, 15 Dec 2011 19:10:23 +0000 (11:10 -0800)]
alloca: protect comment from gnulib-tool
* lib/alloca.c: Change "GCC version 2" to "GCC 2" in comment, so
that gnulib-tool doesn't think it's a license, and munge it to
say "GCC version 3".
Paul Eggert [Thu, 15 Dec 2011 18:38:12 +0000 (10:38 -0800)]
ChangeLog: fix encoding typo
Ludovic Courtès [Thu, 15 Dec 2011 00:10:48 +0000 (01:10 +0100)]
localcharset: Use an absolute path in TESTS_ENVIRONMENT.
* modules/localcharset (LOCALCHARSET_TESTS_ENVIRONMENT): Use
$(abs_top_builddir) instead of $(top_builddir).
Alex Nelson [Wed, 14 Dec 2011 02:52:59 +0000 (18:52 -0800)]
strftime-tests: also test nanoseconds
The test-strftime program did not test the display of nanoseconds. This
patch clarifies the expected output for a number of nanoseconds with
trailing zeroes.
* tests/test-strftime.c (T): Add a test of %N.
Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>
Paul Eggert [Tue, 13 Dec 2011 23:27:41 +0000 (15:27 -0800)]
inttypes, stdint: add C++11 support
C++11 says there's no need to define __STDC_CONSTANT_MACROS etc.
when including inttypes.h and stdint.h. Support this change to
the standard.
* doc/posix-headers/inttypes.texi (inttypes.h):
* doc/posix-headers/stdint.texi (stdint.h): Document this.
* lib/inttypes.in.h (__STDC_FORMAT_MACROS) [! __cplusplus]:
Define if not defined already, for the benefit of pre-C++11 hosts.
Define the standard format macros (e.g., PRId8) always.
* lib/stdint.in.h (__STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS):
Likewise, if __cpluspus. Define the standard constant and limit
macros (e.g., INT8_C, INT8_MAX) always.
* m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Do not define
GL_TRIGGER_STDC_LIMIT_MACROS or __STDC_LIMIT_MACROS; no longer needed.
* m4/stdint.m4 (gl_STDINT_H): Update comments about these macros.
* tests/test-inttypes.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
(__STDC_FORMAT_MACROS): Do not define, since we assume C++11 API now.
* tests/test-stdint.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS):
Likewise.
Paul Eggert [Tue, 13 Dec 2011 17:01:04 +0000 (09:01 -0800)]
Fix ChangeLog typo in previous commit.
Paul Eggert [Mon, 12 Dec 2011 16:13:33 +0000 (08:13 -0800)]
nonblocking tests: Fix test failure on Linux/MIPS.
Suggested by Prerna Saxena in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00080.html>.
* tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/PPC64]:
Set to
1100000.
Jim Meyering [Mon, 12 Dec 2011 09:57:17 +0000 (10:57 +0100)]
argmatch: don't hard-code `' when listing valid option arguments
* lib/argmatch.c (argmatch_valid): Don't hard-code `%s'. Instead,
use the quote function to add quotes. Use fputs rather than
fprintf for the format string with no format directive.
Karl Berry [Sat, 10 Dec 2011 16:28:15 +0000 (08:28 -0800)]
autoupdate
Karl Berry [Sat, 10 Dec 2011 16:23:45 +0000 (08:23 -0800)]
autoupdate
Eric Blake [Wed, 7 Dec 2011 16:51:21 +0000 (09:51 -0700)]
bootstrap: detect tools required by gnulib-tool
List tools needed by gnulib-tool, whether or not the project
also requires the tools in cfg.mk $buildreq. In particular,
detect if the project uses gnulib-local diffs, in which case
patch is a prerequisite.
* build-aux/bootstrap (buildreq): Provide minimum implicit
dependencies.
* DEPENDENCIES: Mention patch as a prereq.
Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible [Mon, 5 Dec 2011 02:46:40 +0000 (03:46 +0100)]
sethostname: Port to Windows platforms.
* lib/sethostname.c: Provide an alternate implementation for Windows
platforms.
* tests/test-sethostname2.c (geteuid): Redefine on Cygwin.
(main): Skip the test if sethostname() fails with EPERM. On Windows
platforms, don't check the result of gethostname().
2011-12-04 Bruno Haible <bruno@clisp.org>
Bruno Haible [Mon, 5 Dec 2011 01:58:55 +0000 (02:58 +0100)]
tests: Avoid spurious error message on platforms without mktemp program.
* tests/init.sh (mktempd_): Run mktemp in a subcommand.
Bruno Haible [Sun, 4 Dec 2011 14:47:27 +0000 (15:47 +0100)]
sethostname: Fix documentation.
* doc/glibc-functions/sethostname.texi: Move the Solaris problem to the
"not fixed" section.
Bruno Haible [Sat, 3 Dec 2011 15:19:56 +0000 (16:19 +0100)]
gnulib-tool: Verify that the License field is present and non-empty.
* gnulib-tool (func_get_license_raw): New function, extracted from
func_get_license.
(func_get_license): Use it. Warn if the module is not a test module and
has no license.
Suggested by Jim Meyering.
Bruno Haible [Sat, 3 Dec 2011 14:57:00 +0000 (15:57 +0100)]
sethostname tests: Fix link error on mingw.
* tests/test-sethostname1.c: New file, extracted from
tests/test-sethostname.c.
* tests/test-sethostname2.c: New file, extracted from
tests/test-sethostname.c.
* tests/test-sethostname.c: Remove file.
* modules/sethostname-tests (Files): Add tests/test-sethostname1.c,
tests/test-sethostname2.c. Remove tests/test-sethostname.c.
(Depends-on): Add gethostname.
(Makefile.am): Compile both test-sethostname1 and test-sethostname2.
Link the latter with $(GETHOSTNAME_LIB).
Bruno Haible [Sat, 3 Dec 2011 14:28:47 +0000 (15:28 +0100)]
sethostname tests: Fix compilation error on mingw.
* tests/test-sethostname.c: Don't include <sys/types.h>.
(geteuid): Use a dummy value without uid_t.
* modules/sethostname-tests (Depends-on): Remove sys_types.
Bruno Haible [Sat, 3 Dec 2011 14:13:59 +0000 (15:13 +0100)]
sethostname tests: Avoid a gcc warning.
* tests/test-sethostname.c (main): Remove an unused variable.
Bruno Haible [Sat, 3 Dec 2011 13:50:45 +0000 (14:50 +0100)]
Tweak last commit.
* modules/sethostname-tests (Files): Sort by decreasing importance.
(configure.ac): Check for geteuid.
* tests/test-sethostname.c (main): Emit error messages to stderr. Skip
the test when there's nothing to test. Drop an unnecessary cast.
Improve an error message. Verify that the final sethostname() call
succeeds.
Ben Walton [Sat, 3 Dec 2011 04:04:19 +0000 (23:04 -0500)]
Add a test suite for the sethostname module.
Provide a module that tests the functionality of sethostname().
* modules/sethostname-tests: New file. A test program
for the sethostname module.
* tests/test-sethostname.c: Likewise.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Bruno Haible [Sat, 3 Dec 2011 13:22:09 +0000 (14:22 +0100)]
Tweak last commit.
* lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
Fix preprocessor directives indentation. Fix typos.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
* modules/unistd (Makefile): Likewise.
Ben Walton [Sat, 3 Dec 2011 04:04:18 +0000 (23:04 -0500)]
Integrate the sethostname module into unistd
Ensure that sethostname is accounted for within the unistd module.
* lib/unistd.in.h: Integrate the SETHOSTNAME preprocessor handling
into the unistd.h header.
* m4/unistd_h.m4: Setup the autoconf handling for the SETHOSTNAME
preprocessor directives.
* modules/unistd: Setup the Makefile substitutions of the
SETHOSTNAME preprocessor directives.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Bruno Haible [Sat, 3 Dec 2011 13:09:14 +0000 (14:09 +0100)]
Tweak last commit.
* lib/sethostname.c: Don't include <string.h>.
(sethostname): No need to copy the argument string to the stack. Don't
call clearerr. Preserve errno when fprintf failed.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Comment about HOST_NAME_MAX.
Don't invoke AC_REPLACE_FUNCS.
* modules/sethostname (Link): Remove empty section.
* doc/glibc-functions/sethostname.texi: Gnulib does not fix the ENOSYS
failure problem.
Ben Walton [Sat, 3 Dec 2011 04:04:17 +0000 (23:04 -0500)]
Add a new sethostname module
Define sethostname on platforms that do not provide the declaration.
Provide a function for platforms that lack it. The general handling
of the provided function is to simply return -1 and set errno to
ENOSYS. A specific handler is provided for Minix.
* lib/sethostname.c (sethostname): New file. Provide sethostname
for systems that lack it.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): New file. Detection of
sethostname declaration and function.
* modules/sethostname: New file. Define the sethostname module.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Bruno Haible [Sat, 3 Dec 2011 12:27:29 +0000 (13:27 +0100)]
Tweak last commit.
* m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Trim blank line.
Ben Walton [Sat, 3 Dec 2011 04:04:16 +0000 (23:04 -0500)]
Split the HOST_NAME_MAX detection into a separate m4 macro
The sethostname module will rely on this code too, so make it a
separate function.
* m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Make this a separate
macro so it can be used by the pending sethostname module.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Bruno Haible [Sat, 3 Dec 2011 12:09:58 +0000 (13:09 +0100)]
Fix module descriptions syntax.
* modules/argv-iter (License): Fix syntax.
* modules/di-set (License): Likewise.
* modules/ino-map (License): Likewise.
Reported by Stefano Lattarini <stefano.lattarini@gmail.com>.
Paul Eggert [Fri, 2 Dec 2011 09:34:53 +0000 (01:34 -0800)]
stdalign: port to Clang 3.0
Problem reported by Simon Josefsson in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00005.html>.
* doc/posix-headers/stdalign.texi (stdalign.h): Mention Clang 3.0,
which has <stdalign.h> but which does not define alignof.
* m4/stdalign.m4 (gl_STDALIGN_H): Check for Clang 3.0's problem.
Eric Blake [Thu, 1 Dec 2011 20:58:28 +0000 (13:58 -0700)]
mktempd: silence dd usage
When running a testsuite on FreeBSD, I saw a lot of:
1+ records in
0+1 records out
10 bytes transferred in 0.000063 secs (158875 bytes/sec)
literring the testsuite, and traced it to the fact that we
were silencing one, but not the other, dd usage in our fallback.
* build-aux/mktempd (rand_bytes): Silence dd.
Signed-off-by: Eric Blake <eblake@redhat.com>
Simon Josefsson [Wed, 30 Nov 2011 10:59:31 +0000 (11:59 +0100)]
manywarnings: Don't mention gcc version in docstring.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Doc fix. Suggested by
Jim Meyering <meyering@redhat.com>.
Jim Meyering [Wed, 30 Nov 2011 08:35:00 +0000 (09:35 +0100)]
hash: mark a few floating point constants with "f" suffix
* lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR)
(DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal
floating point constants with "f", since they're destined to be
saved/used as "float"s.
Paolo Bonzini [Wed, 30 Nov 2011 00:58:54 +0000 (01:58 +0100)]
float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
* tests/test-float.c (test_long_double): Correct and re-enable the
assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.
Matthew Wala [Wed, 30 Nov 2011 00:44:15 +0000 (01:44 +0100)]
Avoid subtracting two pointers that don't point into the same block.
* lib/argp-help.c (hol_append): Reorder pointer subtractions so that
only pointers into the same memory block are subtracted. We cannot
assume that sizeof (ptrdiff_t) == sizeof (void *).
Eric Blake [Tue, 29 Nov 2011 21:37:14 +0000 (14:37 -0700)]
maint.mk: add syntax check for use of compare from init.sh
Comparing expected against actual gives more consistent diff listings
when reporting test failures. Enforce this idiom on test files
that use init.sh, and allow projects to recognize an alternate
pattern for recognizing tests scripts that use a compare function.
* top/maint.mk (sc_prohibit_reversed_compare_failure): New rule,
moved here from coreutils.
Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake [Tue, 29 Nov 2011 22:01:22 +0000 (15:01 -0700)]
manywarnings: drop -Wunsuffixed-float-constants
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
'1.0D', which is the only way to silence this warning for 'double'.
Signed-off-by: Eric Blake <eblake@redhat.com>
Jim Meyering [Tue, 29 Nov 2011 13:25:56 +0000 (14:25 +0100)]
hash: mark compute_bucket_size with the pure attribute
* lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
Jim Meyering [Tue, 29 Nov 2011 09:09:41 +0000 (10:09 +0100)]
quotearg, propername: correct pragma guard expression
* lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer.
* lib/propername.c: Likewise. Reported by Bernhard Voelker.