diff options
author | Jim Meyering <jim@meyering.net> | 2006-08-15 19:17:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-08-15 19:17:30 +0000 |
commit | 2ee444b5fe414a627f8600cb3989b8eed1676b9f (patch) | |
tree | b109e89438ab841f4c23871d0ad242a9d4fcc3db /lib/openat-priv.h | |
parent | d8139747b188a142f388716b431e180faecd4f68 (diff) | |
download | coreutils-2ee444b5fe414a627f8600cb3989b8eed1676b9f.tar.xz |
[./]
* .x-sc_require_config_h: Add lib/at-func.c.
[lib/]
* at-func.c: New file, with the logic of all emulated at-functions.
* openat-priv.h: Include <errno.h> and define ENOSYS,
in support of the EXPECTED_ERRNO macro.
* openat.c (fstatat, unlinkat, fchownat): Remove function definitions.
Instead, define the appropriate symbols and include "at-func.c".
* mkdirat.c (mkdirat): Likewise.
* fchmodat.c (fchmodat): Likewise.
(ENOSYS): Remove definition.
* openat.c: Don't include <errno.h>, now that "openat-priv.h" does it.
Don't include "unistd--.h" -- it wasn't ever used.
[m4/]
* openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
Diffstat (limited to 'lib/openat-priv.h')
-rw-r--r-- | lib/openat-priv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/openat-priv.h b/lib/openat-priv.h index 2b4780eec..1f420c175 100644 --- a/lib/openat-priv.h +++ b/lib/openat-priv.h @@ -19,6 +19,7 @@ #include <stdio.h> #include <string.h> +#include <errno.h> #include "alloca.h" #include "intprops.h" @@ -41,6 +42,16 @@ } \ while (0) +/* Some systems don't have ENOSYS. */ +#ifndef ENOSYS +# ifdef ENOTSUP +# define ENOSYS ENOTSUP +# else +/* Some systems don't have ENOTSUP either. */ +# define ENOSYS EINVAL +# endif +#endif + /* Trying to access a BUILD_PROC_NAME file will fail on systems without /proc support, and even on systems *with* ProcFS support. Return nonzero if the failure may be legitimate, e.g., because /proc is not |