Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
restore_cwd failure. Now, an application can arrange e.g.,
to perform a longjump in that case.
* openat.c: Include dirname.h.
Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
(rpl_openat, fdopendir, fstatat): Call openat_save_die
and openat_restore_die rather than calling error directly.
Don't include "error.h" or "exitfail.h"; they're no longer needed.
* openat-die.c (openat_save_die, openat_restore_die): New file.
* openat.h (openat_save_die, openat_restore_die): Declare and define.
|
|
|
|
|
|
to tell caller if/when we change the working directory and are
unable to return to the initial one.
|
|
|
|
This fixes a bug introduced on 2004-07-30.
|
|
|
|
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.
|
|
in comments or local variable names.
|
|
All uses changed.
|
|
in comments or local variable names.
(excluded_file_name): Renamed from excluded_filename.
All uses changed.
|
|
(file_name_concat): Renamed from path_concat. All callers changed.
[TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
|
|
(file_name_concat): Renamed from path_concat. All callers changed.
|
|
(make_dir_parents): Renamed from make_path. All callers changed.
|
|
(make_dir_parents): Renamed from make_path. All callers changed.
|
|
|
|
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
files have been getting away with it for years (MORE/BSD 4.3
is extinct now).
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
Define to 256, not 255, as per modern POSIX.
|
|
|
|
the configuration hassle isn't worth it.
Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
(LONGEST_MODIFIER, PRIuMAX): Remove.
|
|
|
|
so that unistd-safer.h (GPL'ed code) need not be included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(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.
|
|
(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.
|
|
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.
|
|
|
|
Spotted by Paul Eggert.
|
|
|
|
Use #define rather than a static function, to avoid a warning
when the function was not used.
|
|
|
|
|
|
(FTS): Use struct hash_table * instead of Hash_table, so that
we no longer need to include hash.h here.
|
|
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.
|
|
Include <stddef.h> unconditionally, since we assume C89 now.
All uses of PTR_INT_TYPE replaced by ptrdiff_t.
|
|
|
|
|
|
|