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