Commit Graph

22898 Commits

Author SHA1 Message Date
Jim Meyering
42629c4629 . 2006-01-17 19:57:26 +00:00
Jim Meyering
d55e2d8528 (openat_needs_fchdir): New function. 2006-01-17 17:43:10 +00:00
Jim Meyering
88df081621 *** empty log message *** 2006-01-17 17:42:57 +00:00
Jim Meyering
264f1bc3cd (openat_needs_fchdir): Declare it. 2006-01-17 17:42:53 +00:00
Jim Meyering
debc171df3 *** empty log message *** 2006-01-17 17:27:32 +00:00
Jim Meyering
b517279580 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT. 2006-01-17 17:27:27 +00:00
Jim Meyering
ba19fb9f38 *** empty log message *** 2006-01-17 17:26:39 +00:00
Jim Meyering
5c184343b8 New test, to exercise one small corner of fts.c. 2006-01-17 17:26:32 +00:00
Jim Meyering
0ca8bc4273 Include "openat.h".
Don't include "lchown.h".
(restricted_chown): Accept a new parameter, CWD_FD, and use it in
calling openat, lchownat, chownat, rather than open, lchown, chown.
Update caller.
2006-01-17 17:26:15 +00:00
Jim Meyering
c97a36e2d9 Now that fts no longer changes the current working directory, adjust
its clients accordingly -- note that du.c uses fts but doesn't need
any adjustment, since it doesn't operate on the actual files,
but rather just uses the stat buffers provided by fts.

Include "openat.h".
(process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2006-01-17 17:25:42 +00:00
Jim Meyering
e9f0c42afc *** empty log message *** 2006-01-17 17:24:38 +00:00
Jim Meyering
a28b096d7f [struct FTS] (fts_cwd_fd): New member.
[struct FTS] (fts_rft): Remove now-unused member.
[struct FTS] (fts_cycle.state): Improve comment.
2006-01-17 17:24:29 +00:00
Jim Meyering
c1994c16c2 Rewrite fts.c not to change the current working directory,
by using openat, fstatat, fdopendir, etc..

[! _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.
2006-01-17 17:24:14 +00:00
Paul Eggert
739de8914f (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.
2006-01-17 07:21:48 +00:00
Jim Meyering
b88411cca3 *** empty log message *** 2006-01-13 13:55:53 +00:00
Jim Meyering
9f43b7e39d (SUBDIRS): Add comments discouraging the
addition of new directories under tests/.
2006-01-13 13:55:49 +00:00
Jim Meyering
a25795c926 *** empty log message *** 2006-01-13 13:38:45 +00:00
Jim Meyering
583cd919cc Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's getfacl would hang. 2006-01-13 13:38:39 +00:00
Jim Meyering
153a886d6d *** empty log message *** 2006-01-13 13:35:31 +00:00
Jim Meyering
6c1675394f (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 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.
2006-01-13 13:35:26 +00:00
Jim Meyering
86d43d3826 *** empty log message *** 2006-01-12 18:08:42 +00:00
Jim Meyering
8e6c26e593 Adjust not to hard-code the expected
diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
from that of Linux/libc.  Reported by Paul Eggert.
2006-01-12 18:08:18 +00:00
Jim Meyering
d56050cc6f Create final file *after* the loop. 2006-01-12 14:45:15 +00:00
Jim Meyering
2a8499e09f Create file at end of symlink chain. 2006-01-12 14:31:02 +00:00
Jim Meyering
9d7a6ee0f3 skip the test on a system that can handle this many symlinks in a file name, 2006-01-12 09:25:33 +00:00
Jim Meyering
7dabfc7e73 . 2006-01-12 08:40:34 +00:00
Jim Meyering
8d75ee59e0 whoops. traps were commented out. 2006-01-12 08:00:17 +00:00
Jim Meyering
c27afc1a04 *** empty log message *** 2006-01-12 07:55:40 +00:00
Jim Meyering
b78b7818af Remove useless parentheses in cpp directives, so that
this file passes coreutils' `make syntax-check' tests.
2006-01-12 07:55:36 +00:00
Jim Meyering
e4c3f364f3 fix typo: s/stdint.h.m4/stdint.m4/ 2006-01-12 07:48:36 +00:00
Jim Meyering
e9a7b49342 from gnulib 2006-01-12 07:45:26 +00:00
Jim Meyering
395cb7a6b9 *** empty log message *** 2006-01-12 07:22:36 +00:00
Jim Meyering
d80a835f4a (TESTS): Add test. 2006-01-12 07:22:18 +00:00
Jim Meyering
41a358ec88 New file, with a test for one of the
bugs fixed by yesterday's test.c changes.
2006-01-12 07:22:00 +00:00
Paul Eggert
9b6eae76de Import from gnulib. 2006-01-12 07:21:34 +00:00
Paul Eggert
ea58c1150c Add stdint_.h. 2006-01-12 07:21:19 +00:00
Paul Eggert
518d041db8 Adjust to md5 changes in gnulib, and make sha1 etc. more consistent
with md5.
2006-01-12 07:19:50 +00:00
Paul Eggert
59a8b22268 (gl_PREREQ): Require gl_STDINT_H. 2006-01-12 07:19:00 +00:00
Paul Eggert
3f83336726 (struct sha512_ctx): Use a word buffer, not a byte buffer, so that we
don't need to worry about alignment.
2006-01-12 07:18:39 +00:00
Paul Eggert
a60af3a64f (struct sha256_ctx): Use a word buffer, not a byte buffer, so that we
don't need to worry about alignment.  All uses changed.
2006-01-12 07:18:13 +00:00
Paul Eggert
25962cd489 (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.
2006-01-12 07:17:51 +00:00
Paul Eggert
1834ba06ac Fix commentary to match md5 better. Adjust to .h file changes. 2006-01-12 07:17:25 +00:00
Paul Eggert
3024d13d7e (__attribute__): Remove; unused. 2006-01-12 07:16:33 +00:00
Paul Eggert
7354a360be Fix commentary typos.
(alignof, UNALIGNED_P): No need for a GCC-specific version.
2006-01-12 07:16:21 +00:00
Paul Eggert
71b4960878 (BUILT_SOURCES, EXTRA_DIST, stdint.h, MOSTLYCLEANFILES):
Add gnulib snippet.
2006-01-12 07:16:07 +00:00
Paul Eggert
aa038250c3 Add stdint.h. 2006-01-12 07:15:48 +00:00
Jim Meyering
4eafb9d163 *** empty log message *** 2006-01-11 22:11:49 +00:00
Jim Meyering
50114df430 *** empty log message *** 2006-01-11 21:32:56 +00:00
Jim Meyering
aa990c11dd *** empty log message *** 2006-01-11 21:31:41 +00:00
Jim Meyering
3ff0576f2b *** empty log message *** 2006-01-11 21:29:20 +00:00