Paul Eggert [Fri, 18 Aug 2006 18:35:07 +0000 (18:35 +0000)]
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
(ME_DUMMY): Treat "kernfs" as a dummy.
(read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
sys/statvfs.h. When getmntinfo was found, check its declaration and
set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
Paul Eggert [Thu, 17 Aug 2006 20:34:21 +0000 (20:34 +0000)]
Update from coreutils.
* lib/__fpending.h: Add copyright notice.
* lib/fprintftime.h: Likewise.
* lib/savedir.c: Use (C) in copyright notice.
* lib/savedir.h: Likewise.
2006-08-15 Jim Meyering <jim@meyering.net>
* lib/at-func.c: New file, with the logic of all emulated at-functions.
* lib/openat-priv.h: Include <errno.h> and define ENOSYS,
in support of the EXPECTED_ERRNO macro.
* lib/openat.c (fstatat, unlinkat, fchownat): Remove function definitions.
Instead, define the appropriate symbols and include "at-func.c".
* lib/mkdirat.c (mkdirat): Likewise.
* lib/fchmodat.c (fchmodat): Likewise.
(ENOSYS): Remove definition.
* lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does it.
Don't include "unistd--.h" -- it wasn't ever used.
2006-01-17 Jim Meyering <jim@meyering.net>
Rewrite fts.c not to change the current working directory,
by using openat, fstatat, fdopendir, etc..
* lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
(HAVE_OPENAT_SUPPORT): Define.
[_LIBC] (fchdir): Don't undef or define; no longer used.
(FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
Now, this `function' always succeeds, and consumes its file descriptor
parameter -- so callers must not close such FDs. Update callers.
(diropen_fd, opendirat, cwd_advance_fd): New functions.
(diropen): Add parameter, SP. Adjust all callers.
Implement using diropen_fd, rather than open.
(fts_open): Initialize new member, fts_cwd_fd.
Remove fts_rft-setting code.
(fts_close): Close fts_cwd_fd, if necessary.
(__opendir2): Define in terms of opendir or opendirat,
depending on whether the FST_NOCHDIR flag is set.
(fts_build): Since fts_safe_changedir consumes its FD, and since
this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
and close the dup'd file descriptor upon failure.
(fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
(fts_safe_changedir): Tweak semantics to reflect that this function
now calls cwd_advance_fd and hence consumes its FD argument.
* lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
[struct FTS] (fts_rft): Remove now-unused member.
[struct FTS] (fts_cycle.state): Improve comment.
* lib/openat.c (openat_needs_fchdir): New function.
* lib/openat.h (openat_needs_fchdir): Declare it.
2006-08-15 Jim Meyering <jim@meyering.net>
* m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
2006-01-17 Jim Meyering <jim@meyering.net>
* m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
2006-01-11 Jim Meyering <jim@meyering.net>
* m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
Check for the lchmod function.
Paul Eggert [Mon, 14 Aug 2006 17:58:00 +0000 (17:58 +0000)]
* solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B. SunOS 4.1.3
was Solaris 1.1A. Remove space before B in Solaris 1.1.1B.
Mention SunOS 5.11. Mention that everything before SunOS 5.7
is now obsolete, and give a pointer to the Sun list.
Add copyright notice.
Paul Eggert [Fri, 11 Aug 2006 17:42:19 +0000 (17:42 +0000)]
* snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
LEN is smaller than SIZE. Suggested by Bruno Haible.
Also, help the compiler to keep LEN in a register.
Paul Eggert [Thu, 10 Aug 2006 20:08:01 +0000 (20:08 +0000)]
Import the following changes from libc:
2006-06-02 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.c (re_string_skip_chars): If no character has
been converted at all, set *last_wc to WEOF. If mbrtowc failed, set wc
to the byte which couldn't be converted.
(re_string_reconstruct): Don't clear valid_raw_len before calling
re_string_skip_chars. If wc is WEOF after re_string_skip_chars, set
tip_context using re_string_context_at.
2006-05-02 Ulrich Drepper <drepper@redhat.com>
* posix/regex.h: g++ still cannot handled [restrict].
Paul Eggert [Thu, 10 Aug 2006 19:32:38 +0000 (19:32 +0000)]
* modules/snprintf (Depends-on): Remove minmax.
(Maintainer): Add self.
* lib/.cppi-disable: Add snprintf.h, socket_.h.
* lib/snprintf.c: Include <errno.h> and <limits.h>.
(EOVERFLOW): Define if the system does not.
Do not include "minmax.h"; it wasn't used.
(snprintf): Don't assume size_t promotes to an unsigned type.
Fix bug when generated string was too long for the buffer: the
buffer's contents are supposed to be the initial prefix of the
output. Don't assume vasnprintf returns EOVERFLOW if the size
exceeds INT_MAX; do the check ourselves.
Jim Meyering [Thu, 10 Aug 2006 13:40:17 +0000 (13:40 +0000)]
* modules/same-inode: New module.
* modules/dev-ino: New module.
* modules/cycle-check: Depend on these modules, rather than simply
including their .h files.
(Makefile.am): Don't list cycle-check.[ch] here, now that they're
required via m4/cycle-check.m4.
* modules/same: Depend on new same-inode module, rather than
including same-inode.h.
* modules/chdir-safer: New file.
Paul Eggert [Wed, 9 Aug 2006 22:27:27 +0000 (22:27 +0000)]
Sync from coreutils.
* m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
* m4/time_r.m4 (gl_TIME_R): Likewise.
2006-07-19 Mike Frysinger <vapier@gentoo.org>
* lib/mountlist.c [ME_REMOTE]: Filter out cifs.
See <http://bugs.gentoo.org/141012>.