Jim Meyering
b0e72c0a63
*** empty log message ***
2005-06-19 08:30:16 +00:00
Jim Meyering
2c4bb16c03
(libcoreutils_a_SOURCES): Remove xgetcwd.c, xgetcwd.h, xfts.c and xfts.h.
2005-06-19 08:25:21 +00:00
Jim Meyering
a5c9e15482
*** empty log message ***
2005-06-16 14:52:33 +00:00
Jim Meyering
5371690c7f
(rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
...
when either N or S is zero.
2005-06-16 14:52:29 +00:00
Jim Meyering
7dd05aa715
Reflect s/_die/_fail/ renaming.
2005-06-15 09:38:12 +00:00
Jim Meyering
8add4ac9cb
*** empty log message ***
2005-06-15 08:32:14 +00:00
Jim Meyering
d4145e48ed
(make_dir_parents): Don't let a failed chdir($PWD)
...
stop us from restricting permissions of just-created absolute-named
directories.
2005-06-15 08:31:44 +00:00
Paul Eggert
f2c653e8df
Improve diagnostics for restore_cwd failure.
2005-06-14 23:58:00 +00:00
Paul Eggert
153854cc31
(make_dir): Remove. All uses replaced by mkdir.
...
(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 23:56:49 +00:00
Paul Eggert
616a6e5146
(make_dir): Remove. All uses replaced by mkdir.
...
(make_dir_parents): Last arg is now int * (for errno), not bool *.
2005-06-14 23:56:17 +00:00
Paul Eggert
d203fc19ae
mkdir-p cleanup.
2005-06-14 18:36:44 +00:00
Paul Eggert
f7bbc5d1a2
(CLEANUP_CWD, CLEANUP): Remove.
...
(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 18:35:38 +00:00
Jim Meyering
5c3c5b0586
*** empty log message ***
2005-06-14 09:46:39 +00:00
Jim Meyering
b95fca684c
Reflect s/_die/_fail/ renaming.
2005-06-14 09:46:24 +00:00
Jim Meyering
f23e1c18a8
(openat_save_fail): Rename from openat_save_die.
...
(openat_restore_fail): Rename from openat_restore_die.
2005-06-14 09:44:54 +00:00
Jim Meyering
cb7512d04d
clarify comment
2005-06-14 08:55:37 +00:00
Jim Meyering
cb3b87f4d7
*** empty log message ***
2005-06-14 08:53:11 +00:00
Jim Meyering
1fbdda3dc2
(CLEANUP_CWD): Return *true*, not false when failing
...
to restore initial working directory.
2005-06-14 08:48:13 +00:00
Jim Meyering
a0e071d050
.
2005-06-14 08:19:18 +00:00
Jim Meyering
30b65617ac
*** empty log message ***
2005-06-14 06:55:32 +00:00
Jim Meyering
3e915a8263
(openat_save_die, openat_restore_die): New file.
2005-06-14 06:55:24 +00:00
Jim Meyering
5985c9991b
(openat_save_die, openat_restore_die): Declare and define.
2005-06-14 06:54:57 +00:00
Jim Meyering
8c98346f6f
Provide an alternative to exiting immediately upon save_cwd or
...
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-14 06:54:39 +00:00
Jim Meyering
57f2a7090c
*** empty log message ***
2005-06-13 10:22:29 +00:00
Jim Meyering
15de627dec
(make_dir_parents): Update prototype.
2005-06-13 10:22:26 +00:00
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