summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2005-06-15*** empty log message ***Jim Meyering
2005-06-15(make_dir_parents): Don't let a failed chdir($PWD)Jim Meyering
stop us from restricting permissions of just-created absolute-named directories.
2005-06-14Improve diagnostics for restore_cwd failure.Paul Eggert
2005-06-14(make_dir): Remove. All uses replaced by mkdir.Paul Eggert
(make_dir_parents): Last arg is now int * (for errno), not bool *. Rewrite "mkdir -p" algorithm to avoid the need for "stat" each time through the loop. Do not diagnose restore_cwd failure; that is the caller's job (and perhaps the caller does not care).
2005-06-14(make_dir): Remove. All uses replaced by mkdir.Paul Eggert
(make_dir_parents): Last arg is now int * (for errno), not bool *.
2005-06-14mkdir-p cleanup.Paul Eggert
2005-06-14(CLEANUP_CWD, CLEANUP): Remove.Paul Eggert
(make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP. If the file already exists but is not a directory, don't bother to try to make its parents. Close potential file descriptor leak if we can't chdir("/") (!). Don't always return true if chdir($PWD) fails; return true only if the requested action was done successfully (except for the chdir($PWD)). Don't log final directory unless we actually made it. Refactor to avoid duplicate code to fix up permissions. Don't attempt to fix up parent permissions if chdir($PWD) fails.
2005-06-14*** empty log message ***Jim Meyering
2005-06-14Reflect s/_die/_fail/ renaming.Jim Meyering
2005-06-14(openat_save_fail): Rename from openat_save_die.Jim Meyering
(openat_restore_fail): Rename from openat_restore_die.
2005-06-14clarify commentJim Meyering
2005-06-14*** empty log message ***Jim Meyering
2005-06-14(CLEANUP_CWD): Return *true*, not false when failingJim Meyering
to restore initial working directory.
2005-06-14.Jim Meyering
2005-06-14*** empty log message ***Jim Meyering
2005-06-14(openat_save_die, openat_restore_die): New file.Jim Meyering
2005-06-14(openat_save_die, openat_restore_die): Declare and define.Jim Meyering
2005-06-14Provide an alternative to exiting immediately upon save_cwd orJim Meyering
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.
2005-06-13*** empty log message ***Jim Meyering
2005-06-13(make_dir_parents): Update prototype.Jim Meyering
2005-06-13(make_dir_parents): New parameter: different_working_dir,Jim Meyering
to tell caller if/when we change the working directory and are unable to return to the initial one.
2005-06-12*** empty log message ***Jim Meyering
2005-06-12(CLEANUP_CWD): Change one more `return 1' to `return false'.Jim Meyering
This fixes a bug introduced on 2004-07-30.
2005-06-02Regenerate.Paul Eggert
2005-06-02Use "file name" when talking about file names, instead of "filename"Paul Eggert
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-02Don't use "path" or "filename" to mean "file name"Paul Eggert
in comments or local variable names.
2005-06-02(excluded_file_name): Renamed from excluded_filename.Paul Eggert
All uses changed.
2005-06-02Don't use "path" or "filename" to mean "file name"Paul Eggert
in comments or local variable names. (excluded_file_name): Renamed from excluded_filename. All uses changed.
2005-06-02Renamed from path-concat.c.Paul Eggert
(file_name_concat): Renamed from path_concat. All callers changed. [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
2005-06-02Renamed from path-concat.h. All includers changed.Paul Eggert
(file_name_concat): Renamed from path_concat. All callers changed.
2005-06-02Renamed from makepath.h. All includers changed.Paul Eggert
(make_dir_parents): Renamed from make_path. All callers changed.
2005-06-02Renamed from makepath.c.Paul Eggert
(make_dir_parents): Renamed from make_path. All callers changed.
2005-05-30Regenerate.Paul Eggert
2005-05-30_POSIX_VERSION cleanupPaul Eggert
2005-05-30(getpwnam, getgrnam, getgrgid)Paul Eggert
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30Include <limits.h> unconditionally, since otherPaul Eggert
files have been getting away with it for years (MORE/BSD 4.3 is extinct now).
2005-05-30(getpwuid, getpwnam, getgrgid, getgrnam)Paul Eggert
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30(getuid, getgid, getuid, getegid)Paul Eggert
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30(_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:Paul Eggert
Define to 256, not 255, as per modern POSIX.
2005-05-28fts.c: Don't worry about debugging on pre-C99-comopatible hosts.Paul Eggert
2005-05-28Don't worry about debugging on pre-C99-comopatible hosts;Paul Eggert
the configuration hassle isn't worth it. Include inttypes.h and stdint.h unconditionally if FTS_DEBUG. (LONGEST_MODIFIER, PRIuMAX): Remove.
2005-05-27Break integer-in-string comparison code out from src/sort.Paul Eggert
2005-05-22(fd_safer) [_LGPL_PACKAGE]: New static function,Paul Eggert
so that unistd-safer.h (GPL'ed code) need not be included.
2005-05-21*** empty log message ***Jim Meyering
2005-05-21fix typo in a commentJim Meyering
2005-05-20Import chown fixes from gnulib.Paul Eggert
2005-05-20(rpl_chown): Return -1 on failure.Paul Eggert
2005-05-20Regenerate.Paul Eggert
2005-05-20Split fts into LGPL'ed and GPL'ed parts.Paul Eggert
2005-05-20Don't include "cycle-check.h" or "hash.h".Paul Eggert
(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.