diff options
Diffstat (limited to 'otherlibs/unix/fchown.c')
-rw-r--r-- | otherlibs/unix/fchown.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/otherlibs/unix/fchown.c b/otherlibs/unix/fchown.c new file mode 100644 index 000000000..4aaa2ae55 --- /dev/null +++ b/otherlibs/unix/fchown.c @@ -0,0 +1,18 @@ +#include <mlvalues.h> +#include "unix.h" + +#ifdef HAS_FCHMOD + +value unix_fchown(fd, uid, gid) /* ML */ + value fd, uid, gid; +{ + if (fchown(Int_val(fd), Int_val(uid), Int_val(gid)) == -1) + uerror("fchown", Nothing); + return Val_unit; +} + +#else + +value unix_fchown() { invalid_argument("fchown not implemented"); } + +#endif |