Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/c-libs/posix-filesys/fchmod.c
ViewVC logotype

Annotation of /sml/trunk/src/runtime/c-libs/posix-filesys/fchmod.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 249 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/runtime/c-libs/posix-filesys/fchmod.c

1 : monnier 249 /* fchmod.c
2 :     *
3 :     * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
4 :     */
5 :    
6 :     #include "ml-unixdep.h"
7 :     #include "ml-objects.h"
8 :     #include "ml-c.h"
9 :     #include "cfun-proto-list.h"
10 :     #include <sys/types.h>
11 :     #include <sys/stat.h>
12 :    
13 :     /* _ml_P_FileSys_fchmod : (fd * word) -> unit
14 :     * fd mode
15 :     *
16 :     * Change mode of file
17 :     */
18 :     ml_val_t _ml_P_FileSys_fchmod (ml_state_t *msp, ml_val_t arg)
19 :     {
20 :     int fd = REC_SELINT(arg, 0);
21 :     mode_t mode = REC_SELWORD(arg, 1);
22 :     int sts;
23 :    
24 :     sts = fchmod (fd, mode);
25 :    
26 :     CHK_RETURN_UNIT(msp, sts)
27 :    
28 :     } /* end of _ml_P_FileSys_fchmod */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0