1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-05 00:07:15 +02:00
Commit Graph

4242 Commits

Author SHA1 Message Date
Jim Meyering ecd375b64a (make_dir_parents): New parameter: different_working_dir,
to tell caller if/when we change the working directory and are
unable to return to the initial one.
2005-06-13 10:15:19 +00:00
Jim Meyering 26438e44cd *** empty log message *** 2005-06-12 19:56:42 +00:00
Jim Meyering 78c87e1292 (CLEANUP_CWD): Change one more return 1' to return false'.
This fixes a bug introduced on 2004-07-30.
2005-06-12 19:56:37 +00:00
Paul Eggert 2bc139bf8f Regenerate. 2005-06-02 05:19:46 +00:00
Paul Eggert ef12d7fb52 Use "file name" when talking about file names, instead of "filename"
or "path", as per the GNU coding standards.  As part of this,
rename makepath.c to mkdir-p.c, and path-concat.c to filenamecat.c,
and likewise for the .h files.
2005-06-02 05:06:56 +00:00
Paul Eggert ab2edb9e33 Don't use "path" or "filename" to mean "file name"
in comments or local variable names.
2005-06-02 05:05:29 +00:00
Paul Eggert 1e6b9bd047 (excluded_file_name): Renamed from excluded_filename.
All uses changed.
2005-06-02 05:02:38 +00:00
Paul Eggert d91f01988d Don't use "path" or "filename" to mean "file name"
in comments or local variable names.

(excluded_file_name): Renamed from excluded_filename.
All uses changed.
2005-06-02 05:02:14 +00:00
Paul Eggert 1885506f1e Renamed from path-concat.c.
(file_name_concat): Renamed from path_concat.  All callers changed.
[TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
2005-06-02 04:59:10 +00:00
Paul Eggert 3a0841772c Renamed from path-concat.h. All includers changed.
(file_name_concat): Renamed from path_concat.  All callers changed.
2005-06-02 04:58:26 +00:00
Paul Eggert 6499782f2e Renamed from makepath.h. All includers changed.
(make_dir_parents): Renamed from make_path.  All callers changed.
2005-06-02 04:56:41 +00:00
Paul Eggert 78cd5b80f6 Renamed from makepath.c.
(make_dir_parents): Renamed from make_path.  All callers changed.
2005-06-02 04:55:35 +00:00
Paul Eggert ff57f59217 Regenerate. 2005-05-30 07:41:32 +00:00
Paul Eggert 53d6509846 _POSIX_VERSION cleanup 2005-05-30 07:37:02 +00:00
Paul Eggert 4ab39ecf75 (getpwnam, getgrnam, getgrgid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:31:12 +00:00
Paul Eggert c86717d0dd Include <limits.h> unconditionally, since other
files have been getting away with it for years (MORE/BSD 4.3
is extinct now).
2005-05-30 07:30:51 +00:00
Paul Eggert fcb5c87adb (getpwuid, getpwnam, getgrgid, getgrnam)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:30:31 +00:00
Paul Eggert 241ed9e339 (getuid, getgid, getuid, getegid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:30:01 +00:00
Paul Eggert b224f94761 (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
Define to 256, not 255, as per modern POSIX.
2005-05-30 07:05:07 +00:00
Paul Eggert a73860cb2f fts.c: Don't worry about debugging on pre-C99-comopatible hosts. 2005-05-28 00:00:38 +00:00
Paul Eggert 644cca3ead Don't worry about debugging on pre-C99-comopatible hosts;
the configuration hassle isn't worth it.
Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
(LONGEST_MODIFIER, PRIuMAX): Remove.
2005-05-28 00:00:06 +00:00
Paul Eggert 606321fa32 Break integer-in-string comparison code out from src/sort. 2005-05-27 20:34:03 +00:00
Paul Eggert a7102ac430 (fd_safer) [_LGPL_PACKAGE]: New static function,
so that unistd-safer.h (GPL'ed code) need not be included.
2005-05-22 17:29:46 +00:00
Jim Meyering b72d60e7a4 *** empty log message *** 2005-05-21 06:44:36 +00:00
Jim Meyering 716ad689e0 fix typo in a comment 2005-05-21 06:42:41 +00:00
Paul Eggert c84d7e1cb0 Import chown fixes from gnulib. 2005-05-20 22:48:40 +00:00
Paul Eggert 7a905c6ecc (rpl_chown): Return -1 on failure. 2005-05-20 22:48:08 +00:00
Paul Eggert e8ddf93a19 Regenerate. 2005-05-20 22:38:38 +00:00
Paul Eggert 8cc757279d Split fts into LGPL'ed and GPL'ed parts. 2005-05-20 22:34:44 +00:00
Paul Eggert 6ee2045428 Don't include "cycle-check.h" or "hash.h".
(setup_dir, free_dir): New functions.
(enter_dir, leave_dir): Define trivial
alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
(HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
Move to fts-cycle.c.
(fts_open): Use setup_dir.
(fts_close): Use free_dir.
(fts_read): Have just one copy of the ENTER_DIR code rather than three.
This adds a label and some gotos, but the alternatives were messier.
Check for memory allocation failure when entering a dir.
(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
2005-05-20 22:34:19 +00:00
Paul Eggert fea1ba2d14 (_LGPL_PACKAGE) [defined _LIBC]: New macro.
(FTS): New member fts_cycle, that is a union that contains the
old active_dir_ht and cycle_state.  All uses changed to mention
fts_cycle.ht and fts_cycle.state.
2005-05-20 22:33:59 +00:00
Paul Eggert 42aab6b2ae New file, containing GPL'ed code migrated out of
fts.c, with the following changes:
(setup_dir, free_dir): New functions.
(enter_dir): Now returns bool.  Return true if successful, false
if memory exhausted.  All callers changed.
Do not bother partly cleaning up on
memory allocation failure; that is free_dir's job.
However, free ad if hash_insert fails, to avoid memory leak.
(enter_dir, leave_dir): Accommodate change to FTS by inspecting
fts->fts_options to see which union member to use.
2005-05-20 22:32:50 +00:00
Jim Meyering ca88d7c411 *** empty log message *** 2005-05-20 04:27:00 +00:00
Jim Meyering 1222461ca6 (fts_open): Remove useless but otherwise harmless malloc call.
Spotted by Paul Eggert.
2005-05-20 04:26:35 +00:00
Jim Meyering 2334353619 *** empty log message *** 2005-05-19 08:54:44 +00:00
Jim Meyering 276ae5c469 (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
Use #define rather than a static function, to avoid a warning
when the function was not used.
2005-05-19 08:54:40 +00:00
Paul Eggert 666680ddaa Regenerate. 2005-05-18 19:36:47 +00:00
Paul Eggert 0b5dba9efb Remove some dependencies and old cruft from fts etc. 2005-05-18 19:32:57 +00:00
Paul Eggert ae2b26dd0d Do not include hash.h or cycle-check.h; no longer needed.
(FTS): Use struct hash_table * instead of Hash_table, so that
we no longer need to include hash.h here.
2005-05-18 19:29:11 +00:00
Paul Eggert b569baa020 Include fts_.h first, to check interface.
Do not include intprops.h; no longer needed.
Include cycle-check.h and hash.h, since fts_.h no longer does.
Remove unnecessary casts of closedir to void.
(fts_build): Use a simpler method (not involving TYPE_SIGNED) to
decide whether to decrement nlinks.
2005-05-18 19:28:48 +00:00
Paul Eggert 0d3649e30d Include canonicalize.h first, to test interface.
Include <stddef.h> unconditionally, since we assume C89 now.
All uses of PTR_INT_TYPE replaced by ptrdiff_t.
2005-05-18 19:28:21 +00:00
Paul Eggert 99ad01b0d5 Use geteuid, not getuid. Set "initialized" only if it was clear. 2005-05-15 05:57:31 +00:00
Jim Meyering 53a152ff60 . 2005-05-14 19:13:51 +00:00
Paul Eggert 070140df89 Regenerate. 2005-05-14 08:17:38 +00:00
Jim Meyering afae3029ef tweak cpp indentation on one line 2005-05-14 08:14:47 +00:00
Paul Eggert 7b18bf3811 * unlinkdir.c, unlinkdir.h: New files. 2005-05-14 08:09:23 +00:00
Jim Meyering effcdb2647 remove recent temporary additions 2005-05-14 08:05:04 +00:00
Jim Meyering 8ac343fffa Correct cpp indentation 2005-05-14 08:03:44 +00:00
Paul Eggert 2e71ba4dd2 New unlinkdir module. 2005-05-14 08:01:17 +00:00
Jim Meyering 116e6fb244 Update FSF postal mail address. 2005-05-14 07:58:06 +00:00