diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-31 13:11:26 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-31 13:11:26 +0100 |
commit | ec682e64339176a9fdb0a6ba5266033a982d0f24 (patch) | |
tree | b0c0816d167c79db0bbbf20a006764c15a4b976c /misc | |
parent | 9a079e270a9bec7e1fe28aeda63e07c1bb808d44 (diff) |
Fix f?chflags prototypes, declare them and their flags.
Although they are defined on GNU/Hurd, f?chflags were never declared. It
seems the BSD prototype actually uses an unsigned long, so we can take
the opportunity to fix the prototype, while adding an actual
declaration.
* misc/chflags.c (chflags): Set flags parameter type to unsigned long instead of
int.
* misc/fchflags.c (fchflags): Likewise.
* sysdeps/mach/hurd/chflags.c (chflags): Likewise.
* sysdeps/mach/hurd/fchflags.c (fchflags): Likewise.
* sysdeps/mach/hurd/bits/stat.h (UF_SETTABLE, UF_NODUMP, UF_IMMUTABLE,
UF_APPEND, UF_OPAQUE, UF_NOUNLINK, SF_SETTABLE, SF_ARCHIVED, SF_IMMUTABLE,
SF_APPEND, SF_NOUNLINK, SF_SNAPSHOT): Declare macros.
(chflags, fchflags): Declare functions.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/chflags.c | 4 | ||||
-rw-r--r-- | misc/fchflags.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/misc/chflags.c b/misc/chflags.c index 3785c6b7b0..cf3b77fdf0 100644 --- a/misc/chflags.c +++ b/misc/chflags.c @@ -21,12 +21,12 @@ /* Change the flags of FILE to FLAGS. */ -int chflags (const char *file, int flags) __THROW; +int chflags (const char *file, unsigned long int flags) __THROW; int chflags (file, flags) const char *file; - int flags; + unsigned long int flags; { if (file == NULL) { diff --git a/misc/fchflags.c b/misc/fchflags.c index 53805eaf0e..1e61921aac 100644 --- a/misc/fchflags.c +++ b/misc/fchflags.c @@ -21,12 +21,12 @@ /* Change the flags of the file referenced by FD to FLAGS. */ -int fchflags (int fd, int flags) __THROW; +int fchflags (int fd, unsigned long int flags) __THROW; int fchflags (fd, flags) int fd; - int flags; + unsigned long int flags; { if (fd < 0) { |