Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
systems other than Linux.
(chmod_or_fchmod): New function: use fchmod when possible,
and chmod otherwise.
(file_has_acl): Add a POSIX ACL implementation, with a
Linux-specific subcase.
(copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
S_ISVTX from one file to another. Fall back to fchmod/chmod when
acls are unsupported.
(set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
S_ISVTX to a defined value. Fall back to fchmod/chmod when acls
are unsupported.
|
|
|
|
|
|
"gettext.h"; either no longer needed or are guaranteed by openat.h.
(_): Remove; no longer needed.
(openat): Renamed from rpl_openat; no need for rpl_openat
since openat.h renames openat for us.
Replace most of the body with a call to openat_permissive,
to avoid duplicate code.
Port to (probably hypothetical) environments were mode_t is
wider than int.
(openat_permissive): Require mode arg, so that we can check
types better. Put it just after flags. Change cwd failure
indicator from pointer-to-bool to pointer-to-errno-value.
All callers changed.
Invoke openat_save_fail and/or openat_restore_fail if
cwd_errno is null, so that openat can call us.
(openat_permissive, fdopendir, fstatat, unlinkat):
Simplify errno handling to avoid some duplicate code,
as it's OK to set errno on success.
|
|
__OPENAT_PREFIX only, not also on AT_FDCWD.
(openat_ro): Remove. Caller changed to use openat_permissive.
(openat_permissive): Now a macro, if not a function.
(openat_restore_fail, openat_save_fail): Now always functions,
since mkdirat needs them even if __OPENAT_PREFIX is defined.
|
|
|
|
|
|
and fprintftime.h. Now they're pulled in via the .m4 file.
|
|
with '#if !@HAVE_BOOL@".
|
|
|
|
work around compilers that have a (possibly-broken) _Bool but lack
a working <stdbool.h>.
|
|
TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
porting problem reported by Georg Schwarz in
<http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
* m4/stat-time.m4 (gl_STAT_TIME): Likewise.
|
|
|
|
|
|
Paul Eggert reported that unlink/rmdir vs. e.g., /proc/self/fd/N/FILE
fails with ENOSYS. This makes openat revert to using save-cwd.c
functions in that case.
|
|
|
|
|
|
|
|
|
|
Remove definitions of macros defined therein.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
too.
|
|
(dev_from_mount_options)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
New function. It no longer assumes "dev=" has the System V meaning
on Linux (since it doesn't). It also parses "dev=" more carefully.
(read_file_system_list)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
dev= in that case.
|
|
|
|
|
|
|
|
days most people use C99-compatible compilers to debug, so it's
not worth worrying about catering to older compilers for that.
This works around some porting problems with HP-UX compilers.
(false, true) [defined __BEOS__]: Don't #undef; no longer needed.
(_Bool): typedef to bool if C++ or BeOS, and #define to signed char
otherwise.
|
|
Report an error at compile-time if only a 1-second nominal clock
resolution is found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(openat_ro): Define.
|
|
(openat_permissive): New function -- used in remove.c rewrite.
(all functions): Set errno just before returning, only if there
was an actual failure.
Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
|
|
|