Eric Blake [Mon, 16 Aug 2010 23:34:45 +0000 (17:34 -0600)]
test-stddef: test for (some) offsetof bugs
See the mailing list for a more comprehensive patch that works
around the Solaris bug.
* tests/test-stddef.c: Enhance test to ensure correct type of
offsetof.
* doc/posix-headers/stddef.texi (stddef.h): Document a Solaris bug
that we are not fixing at this time.
Pádraig Brady [Thu, 10 Jun 2010 14:12:48 +0000 (15:12 +0100)]
copy-acl: ignore ENOTSUP on HP-UX
Fixes Coreutils bug 6053.
* lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
so that it is available for HP-UX.
* lib/copy-acl.c (qcopy_acl): Use it.
Reported by Patrick M. Callahan.
Eric Blake [Tue, 10 Aug 2010 15:32:13 +0000 (09:32 -0600)]
open, chown: relax license
* modules/open (License): Change to LGPLv2+, with consent by all
authors, for use in augeas.
* modules/chown (License): Likewise.
* modules/lchown (Likewise): Likewise.
Requested by Adam Stokes.
Eric Blake [Fri, 30 Jul 2010 23:29:43 +0000 (17:29 -0600)]
mknod: be more vocal about danger of running tests as root
* m4/mknod.m4 (gl_FUNC_MKNOD): Make it harder to run configure as
root, since that is just asking for problems.
Suggested by Bruno Haible, based on a report by Rainer Tammer.
Eric Blake [Fri, 30 Jul 2010 22:01:41 +0000 (16:01 -0600)]
strtod: next round of AIX fixes
* lib/strtod.c (strtod): Work around AIX bug of parsing p with no
exponent.
* tests/test-strtod.c (main): Enhance tests.
* doc/posix-functions/strtod.texi (strtod): Document next bug.
Reported by Rainer Tammer.
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.
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.
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.
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.
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.