Simon Josefsson [Thu, 16 Feb 2006 09:48:07 +0000 (09:48 +0000)]
* sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
'present but cannot compile' warnings on cygwin.
* socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET. Don't
use ws2tcpip.h if sys/socket.h works.
* getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
(gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
Paul Eggert [Tue, 14 Feb 2006 23:00:23 +0000 (23:00 +0000)]
Sync from coreutils.
* modules/lstat (Depends-on): Don't depend on xalloc.
(License): Change from GPL to LGPL, since this is now simply a
replacement for a libc function.
Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
failure on deficient systems, and simplify gnulib lgpl dependencies.
* lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
xmalloc/lstat combination. Based on a patch from Bruno Haible.
* lib/xalloc-die.c: Remove unused definition of N_.
* m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke AC_CHECK_FUNCS(getmntent)
unconditionally so that tests of $ac_cv_func_getmntent (e.g., in
gl_LIST_MOUNTED_FILE_SYSTEMS) need not double-quote uses of that
variable, to accommodate the rare case in which getmntent is
available in none of the libraries checked. This happens at
least on FreeBSD 5.0.
Simon Josefsson [Tue, 14 Feb 2006 12:52:55 +0000 (12:52 +0000)]
* build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
and (the local) Makefile.cfg to maint-cfg.mk.
* build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
to the latter.
Simon Josefsson [Tue, 14 Feb 2006 11:25:31 +0000 (11:25 +0000)]
* modules/maintainer-makefile: New module.
* build-aux/Makefile.maint: New file, from GNU CoreUtils, although
severaly stripped to make it possible to build it up from scratch
with reliable tests.
* build-aux/GNUmakefile: New file, from GNU CoreUtils with some
fixes to permit overriding the default actions when configure and
makefile are not available.
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.