Eric Blake [Mon, 9 Jun 2008 22:21:34 +0000 (16:21 -0600)]
Work around environments that (stupidly) ignore SIGALRM.
* m4/strstr.m4 (gl_FUNC_STRSTR): Reset SIGALRM to default handling
before using alarm().
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
Reported by Ian Beckwith <ianb@erislabs.net>.
Jim Meyering [Fri, 6 Jun 2008 16:20:14 +0000 (18:20 +0200)]
utimens.c: correct kernel bug work-around
Ondřej Vašík found that the invalid return value of 280 indicates
failure, not success, and the kernel bug we're trying to work
around affects not just the utimensat call, but also the fallback
futimens call.
* lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Simulate failure,
not success.
[HAVE_FUTIMENS]: Use the same work-around, here.
Eric Blake [Fri, 6 Jun 2008 16:50:17 +0000 (10:50 -0600)]
Document abort() bugs.
* doc/posix-functions/abort.texi (abort): Mention anomalies.
* doc/posix-functions/setjmp.texi (setjmp): Mingw has setjmp.
* doc/posix-functions/sigsetjmp.texi (sigsetjmp): Cygwin has
sigsetjmp.
* doc/posix-functions/siglongjmp.texi (siglongjmp): Cygwin has
siglongjmp, but only as a macro.
* doc/posix-functions/_longjmp.texi (_longjmp): Mention that this
is obsolete.
* doc/posix-functions/_setjmp.texi (_setjmp): Likewise.
Jim Meyering [Tue, 3 Jun 2008 09:42:12 +0000 (11:42 +0200)]
generate argz.c and argz.in.h from glibc sources
* config/argz.mk: New file, with rules to generate the two files.
* modules/argz (Depends-on): Add mempcpy, stpcpy, strndup
and strnlen. Suggested by David Lutterkort.
* m4/argz.m4: Require AC_C_RESTRICT.
Check only for the existence of one function,
argz_replace, since it seems to have been added most recently.
Also, remove the side effect of defining HAVE_ARGZ_* symbols.
* lib/argz.c: Now generated directly from glibc sources, rather than
imported from libtool. Includes the following additional functions:
argz_extract, argz_create, argz_delete, str_append, argz_replace.
* lib/argz.in.h: Likewise.
* config/srclist.txt: Reflect that argz* files are no longer pulled
from libtool.
Jim Meyering [Wed, 4 Jun 2008 17:32:50 +0000 (19:32 +0200)]
utimens.c: work around a probable Linux kernel bug
* lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Work around what
appears to be a kernel bug that causes utimensat to return 280
instead of 0, indicating success.
Jim Meyering [Mon, 2 Jun 2008 09:32:02 +0000 (11:32 +0200)]
announce-gen: use a better key-server host name
* build-aux/announce-gen (main): Recommend keys.gnupg.net, since
it may be more consistently reliable. Suggested by Werner Koch
in <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/13717>.
Eric Blake [Thu, 29 May 2008 03:29:02 +0000 (21:29 -0600)]
Prefer new POSIX 200x interfaces over futimesat.
* m4/utimens.m4 (gl_UTIMENS): Check for futimens, utimensat.
* lib/utimens.c (gl_futimens): Use them for nanosecond resolution
when available.
[HAVE_BUGGY_NFS_TIME_STAMPS]: Allow C89 compilation.
Jim Meyering [Mon, 26 May 2008 17:29:50 +0000 (19:29 +0200)]
sha256: do not artificially restrict buffer length to be < 2^32
* lib/sha256.h (struct sha256_ctx) [buflen]: Change type from
uint32_t to size_t.
* lib/sha256.c (sha256_conclude_ctx): Change type of a local
to match.
Jim Meyering [Mon, 26 May 2008 14:25:28 +0000 (16:25 +0200)]
avoid unaligned access errors, e.g., on sparc
* lib/sha512.c (sha512_conclude_ctx): Use set_uint64 rather than
direct access through a possibly-unaligned uint64* pointer.
* lib/sha256.c (sha256_conclude_ctx): Use set_uint32 rather than
direct access through a possibly-unaligned uint32* pointer.
Prompted by this patch from Tom "spot" Callaway:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13638
Jim Meyering [Sun, 25 May 2008 17:37:11 +0000 (19:37 +0200)]
useless-if-before-free: freed expr may have white-space differences
* build-aux/useless-if-before-free: Recognize cases in which the
freed expression differs from the tested one in embedded white
space, e.g., if (p[i + 1]) free(p[i+1]). Correct thinko in prev:
$1 was used, so we can't make any regexp shy. Improved tests now
detect this.