gnulib.git
13 years agoautoupdate
Eric Blake [Fri, 30 Jul 2010 13:49:08 +0000 (07:49 -0600)]
autoupdate

13 years agostrtod: fix bug in replacement function on AIX
Eric Blake [Thu, 29 Jul 2010 23:32:23 +0000 (17:32 -0600)]
strtod: fix bug in replacement function on AIX

* lib/strtod.c (strtod): Special case broken "0x" parse in
underlying strtod.
* tests/test-strtod.c (main): Document AIX 7.1 bugs.
* doc/posix-functions/strtod.texi (strtod): Likewise.
Reported by Rainer Tammer.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agombrlen: Fix cross-compilation guess for AIX.
Bruno Haible [Fri, 30 Jul 2010 09:02:15 +0000 (11:02 +0200)]
mbrlen: Fix cross-compilation guess for AIX.

13 years agombrtowc: Fix cross-compilation guess for AIX.
Bruno Haible [Fri, 30 Jul 2010 08:56:07 +0000 (10:56 +0200)]
mbrtowc: Fix cross-compilation guess for AIX.

13 years ago* build-aux/gendocs.sh: restore lost x bit
Eric Blake [Thu, 29 Jul 2010 23:15:49 +0000 (17:15 -0600)]
* build-aux/gendocs.sh: restore lost x bit

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agoinit.sh: work around trap limitation of some shells
Peter O'Gorman [Thu, 29 Jul 2010 21:14:59 +0000 (15:14 -0600)]
init.sh: work around trap limitation of some shells

This limitation is already documented in the Autoconf manual.

* tests/init.sh (setup_): Move exit trap outside of shell function.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agostrtod: aid debugging
Eric Blake [Thu, 29 Jul 2010 14:43:00 +0000 (08:43 -0600)]
strtod: aid debugging

* m4/strtod.m4(gl_FUNC_STRTOD): Use distinct exit status to aid
understanding why strtod is rejected.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agounistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
Bruno Haible [Wed, 28 Jul 2010 21:00:52 +0000 (23:00 +0200)]
unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.

13 years agoAdd ChangeLog entries for recent commits.
Paolo Bonzini [Wed, 28 Jul 2010 20:48:13 +0000 (22:48 +0200)]
Add ChangeLog entries for recent commits.

13 years agoUse spaces for indentation, not tabs.
Bruno Haible [Wed, 28 Jul 2010 08:08:37 +0000 (10:08 +0200)]
Use spaces for indentation, not tabs.

13 years agombspcasecmp: Fix function specification.
Bruno Haible [Tue, 27 Jul 2010 22:53:16 +0000 (00:53 +0200)]
mbspcasecmp: Fix function specification.

13 years agoautoupdate
Karl Berry [Tue, 27 Jul 2010 14:22:56 +0000 (07:22 -0700)]
autoupdate

13 years agotimespec: use cast and not conditional, as truncation isn't possible
Paul R. Eggert [Mon, 26 Jul 2010 17:56:32 +0000 (10:56 -0700)]
timespec: use cast and not conditional, as truncation isn't possible

* lib/timespec.h (timespec_cmp): Use cast to pacify gcc -Wconversion
instead of a conditional.  Comment about the situation in more detail.
This undoes most of the 2009-10-29 patch.

13 years agounistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.
Paolo Bonzini [Tue, 20 Jul 2010 13:47:47 +0000 (15:47 +0200)]
unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.

* lib/unistr/u8-chr.c, lib/unistr/u8-strchr.c: Add Boyer-Moore like operation.
* modules/unistr/u8-chr: Depend on memchr.

13 years agounistr/u*-strchr: add tests
Paolo Bonzini [Tue, 20 Jul 2010 13:43:26 +0000 (15:43 +0200)]
unistr/u*-strchr: add tests

* modules/unistr/u16-strchr-tests, modules/unistr/u32-strchr-tests,
modules/unistr/u8-strchr-tests, tests/unistr/test-strchr.h,
tests/unistr/test-u16-strchr.c, tests/unistr/test-u32-strchr.c,
tests/unistr/test-u8-strchr.c: New files.

13 years agounistr/u*-chr: test multibyte sequences more
Paolo Bonzini [Tue, 20 Jul 2010 14:23:13 +0000 (16:23 +0200)]
unistr/u*-chr: test multibyte sequences more

* tests/unistr/test-chr.h: Do complete testing of the characters in the
test vector.
* tests/unistr/test-u8-chr.c, tests/unistr/test-u32-chr.c,
tests/unistr/test-u16-chr.c (U_UCTOMB): Define.

13 years agounistr/u*-chr: test multibyte sequences
Paolo Bonzini [Tue, 20 Jul 2010 14:23:13 +0000 (16:23 +0200)]
unistr/u*-chr: test multibyte sequences

* tests/unistr/test-chr.h: Put characters above 0-127 in the test input.

13 years agounistr/u*-chr: prepare for multibyte tests
Paolo Bonzini [Tue, 20 Jul 2010 14:06:33 +0000 (16:06 +0200)]
unistr/u*-chr: prepare for multibyte tests

* modules/unistr/u16-chr-tests: Depend on u32-to-u16.
* modules/unistr/u8-chr-tests: Depend on u32-to-u8.
* tests/unistr/test-chr.h: Build initial version as UCS-4 then convert.
* tests/unistr/test-u16-chr.c, tests/unistr/test-u32-chr.c,
tests/unistr/test-u8-chr.c: Define U32_TO_U.

13 years agounistr/u8-strchr: Optimize non-ASCII argument case.
Bruno Haible [Sun, 18 Jul 2010 15:23:36 +0000 (17:23 +0200)]
unistr/u8-strchr: Optimize non-ASCII argument case.

13 years agofdl.texi from gnustandards
Karl Berry [Thu, 15 Jul 2010 18:40:26 +0000 (11:40 -0700)]
fdl.texi from gnustandards

13 years agogetcwd: on Solaris, work better if ancestors are inaccessible
Paul R. Eggert [Wed, 14 Jul 2010 07:06:03 +0000 (00:06 -0700)]
getcwd: on Solaris, work better if ancestors are inaccessible

* lib/getcwd.c (__getcwd): If getcwd returns EINVAL for zero
buffer and size, try again with a large buffer.  This works better
on Solaris, since its getcwd succeeds even if the path to the root
is inaccessible, and this is helpful in common cases such as .zfs
hidden directories.  Problem reported by J Chapman Flack in
http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00000.html
Use system getcwd if it's declared, not merely if it's partly
working; use the partly-working test only to avoid needless effort
if the system getcwd fails.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Omit
comment that was already obsolete and is now even more obsolete.
* modules/getcwd (Depends-on): Depend on strdup, since __getcwd
now might call strdup.

13 years agopthread: Add enough so that coreutils/src/sort.c compiles.
Paul R. Eggert [Tue, 13 Jul 2010 22:55:36 +0000 (15:55 -0700)]
pthread: Add enough so that coreutils/src/sort.c compiles.

* lib/pthread.in.h: Add self to author comment.  Conditionalize on
_GL_PTHREAD_H, not PTHREAD_H_, for consistency with the rest of
gnulib. Include <sched.h> and <time.h>, as per POSIX.
Include <sys/types.h>, in case it defines pthread_t.
(pthread_t, pthread_attr_t, pthread_barrier_t, pthread_barrierattr_t):
(pthread_cond_t, pthread_condattr_t, pthread_key_t, pthread_mutex_t):
(pthread_mutexattr_t, pthread_once_t, pthread_rwlock_t):
(pthread_rwlockattr_t, pthread_spinlock_t):
New typedefs, if HAVE_PTHREAD_T is not defined.
(PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER):
(PTHREAD_ONCE_INIT, PTHREAD_RWLOCK_INITIALIZER):
(PTHREAD_BARRIER_SERIAL_THREAD, PTHREAD_CANCEL_DEFERRED):
(PTHREAD_CANCEL_ASYNCHRONOUS, PTHREAD_CANCEL_ENABLE):
(PTHREAD_CANCEL_DISABLE, PTHREAD_CANCELED, PTHREAD_CREATE_JOINABLE):
(PTHREAD_CREATE_DETACHED, PTHREAD_INHERIT_SCHED):
(PTHREAD_EXPLICIT_SCHED, PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL):
(PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE):
(PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_PRIO_NONE):
(PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT, PTHREAD_PROCESS_PRIVATE):
(PTHREAD_PROCESS_SHARED, PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS):
New macros.
(pthread_cond_destroy, pthread_cond_init, pthread_cond_signal):
(pthread_cond_wait, pthread_exit, pthread_mutex_destroy):
(pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock):
(pthread_spin_init, pthread_spin_lock, pthread_spin_trylock);
(pthread_spin_unlock): New dummy functions.
(pthread_create): Return EAGAIN; don't set errno.
* m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_t, and
require AC_C_INLINE.
* modules/pthread (Depends-on): Add sched, time.
(pthread.h): Use AM_V_GEN.

13 years agostriconveh: Simplify last commit.
Bruno Haible [Tue, 13 Jul 2010 21:43:14 +0000 (23:43 +0200)]
striconveh: Simplify last commit.

13 years agostriconveh: Don't malloc memory if the result buffer is sufficient.
Bruno Haible [Tue, 13 Jul 2010 21:36:41 +0000 (23:36 +0200)]
striconveh: Don't malloc memory if the result buffer is sufficient.

13 years agostrtod: Add safety check.
Bruno Haible [Tue, 13 Jul 2010 08:07:23 +0000 (10:07 +0200)]
strtod: Add safety check.

13 years agoUnify tests that set gl_cv_func_ldexpl_no_libm.
Bruno Haible [Mon, 12 Jul 2010 21:43:04 +0000 (23:43 +0200)]
Unify tests that set gl_cv_func_ldexpl_no_libm.

13 years agoUnify tests that set gl_cv_func_ldexp_no_libm.
Bruno Haible [Mon, 12 Jul 2010 21:36:34 +0000 (23:36 +0200)]
Unify tests that set gl_cv_func_ldexp_no_libm.

13 years agoUnify tests that set gl_cv_func_frexpl_no_libm.
Bruno Haible [Mon, 12 Jul 2010 21:16:46 +0000 (23:16 +0200)]
Unify tests that set gl_cv_func_frexpl_no_libm.

13 years agoUnify tests that set gl_cv_func_frexp_no_libm.
Bruno Haible [Mon, 12 Jul 2010 21:08:21 +0000 (23:08 +0200)]
Unify tests that set gl_cv_func_frexp_no_libm.

13 years agomemcoll: clarify sizes versus lengths, document better, and tweak perf
Paul R. Eggert [Mon, 12 Jul 2010 17:58:35 +0000 (10:58 -0700)]
memcoll: clarify sizes versus lengths, document better, and tweak perf

* lib/memcoll.c (strcoll_loop, memcoll0):
Improve quality of descriptive comments.  Name variables
consistently as to whether they are lengths (which do not include
terminating null) versus sizes (which do).
* lib/xmemcoll.c (xmemcoll0): Likewise.
* lib/memcoll.c (strcoll_loop): Tweak the way that the diff is
returned when s1size == 0; this is easier to compile and saves
about 17% of memcoll's code space on x86-64 with GCC 4.1.2.

13 years agoTests for module '_Exit'.
Bruno Haible [Mon, 12 Jul 2010 16:55:19 +0000 (18:55 +0200)]
Tests for module '_Exit'.

13 years agoNew module '_Exit'.
Bruno Haible [Mon, 12 Jul 2010 16:54:13 +0000 (18:54 +0200)]
New module '_Exit'.

13 years agostrtod: make it more-accurate typically, and don't require libm
Paul R. Eggert [Mon, 12 Jul 2010 16:14:10 +0000 (09:14 -0700)]
strtod: make it more-accurate typically, and don't require libm

* lib/strtod.c (_GL_ARG_NONNULL): Remove; no longer needed.
Include limits.h.  Don't include string.h.
(HAVE_LDEXP_IN_LIBC, HAVE_RAW_DECL_STRTOD): Define to 0 if not defined.
(locale_isspace): New function, so that no casts are needed to
check whether *s is a space.
(ldexp): Provide an unused dummy if not available.
(scale_radix_exp, parse_number, underlying_strtod): New functions.
(strtod): Use them.  This implementation prefers to use the
underlying strtod if available, falling back on our own code
only to fix known bugs.  This is more likely to produce an
accurate result.  Also, it avoids the use of libm functions.
* m4/strtod.m4 (gl_FUNC_STRTOD): Don't invoke _AC_LIBOBJ_STRTOD;
no longer needed.  Invoke AC_LIBOBJ([strtod]); don't know why this
was absent, but it caused a test failure with coreutils.
(gl_PREREQ_STRTOD): Check wither ldexp can be used without linking
with libm.
* modules/strtod (Makefile.am, Link): libm is no longer needed.
* modules/strtod-tests (Makefile.am): Likewise.

13 years agoautoupdate
Karl Berry [Sun, 11 Jul 2010 18:45:38 +0000 (11:45 -0700)]
autoupdate

13 years agounistr/u8-strchr: Optimize ASCII argument case.
Pádraig Brady [Sun, 11 Jul 2010 13:28:55 +0000 (15:28 +0200)]
unistr/u8-strchr: Optimize ASCII argument case.

13 years ago(x)memcoll: minor tweaks
Paul Eggert [Fri, 9 Jul 2010 01:16:40 +0000 (18:16 -0700)]
(x)memcoll: minor tweaks

* lib/memcoll.c (strcoll_loop): Prefer the style where 'const'
is after the type that it qualifies.
(memcoll0): Likewise.
* lib/memcoll.h (memcoll0): Likewise.
* lib/xmemcoll.c (collate_error, xmemcoll0): Likewise.
* lib/xmemcoll.h (xmemcoll0): Likewise.
* lib/memcoll.c (memcoll0): Correct the comment.  This function
differs from memcoll in that the NUL byte is part of the argument.
Omit the abort-checks, as performance is a real issue here.  Plus,
the checks were wrong anyway (an off-by-one error).  Omit local
variable 'diff', as it's a bit clearer that way.
* m4/memcoll.m4 (gl_MEMCOLL): Omit AC_FUNC_STRCOLL, as it's
no longer needed.

13 years ago(x)memcoll: speedup when input is known to be NUL delimited
Chen Guo [Thu, 8 Jul 2010 22:50:11 +0000 (15:50 -0700)]
(x)memcoll: speedup when input is known to be NUL delimited

* lib/memcoll.c: Include stdlib.
(memcoll0) New function.
(strcoll_loop) New function, refactored for use in both memcoll
and memcoll0.
* lib/memcoll.h: Add prototype for memcoll0.
* lib/xmemcoll.c: (xmemcoll0) New function.
(collate_error) New function, refactored for use in both xmemcoll
and xmemcoll0.
* lib/xmemcoll.h: Add prototype for xmemcoll0.
* m4/memcoll.m4: add inline invocation.

13 years agobootstrap: discard non translation project po files
Pádraig Brady [Tue, 6 Jul 2010 09:00:05 +0000 (10:00 +0100)]
bootstrap: discard non translation project po files

* build-aux/bootstrap (update_po_files): Remove any
local only files from the $po_dir/.reference directory.
The LINGUAS index is generated from this directory
and so those translations will not be distributed.
Note, local only translations are not removed from the
$po_dir directory.

13 years agofsusage: Clarify which code applies to which platforms.
Bruno Haible [Sun, 4 Jul 2010 21:48:16 +0000 (23:48 +0200)]
fsusage: Clarify which code applies to which platforms.

13 years agohavelib: Fix bug when AC_LIB_FROMPACKAGE is used more than twice.
Bruno Haible [Sun, 4 Jul 2010 14:12:35 +0000 (16:12 +0200)]
havelib: Fix bug when AC_LIB_FROMPACKAGE is used more than twice.

13 years agohash: once again explicitly disallow insertion of NULL
Jim Meyering [Sun, 4 Jul 2010 08:54:38 +0000 (10:54 +0200)]
hash: once again explicitly disallow insertion of NULL

* lib/hash.c (hash_insert0): Reinstate just-removed test:
inserting a NULL pointer cannot work with these functions.
Add a comment with details.
This reverts part of the 2010-07-01 commit, 5bef1a35
"hash: extend module to deal with non-pointer keys".

13 years agostdbool: Update doc.
Bruno Haible [Fri, 2 Jul 2010 00:48:01 +0000 (02:48 +0200)]
stdbool: Update doc.

13 years agohash: extend module to deal with non-pointer keys
Jim Meyering [Thu, 1 Jul 2010 21:17:25 +0000 (23:17 +0200)]
hash: extend module to deal with non-pointer keys

* lib/hash.c (hash_insert0): New interface, much like hash_insert
but that allows insertion of non-pointer entries.
Do not disallow an ENTRY value of NULL.
(hash_insert): This is now just a thin wrapper.  Call hash_insert0.
* lib/hash.h (hash_insert0): Declare.

13 years agogettext: Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.
Christian Weisgerber [Thu, 1 Jul 2010 09:08:34 +0000 (11:08 +0200)]
gettext: Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.

13 years agoidpriv-drop: Fix tests.
Ian Beckwith [Thu, 1 Jul 2010 08:54:36 +0000 (10:54 +0200)]
idpriv-drop: Fix tests.

13 years agostring: Fix syntax error with g++ 2.96.
Bruno Haible [Wed, 30 Jun 2010 00:19:54 +0000 (02:19 +0200)]
string: Fix syntax error with g++ 2.96.

13 years agounitypes: Fix bug introduced on 2010-05-18.
Ian Beckwith [Tue, 29 Jun 2010 08:51:34 +0000 (10:51 +0200)]
unitypes: Fix bug introduced on 2010-05-18.

13 years agoautoupdate
Karl Berry [Wed, 23 Jun 2010 13:51:43 +0000 (06:51 -0700)]
autoupdate

13 years agoautoupdates
Karl Berry [Tue, 22 Jun 2010 16:34:07 +0000 (09:34 -0700)]
autoupdates

13 years agomemmem: slight optimization
Eric Blake [Mon, 21 Jun 2010 22:16:44 +0000 (16:16 -0600)]
memmem: slight optimization

For any needle, the factorization 0/n has a local period of 1, so it
is a critical factorization iff the entire needle consists only of a
single repeated byte, in which case 1/n-1 would also be critical.
Starting with a comparison of x[0] and x[1] in the maximal suffix
check will either find the 0/n case or move on to something else, so
we can optimize and start with the x[1] vs. x[2] case to begin with.

To avoid out-of-bounds references, we must then special case needles
of length two or less.  However, for these cases, we can determine a
critical factorization without any probes of the needle (we already
require a non-empty needle; a 1-byte needle can factor as either 0/1
or 1/0 but the rest of our code assumes a non-empty suffix; and of the
two 2-byte needle patterns, "aa" can factor as either 0/2 or 1/1 but
with best performance for 1/1, and "ab" must be factored as 1/1).

* lib/str-two-way.h (critical_factorization): Update comments.
Reduce work during factorization phase.
Reported by Carlos Bueno <carlos@bueno.org>.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agoFix HAVE_CALLOC_POSIX misnomer.
Bruno Haible [Mon, 21 Jun 2010 22:20:46 +0000 (00:20 +0200)]
Fix HAVE_CALLOC_POSIX misnomer.

13 years agoUse modern idiom for calloc() replacement.
Bruno Haible [Mon, 21 Jun 2010 22:16:26 +0000 (00:16 +0200)]
Use modern idiom for calloc() replacement.

13 years agoFix HAVE_REALLOC_POSIX misnomer.
Bruno Haible [Mon, 21 Jun 2010 22:11:19 +0000 (00:11 +0200)]
Fix HAVE_REALLOC_POSIX misnomer.

13 years agoUse modern idiom for realloc() replacement.
Bruno Haible [Mon, 21 Jun 2010 22:07:30 +0000 (00:07 +0200)]
Use modern idiom for realloc() replacement.

13 years agoFix HAVE_MALLOC_POSIX misnomer.
Bruno Haible [Mon, 21 Jun 2010 22:06:29 +0000 (00:06 +0200)]
Fix HAVE_MALLOC_POSIX misnomer.

13 years agoUse modern idiom for malloc() replacement.
Bruno Haible [Mon, 21 Jun 2010 21:58:08 +0000 (23:58 +0200)]
Use modern idiom for malloc() replacement.

13 years agostdio.in.h: fix compilation failure when using HP-UX 11's C compiler
Richard Lloyd [Sun, 20 Jun 2010 11:31:40 +0000 (13:31 +0200)]
stdio.in.h: fix compilation failure when using HP-UX 11's C compiler

* lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
This macro takes 3 arguments, not 4.

13 years agoupdate from texinfo
Karl Berry [Thu, 17 Jun 2010 18:13:36 +0000 (11:13 -0700)]
update from texinfo

13 years agoupdate from texinfo
Karl Berry [Thu, 17 Jun 2010 00:30:50 +0000 (17:30 -0700)]
update from texinfo

13 years agoupdate from texinfo
Karl Berry [Wed, 16 Jun 2010 00:07:44 +0000 (17:07 -0700)]
update from texinfo

13 years agoipv6: fix detection under mingw
Giuseppe Scrivano [Tue, 15 Jun 2010 14:56:42 +0000 (16:56 +0200)]
ipv6: fix detection under mingw

this small patch fixes the detection of IPv6 under mingw.  The header
<ws2tcpip.h> is already used by <sys/socket.h>.

* m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Include <ws2tcpip.h> for struct
in6_addr.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agostrtod: Assume strtod() works when cross-compiling to new-enough glibc.
Ben Pfaff [Tue, 15 Jun 2010 00:15:41 +0000 (17:15 -0700)]
strtod: Assume strtod() works when cross-compiling to new-enough glibc.

13 years agoFactor out common code in gl_FUNC_STRTOD.
Ben Pfaff [Mon, 14 Jun 2010 23:52:25 +0000 (16:52 -0700)]
Factor out common code in gl_FUNC_STRTOD.

13 years agostrtod: Stop using AC_FUNC_STRTOD.
Bruno Haible [Tue, 15 Jun 2010 08:37:32 +0000 (10:37 +0200)]
strtod: Stop using AC_FUNC_STRTOD.

13 years agoselect: Correct timeout.
René Berber [Tue, 15 Jun 2010 08:29:07 +0000 (10:29 +0200)]
select: Correct timeout.

13 years agogit-version-gen: init shell var to avoid env var influence
Thien-Thi Nguyen [Mon, 14 Jun 2010 20:25:42 +0000 (22:25 +0200)]
git-version-gen: init shell var to avoid env var influence

* build-aux/git-version-gen (v): Init shell var to empty.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agopriv-set: Don't assume that priv.h exists merely because getppriv does.
Paul Eggert [Mon, 14 Jun 2010 19:20:22 +0000 (12:20 -0700)]
priv-set: Don't assume that priv.h exists merely because getppriv does.

See Jan Andersen's bug report about AIX 5L in
http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00019.html
* m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h.
* lib/priv-set.c: Do nothing unless HAVE_PRIV_H.
* lib/priv-set.h: Likewise.
* tests/test-priv-set.c: Likewise.

13 years agorelocatable: Make it easier to test whether to install wrappers.
Bruno Haible [Sun, 13 Jun 2010 23:53:49 +0000 (01:53 +0200)]
relocatable: Make it easier to test whether to install wrappers.

13 years agognulib-tool: Display specified modules and dependencies differently.
Bruno Haible [Sun, 13 Jun 2010 13:57:16 +0000 (15:57 +0200)]
gnulib-tool: Display specified modules and dependencies differently.

13 years agognulib-tool: Align code of func_import and func_create_testdir.
Bruno Haible [Sun, 13 Jun 2010 12:45:56 +0000 (14:45 +0200)]
gnulib-tool: Align code of func_import and func_create_testdir.

13 years agotest-inttostr: avoid spurious failure on Solaris 9
Jim Meyering [Sat, 12 Jun 2010 12:47:43 +0000 (14:47 +0200)]
test-inttostr: avoid spurious failure on Solaris 9

* tests/test-inttostr.c (main): Skip the test when snprintf fails
to accept "%ju".  Reported by Bruno Haible.

13 years agoupdate from texinfo
Karl Berry [Sat, 12 Jun 2010 13:48:33 +0000 (06:48 -0700)]
update from texinfo

13 years agotest-sys_socket: mark variables as used more readably
Jim Meyering [Fri, 11 Jun 2010 20:09:27 +0000 (22:09 +0200)]
test-sys_socket: mark variables as used more readably

* tests/test-sys_socket.c (main): Mark otherwise unused variables
as "used" explicitly via (void) statement casts.  This is more
readable than using them in an artificial return expression.
Suggestion from Bruno Haible.

13 years agoAvoid some more warnings from "gcc -Wwrite-strings".
Bruno Haible [Fri, 11 Jun 2010 19:17:11 +0000 (21:17 +0200)]
Avoid some more warnings from "gcc -Wwrite-strings".

13 years agoinit.sh: change framework_failure_ to fail with status 99, not 1
Ralf Wildenhues [Fri, 11 Jun 2010 17:03:33 +0000 (19:03 +0200)]
init.sh: change framework_failure_ to fail with status 99, not 1

* tests/init.sh (framework_failure_): Exit 99, not 1.  This informs
automake's parallel-tests rule that this is an unexpected failure,
even if the test is listed in XFAIL_TESTS.

13 years agotest-inttostr: avoid warnings about 4-6KB literal strings
Jim Meyering [Fri, 11 Jun 2010 15:31:04 +0000 (17:31 +0200)]
test-inttostr: avoid warnings about 4-6KB literal strings

* tests/test-inttostr.c: Don't use <assert.h>.  Instead, ...
Include "macros.h", for its definition of ASSERT.
(CK): s/assert/ASSERT/
* modules/inttostr-tests (Files): Add macros.h.

13 years agoinit.sh: don't use $ME_ or skip_ before they are defined
Jim Meyering [Fri, 11 Jun 2010 11:41:31 +0000 (13:41 +0200)]
init.sh: don't use $ME_ or skip_ before they are defined

* tests/init.sh: Hoist definitions of $ME_ and skip_ to precede
their first uses.  Also hoist their companions: warn_, fail_,
framework_failure_, $stderr_fileno.  Prompted by a patch from
Stefano Lattarini.

13 years agotest-sys_socket: avoid set-but-not-used warnings from gcc
Jim Meyering [Fri, 11 Jun 2010 09:26:31 +0000 (11:26 +0200)]
test-sys_socket: avoid set-but-not-used warnings from gcc

* tests/test-sys_socket.c (main): Use "i" and "x", in order to
avoid warning about set-but-not-used variables.

13 years agotest-xvasprintf: avoid 'const' discard warnings
Jim Meyering [Fri, 11 Jun 2010 09:03:54 +0000 (11:03 +0200)]
test-xvasprintf: avoid 'const' discard warnings

* tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Use
"const" when assigning from literal strings.
(test_xasprintf): Add "void" in function argument list to placate
-Wstrict-prototypes and to be consistent with test_xvasprintf above.

13 years agotests: avoid compilation warnings in argmatch and exclude tests...
Jim Meyering [Fri, 11 Jun 2010 07:50:29 +0000 (09:50 +0200)]
tests: avoid compilation warnings in argmatch and exclude tests...

in packages that define ARGMATCH_DIE_DECL, like coreutils.
* tests/test-exclude.c [ARGMATCH_DIE_DECL]: Also declare the function.
Since it always exits, declare with the "noreturn" attribute.
* tests/test-argmatch.c: Likewise.

13 years agotests: avoid 'const' discard warnings in mbsstr tests
Jim Meyering [Fri, 11 Jun 2010 07:27:19 +0000 (09:27 +0200)]
tests: avoid 'const' discard warnings in mbsstr tests

* tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
* tests/test-mbsstr2.c (main): Likewise.

13 years agotest-verify: avoid warning from gcc's -Wmissing-declarations
Jim Meyering [Fri, 11 Jun 2010 07:15:16 +0000 (09:15 +0200)]
test-verify: avoid warning from gcc's -Wmissing-declarations

* tests/test-verify.c (function): Declare to be static.

13 years agotest-inttostr.c: include <string.h> for use of strcmp
Jim Meyering [Fri, 11 Jun 2010 07:08:47 +0000 (09:08 +0200)]
test-inttostr.c: include <string.h> for use of strcmp

* tests/test-inttostr.c: Include <string.h> for strcmp declaration.

13 years agotest-linkat: avoid failed assertion on "other" architectures
Jim Meyering [Fri, 11 Jun 2010 06:50:08 +0000 (08:50 +0200)]
test-linkat: avoid failed assertion on "other" architectures

* tests/test-linkat.c: Include <sys/stat.h>, for declarations of stat,
lstat, mkdir.  Patch by John Rigby, to fix FTBFS on armel, powerpc,
sparc: https://bugs.launchpad.net/bugs/591968

13 years agoprintf.m4: avoid autoconf's "Expanded Before Required" warning
Jim Meyering [Thu, 10 Jun 2010 13:21:09 +0000 (15:21 +0200)]
printf.m4: avoid autoconf's "Expanded Before Required" warning

* m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Define using AC_DEFUN_ONCE,
rather than AC_DEFUN, to avoid the classic "Expanded Before Required"
autoconf warning.

13 years agoReplacement header templates are now named with ".in", not "_".
Ben Pfaff [Fri, 11 Jun 2010 03:11:05 +0000 (20:11 -0700)]
Replacement header templates are now named with ".in", not "_".

* doc/gnulib-intro.texi: Correct.

13 years agointtostr-tests: depend on snprintf, not snprintf-posix
Jim Meyering [Thu, 10 Jun 2010 16:35:59 +0000 (18:35 +0200)]
inttostr-tests: depend on snprintf, not snprintf-posix

* modules/inttostr-tests (Depends-on): Depend on snprintf, not
snprintf-posix, to avoid this aclocal failure:
  missing file gnulib-tests/vasnprintf.c
  configure.ac:45: error: expected source file, required through \
  AC_LIBSOURCES, not found

13 years agoautoupdate
Karl Berry [Thu, 10 Jun 2010 13:22:36 +0000 (06:22 -0700)]
autoupdate

13 years agointtostr: add a new function, inttostr, and tests
Jim Meyering [Wed, 9 Jun 2010 16:22:25 +0000 (18:22 +0200)]
inttostr: add a new function, inttostr, and tests

The namesake function was not available.  The existence of the
template file, inttostr.c makes its addition nontrivial.
* lib/anytostr.c: Rename from inttostr.c.
(anytostr): Rename from inttostr.
* lib/inttostr.c: New file.
* modules/inttostr (Files): Add anytostr.c.
(Makefile.am): Set lib_SOURCES instead of ...
* m4/inttostr.m4: Remove uses of AC_LIBOBJ.
* lib/imaxtostr.c: Update use.  s/inttostr/anytostr/
* lib/offtostr.c: Likewise.
* lib/uinttostr.c: Likewise.
* lib/umaxtostr.c: Likewise.
* modules/inttostr-tests: New file.
* tests/test-inttostr.c: New file.  Test these functions.

13 years agoAdd "Extending Gnulib" chapter to manual.
Ben Pfaff [Thu, 10 Jun 2010 03:53:13 +0000 (20:53 -0700)]
Add "Extending Gnulib" chapter to manual.

* doc/gnulib.texi (Writing Modules): Add cross-reference to new chapter.
(Extending Gnulib): New chapter.
* doc/gnulib-intro.texi (Openness): Add cross-reference to new chapter.

13 years agoAvoid relocwrapper link errors due to gnulib replacement functions.
Bruno Haible [Wed, 9 Jun 2010 13:30:40 +0000 (15:30 +0200)]
Avoid relocwrapper link errors due to gnulib replacement functions.

13 years agoAvoid relocwrapper link errors due to gnulib replacement functions.
Bruno Haible [Wed, 9 Jun 2010 10:47:59 +0000 (12:47 +0200)]
Avoid relocwrapper link errors due to gnulib replacement functions.

13 years agoPrefer documented low-level autoconf macro names.
Bruno Haible [Sat, 5 Jun 2010 01:46:32 +0000 (03:46 +0200)]
Prefer documented low-level autoconf macro names.

13 years agohavelib: Allow library names with '+' characters.
Martin Lambers [Sat, 5 Jun 2010 01:29:00 +0000 (03:29 +0200)]
havelib: Allow library names with '+' characters.

13 years agoModule setenv does not depend on 'malloc-posix', 'realloc-posix'.
Bruno Haible [Wed, 9 Jun 2010 10:40:40 +0000 (12:40 +0200)]
Module setenv does not depend on 'malloc-posix', 'realloc-posix'.

13 years agomaint.mk: make the news-check rule more configurable
Peter Simons [Mon, 7 Jun 2010 13:24:21 +0000 (15:24 +0200)]
maint.mk: make the news-check rule more configurable

* top/maint.mk (news-check-lines-spec) New variable.
(news-check): Use "sed -n 1,10p" in place of "head".

13 years agodo-release-commit-and-tag: fix typo in --help
Jim Meyering [Mon, 7 Jun 2010 07:06:42 +0000 (09:06 +0200)]
do-release-commit-and-tag: fix typo in --help

* build-aux/do-release-commit-and-tag (Usage): Fix typo in --help.

13 years agoregex: avoid new dead-code warning with gcc-4.6.0
Jim Meyering [Mon, 7 Jun 2010 05:58:49 +0000 (07:58 +0200)]
regex: avoid new dead-code warning with gcc-4.6.0

* lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead
if-block containing a while-loop.  It's been unused for at least
5 years.

13 years agoMention Solaris limitation.
Bruno Haible [Sat, 5 Jun 2010 03:13:57 +0000 (05:13 +0200)]
Mention Solaris limitation.

13 years agoUpdate to GNU gettext 0.18.1.
Bruno Haible [Sat, 5 Jun 2010 00:03:43 +0000 (02:03 +0200)]
Update to GNU gettext 0.18.1.