Bruno Haible [Fri, 3 Feb 2012 21:58:33 +0000 (22:58 +0100)]
stdioext: Add tentative support for Plan9.
* lib/stdio-impl.h: Include <errno.h>.
* lib/fseterr.c (fseterr) [EPLAN9]: Add conditional code.
* lib/freadable.c (freadable): Likewise.
* lib/fwritable.c (fwritable): Likewise.
* lib/fbufmode.c (fbufmode): Likewise.
* lib/freading.c (freading): Likewise.
* lib/fwriting.c (fwriting): Likewise.
* lib/freadptr.c (freadptr): Likewise.
* lib/freadseek.c (freadptrinc): Likewise.
* lib/freadahead.c (freadahead): Likewise.
* lib/fpurge.c (fpurge): Likewise.
* lib/fseeko.c (rpl_fseeko): Likewise.
* m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Plan9.
Reported by Jens Staal <staal1978@gmail.com>.
Jim Meyering [Thu, 2 Feb 2012 08:12:13 +0000 (09:12 +0100)]
file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
* lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs)
would evoke a new gcc warning. Given all of the #ifdefs, it is better
not even to try to add the attribute. Instead, add a pragma to suppress
the suggestion/warning.
Paul Eggert [Wed, 1 Feb 2012 05:12:29 +0000 (21:12 -0800)]
Spelling fixes.
Karl Berry [Tue, 31 Jan 2012 22:24:40 +0000 (14:24 -0800)]
typo
Karl Berry [Tue, 31 Jan 2012 17:03:05 +0000 (09:03 -0800)]
autoupdate
Bruno Haible [Tue, 31 Jan 2012 11:15:46 +0000 (12:15 +0100)]
popen: Make more robust on Windows.
* lib/popen.c: On native Windows, use the _popen based code even if
HAVE_POPEN is set.
* doc/posix-functions/popen.texi: Mention necessity of COMSPEC
environment variable on native Windows.
Bruno Haible [Tue, 31 Jan 2012 11:13:29 +0000 (12:13 +0100)]
Fix date of recent ChangeLog entries.
Bruno Haible [Tue, 31 Jan 2012 02:02:53 +0000 (03:02 +0100)]
pclose: Fix typo.
* lib/stdio.in.h (pclose): Fix typo in warning message.
Bruno Haible [Mon, 30 Jan 2012 21:47:22 +0000 (22:47 +0100)]
doc about getlogin_r, setstate.
* doc/posix-functions/getlogin_r.texi: List the incompatible
declaration problem under "not fixed by gnulib".
* doc/posix-functions/setstate.texi: Mention incompatible declaration
problem on Solaris 11 and other platforms.
Chuanchang Jia [Mon, 30 Jan 2012 21:39:01 +0000 (22:39 +0100)]
poll tests: Make test more robust.
* tests/test-poll.c: Include macros.h.
(test_accept_first, test_pair, test_socket_pair, test_pipe): Verify
return value of various I/O operations.
* modules/poll-tests (Files): Add tests/macros.h.
Bruno Haible [Mon, 30 Jan 2012 20:43:40 +0000 (21:43 +0100)]
sys_stat: Fix support for mingw64 and MSVC.
* lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
header files already do it.
(stat) [mingw, msvc]: Redefine the symbol to which stat is defined, not
stat itself.
Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
Bruno Haible [Mon, 30 Jan 2012 20:31:57 +0000 (21:31 +0100)]
wcwidth: Work around bug in UTF-8 locale on OpenBSD 5.0.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test also wcwidth of U+05B0.
* doc/posix-functions/wcwidth.texi: Mention the OpenBSD 5.0 bug.
Bruno Haible [Mon, 30 Jan 2012 19:32:33 +0000 (20:32 +0100)]
quotearg: Fix test failure on MacOS X 10.5.
* tests/test-quotearg-simple.c: Include localcharset.h.
(main): If the locale encoding is not ASCII, bypass the tests of
locale_quoting_style and clocale_quoting_style.
* modules/quotearg-tests (Depends-on): Add 'localcharset'.
Jim Meyering [Sun, 29 Jan 2012 21:30:20 +0000 (22:30 +0100)]
maint.mk: sc_prohibit_canonicalize_without_use: avoid false positive
* top/maint.mk (sc_prohibit_canonicalize_without_use): Also
detect uses of canonicalize_file_name.
Karl Berry [Sun, 29 Jan 2012 16:00:40 +0000 (08:00 -0800)]
autoupdate
Bruno Haible [Sat, 28 Jan 2012 22:29:16 +0000 (23:29 +0100)]
test-framework-sh: Fix test failure with AIX 7.1 diff.
* tests/init.sh (compare_): Don't use 'diff -u' if it inserts a space
in column 1, like 'diff -c' does.
* tests/test-init.sh (test_compare): Don't repeat the test from init.sh
whether 'diff -u' is used. Instead, test whether the output contains
some '@' character.
Paul Eggert [Sat, 28 Jan 2012 21:31:06 +0000 (13:31 -0800)]
strtoimax: eliminate need for stdint.h, inttypes.h checks
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't use
gl_AC_HEADER_STDINT_H or gl_AC_HEADER_INTTYPES_H. This reduces
the prerequisites for a recently-introduced strtoimax test.
I guess this might cause strtoimax to be replaced when not
strictly necessary on older hosts, but this shouldn't introduce
any bugs and it should make Emacs 'configure' faster on typical
modern hosts. Problem discovered when importing the latest gnulib
to an Emacs test version.
* modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4.
Bruno Haible [Sat, 28 Jan 2012 17:12:10 +0000 (18:12 +0100)]
sys_time: Override 'struct timeval' on some native Windows platforms.
* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Test whether tv_sec
has the right type. Set REPLACE_STRUCT_TIMEVAL if not.
(gl_HEADER_SYS_TIME_H_DEFAULTS): Initialize REPLACE_STRUCT_TIMEVAL.
* lib/sys_time.in.h: Include <winsock2.h> also when 'struct timeval'
needs to be overridden.
(timeval): Override if REPLACE_STRUCT_TIMEVAL is set.
* modules/sys_time (Makefile.am): Substitute REPLACE_STRUCT_TIMEVAL.
* tests/test-sys_select.c: Check that the tv_sec member has the same
size as a 'time_t'.
* tests/test-sys_time.c: Likewise.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): If REPLACE_STRUCT_TIMEVAL
is set, set also REPLACE_GETTIMEOFDAY.
* lib/gettimeofday.c (gettimeofday): If 'struct timeval' is overridden,
convert the resulting 'struct timeval' before returning.
* lib/select.c: Include <sys/time.h>.
(select, timeval): Undefine at the right place.
* modules/select (Depends-on): Add sys_time.
* doc/posix-headers/sys_time.texi: Mention the problem with tv_sec on
some Windows platforms.
Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
Marc-André Lureau [Sat, 28 Jan 2012 12:23:31 +0000 (13:23 +0100)]
accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
* lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
an integer.
* lib/fcntl.c (dupfd): Likewise.
* lib/w32sock.h (SOCKET_TO_FD): Likewise.
Bruno Haible [Sat, 28 Jan 2012 12:15:36 +0000 (13:15 +0100)]
fcntl: Avoid compilation error on native Windows.
* modules/fcntl (Depends-on): Add 'close'.
Marc-André Lureau [Sat, 28 Jan 2012 11:39:43 +0000 (12:39 +0100)]
select, poll, isatty: Avoid warnings on x86_64 mingw64.
* lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
pointer to an integer.
* lib/poll.c (IsConsoleHandle): Likewise.
* lib/isatty.c (IsConsoleHandle): Likewise.
Jim Meyering [Sat, 28 Jan 2012 09:49:35 +0000 (10:49 +0100)]
doc: clarify README-release
* top/README-release: Clarify: you should make a point to have
the latest stable versions of build tools in your PATH, and the
reference to buildreq is solely for its list of tool names, not
for its minimal-functional version numbers.
Prompted by discussion with Reuben Thomas and Gary V. Vaughan.
Jim Meyering [Sat, 28 Jan 2012 09:16:25 +0000 (10:16 +0100)]
maint.mk: use more readable (yet functionally equivalent) quoting
It is common to quote a single quote in a single quoted string like
this: '...'\''...'. Unless you know the idiom, that looks like
gibberish, so prefer to double-quote the string when possible.
Then you can use a more readable, lone single quote: "...'..."
* top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
"don't" is more readable than the equivalent 'don'\''t'.
(sc_cast_of_x_alloc_return_value): Likewise.
(sc_cast_of_alloca_return_value): Likewise.
(sc_makefile_path_separator_check): Similar: use ":" in '...',
rather than '\'':'\''.
Paul Eggert [Sat, 28 Jan 2012 06:17:42 +0000 (22:17 -0800)]
stdalign: relax _Alignof and tighten _Alignas test
* m4/stdalign.m4 (gl_STDALIGN_H): Relax the _Alignof test,
as it was too strict: alignof must divide offsetof, but it need
not equal offsetof. Inspired by Joseph S. Myers's comment
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023#c10>.
Conversely, tighten the _Alignas test a bit, as the resulting
alignment must be exactly 8.
Bruno Haible [Fri, 27 Jan 2012 20:20:39 +0000 (21:20 +0100)]
stdalign: Document the last change.
* doc/posix-headers/stdalign.texi: Mention GCC bug 52023.
Paul Eggert [Fri, 27 Jan 2012 18:22:51 +0000 (10:22 -0800)]
Fix bug# typo in previous patch.
Paul Eggert [Fri, 27 Jan 2012 18:17:18 +0000 (10:17 -0800)]
stdalign: check that alignof and offsetof are consistent
* m4/stdalign.m4 (gl_STDALIGN_H): Check for GCC bug 52023.
Problem reported for gnulib by Richard W.M. Jones in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00340.html>.
Jim Meyering [Fri, 27 Jan 2012 09:19:26 +0000 (10:19 +0100)]
update-copyright: accept new option: UPDATE_COPYRIGHT_USE_INTERVALS=2
* build-aux/update-copyright: When UPDATE_COPYRIGHT_USE_INTERVALS=2,
convert a sequence with gaps to the minimal containing range.
For example, convert 2000, 2004-2007, 2009 to 2000-2009.
* tests/test-update-copyright.sh: Test for this.
The FSF confirmed it is ok to do this, assuming there is at
least one significant change per year in the affected range:
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29554/focus=29860
Eric Blake [Fri, 27 Jan 2012 04:21:53 +0000 (21:21 -0700)]
build-aux/ylwrap: restore x bit
Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible [Thu, 26 Jan 2012 21:21:45 +0000 (22:21 +0100)]
pipe2: refine doc about thread-safety
* doc/glibc-functions/pipe2.texi: Clarify the extent of the
multithread-safety problem.
* doc/glibc-functions/accept4.texi: Likewise.
Bruno Haible [Thu, 26 Jan 2012 17:11:47 +0000 (18:11 +0100)]
posix_spawn_file_actions_addopen: Fix 2012-01-08 commit.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN):
In the test program, include <fcntl.h>, for O_RDONLY.
Eric Blake [Thu, 26 Jan 2012 15:31:48 +0000 (08:31 -0700)]
pipe2, assign4: document lack of thread-safety in replacement
* doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
issue in replacement.
* doc/glibc-functions/accept4.texi (accept4): Likewise.
Based on a report by Eric Wong.
Marc-André Lureau [Tue, 24 Jan 2012 12:21:56 +0000 (13:21 +0100)]
malloca: Avoid warnings on x86_64 mingw64.
* lib/malloca.c: Include <stdint.h>.
(mmalloca, freea): Use uintptr_t to convert pointers to integers.
* modules/malloca (Depends-on): Add stdint.
* modules/relocatable-prog-wrapper (Depends-on): Likewise.
Paul Eggert [Wed, 25 Jan 2012 19:08:01 +0000 (11:08 -0800)]
obstack: remove __STDC__ conditionals
* lib/obstack.h: Remove __STDC__ conditionals, as suggested by Joseph
S. Myers in <http://cygwin.com/ml/libc-alpha/2012-01/msg00104.html>.
This leaves lib/localcharset.c, m4/iconv.m4, and a confusing comment in
m4/include_next.m4 as the only gnulib-maintained places that still
refer to __STDC__.
Bruno Haible [Tue, 24 Jan 2012 12:06:35 +0000 (13:06 +0100)]
havelib: Modern quoting.
* build-aux/config.rpath: Quote 'like this', not `like this', as per
the recent change to the GNU coding standards.
Bruno Haible [Tue, 24 Jan 2012 11:22:41 +0000 (12:22 +0100)]
stdint: Improve support for Android.
* lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
Reported by Simon Josefsson <simon@josefsson.org>.
Paul Eggert [Tue, 17 Jan 2012 23:48:12 +0000 (15:48 -0800)]
doc: omit trailing empty lines from INSTALL etc.
* doc/Makefile (INSTALL): Omit trailing empty lines.
(INSTALL.ISO, INSTALL.UTF-8): Build from INSTALL, so that these also
omit trailing empty lines. This simplifies the build procedure.
Jim Meyering [Mon, 23 Jan 2012 14:51:02 +0000 (15:51 +0100)]
tests: avoid spurious warnings about gl_sockets_startup
Fedora rawhide's gcc version 4.7.0
20120119 with -Wunused-value
would warn about every use of "gl_sockets_startup (SOCKETS_1_1);"
reporting a "statement with no effect".
* tests/test-accept.c (main): Mark as "(void)".
* tests/test-accept4.c (main): Likewise.
* tests/test-bind.c (main): Likewise.
* tests/test-connect.c (main): Likewise.
* tests/test-getpeername.c (main): Likewise.
* tests/test-getsockname.c (main): Likewise.
* tests/test-getsockopt.c (main): Likewise.
* tests/test-listen.c (main): Likewise.
* tests/test-recv.c (main): Likewise.
* tests/test-recvfrom.c (main): Likewise.
* tests/test-send.c (main): Likewise.
* tests/test-sendto.c (main): Likewise.
* tests/test-setsockopt.c (main): Likewise.
* tests/test-shutdown.c (main): Likewise.
Bruno Haible [Sat, 21 Jan 2012 13:39:02 +0000 (14:39 +0100)]
locale-fr.m4: Fix for Android.
* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Avoid compilation
failure of the test program on Bionic libc.
Jim Meyering [Sat, 21 Jan 2012 17:12:30 +0000 (18:12 +0100)]
bootstrap: fail when bootstrap_post_import_hook fails
Otherwise, it's far too easy to miss diagnostics emitted
between gnulib-tool's output and that of running configure.
* build-aux/bootstrap: Fail when bootstrap_post_import_hook fails.
Karl Berry [Sat, 21 Jan 2012 16:17:48 +0000 (08:17 -0800)]
update from texinfo
Jim Meyering [Tue, 17 Jan 2012 17:48:21 +0000 (18:48 +0100)]
maint: enable sc_trailing_blank
* build-aux/pmccabe.css: Remove trailing blanks.
* doc/acl-cygwin.txt: Likewise.
* doc/gnu-oids.texi: Likewise
* cfg.mk: Enable sc_trailing_blank.
Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
Jim Meyering [Tue, 17 Jan 2012 17:41:18 +0000 (18:41 +0100)]
maint: enable sc_prohibit_openat_without_use
* cfg.mk: Enable sc_prohibit_openat_without_use.
Exempt lib/selinux-at.c.
Jim Meyering [Tue, 17 Jan 2012 17:30:09 +0000 (18:30 +0100)]
maint: enable sc_prohibit_cloexec_without_use
* cfg.mk: Enable sc_prohibit_cloexec_without_use.
* lib/dup-safer-flag.c: Don't include "cloexec.h". Not needed.
Jim Meyering [Tue, 17 Jan 2012 17:21:34 +0000 (18:21 +0100)]
maint: enable sc_prohibit_intprops_without_use
* cfg.mk: Enable sc_prohibit_intprops_without_use
* tests/test-nanosleep.c: Don't include "intprops.h". Not needed.
* lib/ftoastr.c: Likewise.
Jim Meyering [Tue, 17 Jan 2012 17:10:01 +0000 (18:10 +0100)]
maint: enable sc_prohibit_hash_pjw_without_use
* cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
* top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
to match any use of \<hash_pjw\>, i.e., not necessarily with a
following " (".
Jim Meyering [Tue, 17 Jan 2012 17:05:45 +0000 (18:05 +0100)]
maint: enable double-word-prohibiting rule
* cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
Exempt three files.
Jim Meyering [Tue, 17 Jan 2012 16:56:22 +0000 (17:56 +0100)]
maint: remove empty lines at EOF, but excluding modules/*
Apply syntax rules at home as well as abroad. Most changes
were induced by running this:
make srcdir=. _build-aux=build-aux -f top/maint.mk \
sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
| xargs perl -pi -0777 -e 's/\n\n+$/\n/'
* cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
Exempt modules/* and two binary files.
Also exclude doc/INSTALL*, per request from Bruno Haible.
* doc/regexprops-generic.texi: *Add* a newline at EOF. There was none.
* doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
* doc/Copyright/request-assign.future: Likewise.
* doc/Copyright/request-disclaim.changes: Likewise.
* doc/INSTALL: Likewise.
* doc/INSTALL.ISO: Likewise.
* doc/INSTALL.UTF-8: Likewise.
* doc/acl-cygwin.txt: Likewise.
* doc/acl-resources.txt: Likewise.
* doc/fdl-1.2.texi: Likewise.
* doc/fdl-1.3.texi: Likewise.
* doc/fdl.texi: Likewise.
* lib/argp-pin.c: Likewise.
* lib/round.c: Likewise.
* lib/unicase/u16-totitle.c: Likewise.
* lib/unictype/block_test.c: Likewise.
* lib/uninorm/canonical-decomposition.c: Likewise.
* m4/README: Likewise.
* m4/relocatable-lib.m4: Likewise.
* tests/test-isnand-nolibm.c: Likewise.
* tests/test-isnand.c: Likewise.
* tests/uninorm/NormalizationTest.txt: Likewise.
Jim Meyering [Tue, 17 Jan 2012 16:51:40 +0000 (17:51 +0100)]
maint: add framework to run syntax-check rules against gnulib sources
* cfg.mk: New file, to disable all currently-failing tests.
We'll enable them one by one, as they are made to pass.
* Makefile (sc_maint): New rule.
Bruno Haible [Sat, 21 Jan 2012 12:09:08 +0000 (13:09 +0100)]
stdint: Add support for Android.
* lib/stdint.in.h: When included from Bionic <sys/types.h>, just
include the system's <stdint.h>.
Reported by Simon Josefsson <simon@josefsson.org>.
Karl Berry [Thu, 19 Jan 2012 17:37:34 +0000 (09:37 -0800)]
autoupdate
Jim Meyering [Thu, 19 Jan 2012 05:14:31 +0000 (06:14 +0100)]
bootstrap: add bootstrap_post_import_hook
Bison does still need something like the gnulib_mk_hook whose
invocation I had to remove along with slurp in commit
767ccd40.
Technically, we could get along without it, but doing so would
have required living with a warning and a mandatory post-bootstrap
automake rerun.
* build-aux/bootstrap (gnulib_mk_hook): Remove definition, too.
(bootstrap_post_import_hook): New function.
Invoke it after gnulib-tool --import and before autoreconf.
Jim Meyering [Wed, 18 Jan 2012 07:53:23 +0000 (08:53 +0100)]
gitlog-to-changelog: don't use "no_"-prefixed variable name
* build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
to enable both --cluster and --no-cluster. Change variable name,
s/\$no_cluster/$cluster/, and reverse usage to match.
Jim Meyering [Wed, 18 Jan 2012 07:45:29 +0000 (08:45 +0100)]
gitlog-to-changelog: use "||", not "or" in expressions
* build-aux/gitlog-to-changelog (main): Use "||", not "or" in
expressions.
Joel E. Denny [Tue, 17 Jan 2012 21:23:30 +0000 (16:23 -0500)]
gitlog-to-changelog: new option --no-cluster
* build-aux/gitlog-to-changelog: New option --no-cluster, disables
clustering of adjacent commit messages.
Jim Meyering [Tue, 17 Jan 2012 16:30:33 +0000 (17:30 +0100)]
maint: spell file systems with two words, not one
* m4/ls-mntd-fs.m4 (MOUNTED_INTERIX_STATVFS): Spell file systems with
two words, not one.
Jim Meyering [Mon, 16 Jan 2012 21:02:21 +0000 (22:02 +0100)]
fix a typo
Jim Meyering [Mon, 16 Jan 2012 20:56:31 +0000 (21:56 +0100)]
bootstrap: add a FIXME comment to ensure we eventually remove the hack
* build-aux/bootstrap (gnulib_tool_options): Add comment.
Eric Blake [Mon, 16 Jan 2012 17:55:56 +0000 (10:55 -0700)]
bootstrap: cater to autoconf 2.59
Autoconf didn't add --no-recursive until 2.59c, but gnulib supports
as far back as 2.59 for platforms like RHEL 5.
* build-aux/bootstrap (AUTORCONF): Work even when --no-recursive
is not available.
Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake [Mon, 16 Jan 2012 17:16:01 +0000 (10:16 -0700)]
bootstrap: properly check for libtool
Commit
767ccd40 changed things to invoke libtoolize before
gnulib-tool, but only for projects that use LT_INIT, even
though we had already probed for libtool via older spellings.
* build-aux/bootstrap (libtoolize): Also run libtool when older
usage is detected.
Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible [Sun, 15 Jan 2012 16:35:55 +0000 (17:35 +0100)]
Improve support for MSVC 9.
* lib/unistd.in.h: Include <io.h> when needed to avoid redefinition
clashes on MSVC.
* lib/fcntl.in.h: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/sys_stat.in.h: Likewise.
Stefano Lattarini [Sun, 15 Jan 2012 15:49:11 +0000 (16:49 +0100)]
gnupload: we hold the master copy of this script now
For motivation and more information, see:
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00222.html>
* build-aux/gnupload: Make it clear in the heading comments that the
master copy of this file is maintained by gnulib. Since we are at
it, bump its copyright year and ...
($scriptversion): ... the date in its version.
($usage): Patches and bug reports should be sent to the gnulib list,
not the automake one.
* config/srclist.txt: Don't try to sync 'gnupload' from automake
anymore.
Bruno Haible [Sun, 15 Jan 2012 12:19:33 +0000 (13:19 +0100)]
Fix module 'random'.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether random, srandom,
initstate, setstate are declared.
Bruno Haible [Sat, 14 Jan 2012 14:22:49 +0000 (15:22 +0100)]
Tests for module 'random'.
* modules/random-tests: New file.
* tests/test-random.c: New file, based on tests/test-random_r.c.
Bruno Haible [Sat, 14 Jan 2012 14:15:28 +0000 (15:15 +0100)]
New module 'random'.
* lib/stdlib.in.h (random, srandom, initstate, setstate): New
declarations.
* lib/random.c: New file, based on glibc/stdlib/random.c.
* m4/random.m4: New file.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM,
HAVE_RANDOM.
* modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM.
* modules/random: New file.
* config/srclist.txt: Add an entry for random.c.
* doc/posix-functions/random.texi: Mention the 'random' module.
* doc/posix-functions/initstate.texi: Likewise.
* doc/posix-functions/setstate.texi: Likewise.
* doc/posix-functions/srandom.texi: Likewise.
Karl Berry [Fri, 13 Jan 2012 14:40:53 +0000 (06:40 -0800)]
autoupdate
Bruno Haible [Thu, 12 Jan 2012 21:55:13 +0000 (22:55 +0100)]
random_r: Use common idioms.
* lib/random_r.c: Include <stdlib.h> first.
Bruno Haible [Thu, 12 Jan 2012 21:54:15 +0000 (22:54 +0100)]
random_r: Override incompatible API on AIX, OSF/1.
* lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
Override the system function if REPLACE_RANDOM_R is 1.
* m4/random_r.m4 (gl_FUNC_RANDOM_R): Require AC_CANONICAL_HOST. On AIX
and OSF/1, set REPLACE_RANDOM_R.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RANDOM_R.
* modules/stdlib (Makefile.am): Substitute REPLACE_RANDOM_R.
* modules/random_r (configure.ac): Test REPLACE_RANDOM_R.
* doc/glibc-functions/initstate_r.texi: Mention the AIX, OSF/1 problem.
* doc/glibc-functions/random_r.texi: Likewise.
* doc/glibc-functions/setstate_r.texi: Likewise.
Bruno Haible [Thu, 12 Jan 2012 20:58:09 +0000 (21:58 +0100)]
random_r: Support for MSVC 9.
* lib/random_r.c: Include stdint.h, not inttypes.h.
Eric Blake [Thu, 12 Jan 2012 15:44:08 +0000 (08:44 -0700)]
inet_ntop: guard extra work by IF_LINT
No need to penalize the code just to silence a gcc warning, so
follow the conventions used elsewhere in gnulib. Clients that
want to use extra warnings should also be using -Dlint.
* lib/inet_ntop.c (inet_ntop6): Mark spurious initialization, for
better code generation when not checking for warnings.
Suggested by Paul Eggert and Jim Meyering.
Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake [Thu, 12 Jan 2012 15:39:07 +0000 (08:39 -0700)]
strptime: fix regression on mingw
The previous change lost the side effect of skipping past a
time-zone offset sign. Instead, fix things to rely on the
fact that _GL_UNUSED can be applied to any variable, even if
some compilation paths use it, to silence gcc on the paths
where it is not used.
* lib/strptime.c (__strptime_internal) [!_LIBC && !HAVE_TM_GMTOFF]:
Fix regression. Reported by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reuben Thomas [Thu, 12 Jan 2012 02:04:49 +0000 (03:04 +0100)]
copy-file: add error-code-returning variant.
* lib/copy-file.h (GL_COPY_ERR_*): New enumeration items.
(qcopy_file_preserving): New declaration.
* lib/copy-file.c (qcopy_file_preserving): Renamed from
copy_file_preserving. Change return type to 'int'. Don't emit an error
message here.
(copy_file_preserving): New function.
* tests/test-copy-file.c: Include <stdlib.h>.
(main): Test qcopy_file_preserving if the environment variable
NO_STDERR_OUTPUT is set.
* tests/test-copy-file-1.sh: Invoke test-copy-file.sh a second time,
with NO_STDERR_OUTPUT
* tests/test-copy-file-2.sh: Likewise.
Bruno Haible [Wed, 11 Jan 2012 01:11:34 +0000 (02:11 +0100)]
copy-file: Use 'quote' module consistently.
* lib/copy-file.c (copy_file_preserving): Use quote().
Bruno Haible [Wed, 11 Jan 2012 01:01:45 +0000 (02:01 +0100)]
copy-file: Refactor.
* lib/copy-file.c: Include quote.h.
(copy_file_preserving): Call qcopy_acl instead of copy_acl. Emit error
message here.
* modules/copy-file (Depends-on): Add quote.
Bruno Haible [Wed, 11 Jan 2012 00:54:25 +0000 (01:54 +0100)]
acl: Export qcopy_acl.
* lib/acl.h (qcopy_acl): New declaration.
* lib/copy-acl.c (qcopy_acl): Make non-static.
Bruno Haible [Wed, 11 Jan 2012 00:52:23 +0000 (01:52 +0100)]
acl: Rename a local variable.
* lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
Bruno Haible [Wed, 11 Jan 2012 00:51:25 +0000 (01:51 +0100)]
acl: Align return values of copy_acl and qcopy_acl.
* lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl,
maybe < -1.
Eric Blake [Wed, 11 Jan 2012 22:49:20 +0000 (15:49 -0700)]
strptime: silence gcc warnings
Cross-compiling to mingw raised a couple of gcc warnings.
* lib/strptime.c (__strptime_internal) [!_NL_CURRENT],
[!_LIBC && !HAVE_TM_GMTOFF]: Avoid unused variables.
Reported by Daniel P. Berrange.
Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake [Wed, 11 Jan 2012 21:48:31 +0000 (14:48 -0700)]
inet_ntop: silence gcc warning
gcc -O2 couldn't tell that if best.base != -1, then best.len
was necessarily initialized.
* lib/inet_ntop.c (inet_ntop6): Initialize best.base.
Reported by Daniel P. Berrange.
Signed-off-by: Eric Blake <eblake@redhat.com>
Dmitry V. Levin [Wed, 11 Jan 2012 20:49:06 +0000 (00:49 +0400)]
getloadavg test: skip the test on GNU/Linux without /proc mounted
GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg
file. When /proc is not mounted, it always fails with ENOENT.
* tests/test-getloadavg.c (main): Treat ENOENT return code from
getloadavg(3) the same way as ENOSYS and ENOTSUP.
Bruno Haible [Tue, 10 Jan 2012 21:28:30 +0000 (22:28 +0100)]
regex: Avoid link error on MSVC 9.
* modules/regex (Depends-on): Add wctype.
Bruno Haible [Tue, 10 Jan 2012 19:53:57 +0000 (20:53 +0100)]
doc: Mention --with-tests option.
* gnulib-tool (func_usage): Suggest --with-tests for --test etc.
* doc/gnulib.texi (Extra tests modules): Mention the need to pass
--with-tests.
Reported by Reuben Thomas.
Reuben Thomas [Tue, 10 Jan 2012 18:42:39 +0000 (18:42 +0000)]
users.txt: order package names lexicographically.
Jim Meyering [Tue, 10 Jan 2012 16:32:32 +0000 (17:32 +0100)]
maint.mk: fix description in comment
* top/maint.mk (require_exactly_one_NL_at_EOF_): Fix comment.
Jim Meyering [Tue, 10 Jan 2012 07:38:52 +0000 (08:38 +0100)]
ignore-value: remove deprecated ignore_ptr function
* lib/ignore-value.h (ignore_ptr): Remove deprecated function.
* NEWS: Note this.
Jim Meyering [Mon, 9 Jan 2012 09:12:18 +0000 (10:12 +0100)]
test-init.sh: avoid a subshell
* tests/test-init.sh: Remove protective subshell.
Suggested by Bernhard Voelker. While a subshell is normally
required to protect against older shells (Solaris, FreeBSD) that
warn about a missing program before performing redirection, the
shell-selection tests performed by init.sh probably exclude any
offending shell.
Bruno Haible [Sun, 8 Jan 2012 22:32:36 +0000 (23:32 +0100)]
setlocale tests: Avoid test failure on Solaris 11 2011-11.
* tests/test-setlocale2.sh: Use 'env' to set the LC_ALL environment
variable.
Bruno Haible [Sun, 8 Jan 2012 21:31:53 +0000 (22:31 +0100)]
posix_spawn_file_actions_addopen: Work around Solaris 11 2011-11 bug.
* m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): New
macro.
* lib/spawn.in.h (posix_spawn_file_actions_addopen): Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
* lib/spawn_faction_addopen.c: Add workaround implementation if
HAVE_WORKING_POSIX_SPAWN.
* modules/spawn (Makefile): Substitute
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
* modules/posix_spawn_file_actions_addopen (configure.ac): Invoke
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN. Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
(Depends-on): Update conditions.
* doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
the Solaris 11 bug.
Bruno Haible [Sun, 8 Jan 2012 21:18:30 +0000 (22:18 +0100)]
posix_spawn_file_actions_adddup2: Work around Solaris 11 2011-11 bug.
* m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): New
macro.
* lib/spawn.in.h (posix_spawn_file_actions_adddup2): Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
* lib/spawn_faction_adddup2.c: Add workaround implementation if
HAVE_WORKING_POSIX_SPAWN.
* modules/spawn (Makefile): Substitute
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
* modules/posix_spawn_file_actions_adddup2 (configure.ac): Invoke
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2. Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
(Depends-on): Update conditions.
* doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
the Solaris 11 bug.
Bruno Haible [Sun, 8 Jan 2012 21:00:12 +0000 (22:00 +0100)]
posix_spawn_file_actions_addclose: Work around Solaris 11 2011-11 bug.
* m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
* m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Define
HAVE_WORKING_POSIX_SPAWN.
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): New macro.
* lib/spawn.in.h (posix_spawn_file_actions_addclose): Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
* lib/spawn_faction_addclose.c: Add workaround implementation if
HAVE_WORKING_POSIX_SPAWN.
* modules/spawn (Makefile): Substitute
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
* modules/posix_spawn_file_actions_addclose (configure.ac): Invoke
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE. Test
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
(Depends-on): Update conditions.
* doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
the Solaris 11 bug.
Bruno Haible [Sun, 8 Jan 2012 18:57:28 +0000 (19:57 +0100)]
doc: Update for Solaris 11 2011-11.
* doc/*/*.texi: Mention Solaris 11 2011-11 where appropriate.
* m4/printf.m4: Update comments.
Bruno Haible [Sun, 8 Jan 2012 18:07:23 +0000 (19:07 +0100)]
mktime: Avoid compilation error on Solaris 11.
* lib/mktime.c (WRAPV): Define to 0 on all non-glibc systems.
Bruno Haible [Sun, 8 Jan 2012 14:25:43 +0000 (15:25 +0100)]
doc: Small fix.
* doc/posix-headers/nl_types.texi: Correct platforms list.
Karl Berry [Sun, 8 Jan 2012 14:18:05 +0000 (06:18 -0800)]
autoupdate
Simon Josefsson [Sun, 8 Jan 2012 13:49:07 +0000 (14:49 +0100)]
Add lgpl-3.0 module.
* MODULES.html.sh (Support for building documentation): Add
lgpl-3.0.
* modules/lgpl-3.0: New file.
Jim Meyering [Sun, 8 Jan 2012 13:35:22 +0000 (14:35 +0100)]
select.c: indent with spaces, not TABs
* lib/select.c (windows_poll_handle): Indent with spaces, not TABs.
Karl Berry [Sat, 7 Jan 2012 16:49:48 +0000 (08:49 -0800)]
autoupdate
Paolo Bonzini [Sat, 7 Jan 2012 15:09:11 +0000 (16:09 +0100)]
Add ChangeLog entries for last 3 commits.
Paolo Bonzini [Sun, 18 Dec 2011 14:44:17 +0000 (15:44 +0100)]
quotearg: do not use grave accent for left quote
* lib/quotearg.c (gettext_quote): Map "`" to "'" for locale_quoting_style.
(quotearg_buffer_restyled): Fix example.
* tests/test-quotearg-simple.c (results_g): Adjust test vectors.
Paolo Bonzini [Sun, 18 Dec 2011 14:33:53 +0000 (15:33 +0100)]
quotearg: fall back to Unicode single quotes in UTF-8 and GB-18030 locales
Most programs do not have translation catalogs for English and much less
separate catalogs for British and American English. Drop the suggestion
to translators about these two, and provide it automatically for Unicode
locales. Like most programs, even those using American English, we use
single quotation marks. This conflicts with the American typographic
convention, but works better when you cite the entire error message
within double quotes. It also tries not to clash with established
practice and with what non-gnulib programs will usually do.
* lib/quotearg.c (gettext_quote): Hard-code U+2018 and U+2019 when using
an UTF-8 or GB-18030 locale. The list of other locales with quotes was
provided by Bruno Haible.
(quotearg_buffer_restyled): Adjust instructions to translators.
* lib/quotearg.h (locale_quoting_style): Do not put an example in the
text, since this would be wrong when using Unicode.
* modules/quotearg: Depend on c-strcaseeq.