9 FILE *fopen(const char *file
, const char *mode
)
21 flags
= O_WRONLY
|O_CREAT
|O_TRUNC
;
24 flags
= O_WRONLY
|O_CREAT
|O_APPEND
;
34 flags
= (flags
& ~(O_RDONLY
|O_WRONLY
)) | O_RDWR
;
37 fd
= open(file
, flags
, 0666);
42 return fdopen(fd
, mode
);