PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
fcntl.h
Go to the documentation of this file.
1 /*
2  * fcntl.h
3  *
4  * File control
5  *
6  * PSXSDK
7  */
8 
9 #ifndef _FCNTL_H
10 #define _FCNTL_H
11 
12 #define O_RDONLY 1
13 #define O_WRONLY 2
14 #define O_NONBLOCK 4
15 
16 #define O_RDLOCK 16
17 
18 #define O_WRLOCK 32
19 #define O_RDWR (O_RDONLY | O_WRONLY)
20 #define O_APPEND 256
21 #define O_CREAT 512
22 #define O_TRUNC 1024
23 
24 #define O_EXCL 0
25 
29 #define O_SCAN 4096
30 
31 #define O_RCOM 8192
32 
33 #define O_NOBUF 16384
34 
35 #define O_NOWAIT 32768
36 
37 #define O_ASYNC O_NOWAIT
38 
57 // The third argument (file mode) makes no sense in PSXSDK,
58 // and will be ignored.
59 
60 #define open(filename, flags, ...) \
61  open(filename, flags)
62 
67 int open(char *filename, int flags);
68 int read(int d, void *buf, int nbytes);
69 int close(int d);
70 int lseek(int fildes, int offset, int whence);
71 
72 #endif