Paul Eggert [Mon, 6 Feb 2006 05:22:04 +0000 (05:22 +0000)]
* extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
__EXTENSIONS__ if this causes compilation to fail. Problem
reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
Paul Eggert [Fri, 27 Jan 2006 18:40:27 +0000 (18:40 +0000)]
* fnmatch.c (L_): Renamed from L, to work around a bug in
Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
<http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
All uses changed.
Jim Meyering [Wed, 25 Jan 2006 16:45:04 +0000 (16:45 +0000)]
Sync from the stable (b5) branch of coreutils:
(fts_children): Don't let close() clobber errno from
failed fchdir().
(fts_stat): When following a symlink-to-directory,
don't necessarily interpret stat-fails+lstat-succeeds as indicating
a dangling symlink. That can also happen at least for ELOOP.
The fix: return FTS_SLNONE only when the stat errno is ENOENT.
FYI, this bug predates the inclusion of fts.c in coreutils.
(fts_open): Put new maxarglen declaration and uses
in their own block, so pre-c99 compilers don't object.
Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.
(fts_read): After a failed fchdir, update sp->fts_cur
before returning. Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
Reported by Stavros Passas.
Paul Eggert [Tue, 24 Jan 2006 07:40:58 +0000 (07:40 +0000)]
Work around porting bugs reported by Dieter in
<http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
* lib/getopt.c (_NOPROTO): Remove; no longer needed.
Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
Include "getopt.h" first, to check interface.
(getenv): Declare only if defined HAVE_DECL_GETENV &&
!HAVE_DECL_GETENV.
* lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
(__strndup): Revert to K&R-style function dfns, the glibc style.
* lib/strnlen.c: Don't claim it's taken from glibc; it's not.
(strnlen, __strnlen): Remove #defines and #undefs; not needed.
Include strnlen.h first, to get prototype properly.
(strnlen): Renamed from __strnlen.
Remove weak alias.
* m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
Paul Eggert [Tue, 17 Jan 2006 07:23:20 +0000 (07:23 +0000)]
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
it's not portable and it doesn't work with cross-compiles. Fix missing-$
typo in 'test "gl_cv_ignore_unused_libraries" ...' that prevented -zignore
from being used with Sun's C compiler.
Paul Eggert [Thu, 12 Jan 2006 05:40:19 +0000 (05:40 +0000)]
Sync from coreutils.
* md5.c: Fix commentary typos.
(OP): Fix spacing.
(alignof, UNALIGNED_P): No need for a GCC-specific version.
* md5.h (__attribute__): Remove; unused.
* sha1.c: Fix commentary to match md5 better.
* sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
so that we don't need to worry about alignment. All uses changed.
This merges the 2005-10-28 md5 change into sha1.
Paul Eggert [Tue, 10 Jan 2006 21:31:01 +0000 (21:31 +0000)]
Sync from coreutils.
Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.
* lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
before returning. Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
* lib/sha1.c: Tweak grammar in a comment.
* m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
* m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
the 2002-12-31 change.
Paul Eggert [Tue, 10 Jan 2006 20:14:43 +0000 (20:14 +0000)]
* regex_internal.h (BITSET_WORD_BITS):
Work around a bug in 64-bit PGC (before version 6.1-2), where the
preprocessor mishandles large unsigned values as if they were signed.