This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include <fcntl.h>
22
23
24 int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME
25 | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS
26 | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT);
27
28
29 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
30
31
32 int i = FD_CLOEXEC;
33
34
35 pid_t t1;
36 off_t t2;
37 mode_t t3;
38
39 int
40 main (void)
41 {
42
43 switch (0)
44 {
45 case SEEK_CUR:
46 case SEEK_END:
47 case SEEK_SET:
48 ;
49 }
50
51
52 switch (O_RDONLY)
53 {
54
55 case O_RDONLY:
56 case O_WRONLY:
57 case O_RDWR:
58 #if O_EXEC && O_EXEC != O_RDONLY
59 case O_EXEC:
60 #endif
61 #if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY
62 case O_SEARCH:
63 #endif
64 i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH));
65 break;
66
67
68 case O_CREAT:
69 case O_EXCL:
70 case O_TRUNC:
71 case O_APPEND:
72 break;
73
74
75 #if O_CLOEXEC
76 case O_CLOEXEC:
77 #endif
78 #if O_DIRECT
79 case O_DIRECT:
80 #endif
81 #if O_DIRECTORY
82 case O_DIRECTORY:
83 #endif
84 #if O_DSYNC
85 case O_DSYNC:
86 #endif
87 #if O_IGNORE_CTTY
88 case O_IGNORE_CTTY:
89 #endif
90 #if O_NOATIME
91 case O_NOATIME:
92 #endif
93 #if O_NONBLOCK
94 case O_NONBLOCK:
95 #endif
96 #if O_NOCTTY
97 case O_NOCTTY:
98 #endif
99 #if O_NOFOLLOW
100 case O_NOFOLLOW:
101 #endif
102 #if O_NOLINK
103 case O_NOLINK:
104 #endif
105 #if O_NOLINKS
106 case O_NOLINKS:
107 #endif
108 #if O_NOTRANS
109 case O_NOTRANS:
110 #endif
111 #if O_RSYNC && O_RSYNC != O_DSYNC
112 case O_RSYNC:
113 #endif
114 #if O_SYNC && O_SYNC != O_DSYNC && O_SYNC != O_RSYNC
115 case O_SYNC:
116 #endif
117 #if O_TTY_INIT
118 case O_TTY_INIT:
119 #endif
120 #if O_BINARY
121 case O_BINARY:
122 #endif
123 #if O_TEXT
124 case O_TEXT:
125 #endif
126 ;
127 }
128
129 return !i;
130 }