Paul Eggert [Thu, 3 Feb 2005 20:38:14 +0000 (20:38 +0000)]
* modules/chdir-long (Depends-on): Add memrchr.
* modules/memrchr (Files): Add lib/memrchr.h.
(Include): "memrchr.h".
* lib/memrchr.h: New file.
* lib/chdir-long.c: Include it.
* lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
Don't bother including stddef.h.
* m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
Paul Eggert [Tue, 1 Feb 2005 23:56:46 +0000 (23:56 +0000)]
* mountlist.h (MOUNTLIST_H_): New macro, to protect against double
inclusion.
Include <sys/types.h>, for dev_t.
(ME_DUMMY, ME_REMOTE): Move from here....
* mountlist.c (ME_DUMMY, ME_REMOTE): To here.
(ME_DUMMY): Count "subfs" as a dummy. Problem reported by
Dmitry V. Levin.
Include mountlist.h first, to test the interface.
(gl_SYSEXITS): Reverted logic. SYSEXITS_H
must be defined if the header file was not found, in order
to provide a replacement. Reported by Todd Vierling <tv@duh.org>
* lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
same value as for Solaris 9.
* lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
component length. This included changing the parameter to be
of type `char *' rather than `char const *'.
* lib/chdir-long.h (chdir_long): Update prototype.
* lib/openat.c (fdopendir, fstatat): New functions.
* lib/openat.h: Include headers required for use of DIR and struct stat.
[AT_SYMLINK_NOFOLLOW]: Define.
(fdopendir, fstatat): Add prototypes.
Paul Eggert [Fri, 21 Jan 2005 00:24:52 +0000 (00:24 +0000)]
* MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
* modules/version-etc-fsf: New file.
* lib/version-etc-fsf.c: New file, with version_etc_copyright.
* lib/version-etc.c: Remove version_etc_copyright.
* lib/version-etc.h (version_etc_copyright): Use [] instead of * in
prototype.
Paul Eggert [Thu, 20 Jan 2005 22:21:01 +0000 (22:21 +0000)]
* lib/save-cwd.c (save_cwd): Remove code to support the case
where fchdir is missing or flaky.
* m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume it.
Simon Josefsson [Thu, 20 Jan 2005 12:22:11 +0000 (12:22 +0000)]
* base64.h (isbase64): Add.
* base64.c (isb64): Rename to isbase64, use to_uchar instead of
using a unsigned prototype, don't inline.
(base64_decode): Use it.
Paul Eggert [Tue, 18 Jan 2005 23:52:18 +0000 (23:52 +0000)]
Work around tests/touch/empty-file failure on a system
(sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
NULL-means-set-to-current-time semantics.
Remove temporary file immediately, rather than waiting
for configure's at-exit trap code to do it.
Paul Eggert [Tue, 18 Jan 2005 21:58:11 +0000 (21:58 +0000)]
* modules/chdir-long, modules/openat: New files.
* modules/save-cwd (Depends-on): Depend on chdir-long.
(Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
* lib/save-cwd.c: Include "save-cwd.h" before other include files.
(O_DIRECTORY): Remove; not needed here, since "." must be
a directory. All uses removed.
(save_cwd): Use __sgi || __sun, not sun || __sun. __sun is
universal on Suns, and we also need to test for IRIX.
Revamp code to use 'if' rather than '#if'.
Avoid unnecessary comparison of cwd->desc to 0.
Change the name of the robust chdir function from chdir to chdir_long.
* lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
(restore_cwd): Use chdir_long, not chdir.
* lib/chdir-long.c: Renamed from chdir.c.
* lib/chdir-long.h: Renamed from chdir.h.
[!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd.
* m4/chdir-long.m4, openat.m4: New files.
* m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
save-cwd.h. Add AC_LIBOBJ for save-cwd.
Paul Eggert [Tue, 18 Jan 2005 21:09:14 +0000 (21:09 +0000)]
Merge changes from coreutils.
[DEFAULT_ALIGNMENT]: Use an intermediate type to simplify
offsetof() macro construct to avoid compile failure with native HP-UX
11.0 ANSI C compiler.
Jim Meyering [Tue, 4 Jan 2005 20:22:52 +0000 (20:22 +0000)]
Changes imported from coreutils.
(gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
as the mkstemp template, use a temporary directory and an
8.3-friendly template to avoid trouble on systems like DJGPP.
Remove the temporary directory right away, rather than waiting
for configure's at-exit trap code to do it.
Reported by Juan M. Guerrero via Stepan Kasal.
Paul Eggert [Wed, 29 Dec 2004 05:49:08 +0000 (05:49 +0000)]
[!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
not needed. This removes a dependency on the gettext module.
[defined _LIBC]: Do not include <libintl.h>; not needed.