diff options
author | Jim Meyering <jim@meyering.net> | 2003-03-13 13:07:11 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-03-13 13:07:11 +0000 |
commit | 30593686a860c3021d64521927e6bbea7c3b2a05 (patch) | |
tree | b839b2a8d761fe8faefb5ddfd0411af3cb8e4c8d | |
parent | 7bf2a1ab853d10b1b5cf09c0b8d5e670bb77fa1d (diff) | |
download | coreutils-30593686a860c3021d64521927e6bbea7c3b2a05.tar.xz |
.
-rw-r--r-- | lib/fchown-stub.c | 14 | ||||
-rw-r--r-- | lib/lstat-stub.c | 12 | ||||
-rw-r--r-- | lib/readlink-stub.c | 14 |
3 files changed, 40 insertions, 0 deletions
diff --git a/lib/fchown-stub.c b/lib/fchown-stub.c new file mode 100644 index 000000000..6e7c4f925 --- /dev/null +++ b/lib/fchown-stub.c @@ -0,0 +1,14 @@ +#include <config.h> +#include <sys/types.h> +#include <errno.h> + +/* A trivial substitute for `fchown'. + + DJGPP 2.03 and earlier (and perhaps later) don't have `fchown', + so we pretend no-one has permission for this operation. */ + +int fchown (int fd, uid_t uid, gid_t gid) +{ + errno = EPERM; + return -1; +} diff --git a/lib/lstat-stub.c b/lib/lstat-stub.c new file mode 100644 index 000000000..9ed163598 --- /dev/null +++ b/lib/lstat-stub.c @@ -0,0 +1,12 @@ +#include <config.h> +#include <sys/stat.h> + +/* A trivial substitute for `lstat'. + + DJGPP 2.03 and earlier don't have `lstat' and don't support + symlinks. */ + +int lstat (const char *fname, struct stat *st_buf) +{ + return stat (fname, st_buf); +} diff --git a/lib/readlink-stub.c b/lib/readlink-stub.c new file mode 100644 index 000000000..2dba74a33 --- /dev/null +++ b/lib/readlink-stub.c @@ -0,0 +1,14 @@ +#include <config.h> +#include <stddef.h> +#include <errno.h> + +/* A trivial substitute for `readlink'. + + DJGPP 2.03 and earlier don't have `readlink' and don't support + symlinks. */ + +int readlink (const char *filename, char *buffer, size_t size) +{ + errno = EINVAL; + return -1; +} |