@@ -72,8 +72,7 @@ Init_fcntl(void)
72
72
rb_define_const (mFcntl , "VERSION" , rb_str_new_cstr (FCNTL_VERSION ));
73
73
74
74
#ifdef F_DUPFD
75
- /* Document-const: F_DUPFD
76
- *
75
+ /*
77
76
* Duplicate a file descriptor to the minimum unused file descriptor
78
77
* greater than or equal to the argument.
79
78
*
@@ -84,195 +83,168 @@ Init_fcntl(void)
84
83
rb_define_const (mFcntl , "F_DUPFD" , INT2NUM (F_DUPFD ));
85
84
#endif
86
85
#ifdef F_GETFD
87
- /* Document-const: F_GETFD
88
- *
86
+ /*
89
87
* Read the close-on-exec flag of a file descriptor.
90
88
*/
91
89
rb_define_const (mFcntl , "F_GETFD" , INT2NUM (F_GETFD ));
92
90
#endif
93
91
#ifdef F_GETLK
94
- /* Document-const: F_GETLK
95
- *
92
+ /*
96
93
* Determine whether a given region of a file is locked. This uses one of
97
94
* the F_*LK flags.
98
95
*/
99
96
rb_define_const (mFcntl , "F_GETLK" , INT2NUM (F_GETLK ));
100
97
#endif
101
98
#ifdef F_SETFD
102
- /* Document-const: F_SETFD
103
- *
99
+ /*
104
100
* Set the close-on-exec flag of a file descriptor.
105
101
*/
106
102
rb_define_const (mFcntl , "F_SETFD" , INT2NUM (F_SETFD ));
107
103
#endif
108
104
#ifdef F_GETFL
109
- /* Document-const: F_GETFL
110
- *
105
+ /*
111
106
* Get the file descriptor flags. This will be one or more of the O_*
112
107
* flags.
113
108
*/
114
109
rb_define_const (mFcntl , "F_GETFL" , INT2NUM (F_GETFL ));
115
110
#endif
116
111
#ifdef F_SETFL
117
- /* Document-const: F_SETFL
118
- *
112
+ /*
119
113
* Set the file descriptor flags. This will be one or more of the O_*
120
114
* flags.
121
115
*/
122
116
rb_define_const (mFcntl , "F_SETFL" , INT2NUM (F_SETFL ));
123
117
#endif
124
118
#ifdef F_SETLK
125
- /* Document-const: F_SETLK
126
- *
119
+ /*
127
120
* Acquire a lock on a region of a file. This uses one of the F_*LCK
128
121
* flags.
129
122
*/
130
123
rb_define_const (mFcntl , "F_SETLK" , INT2NUM (F_SETLK ));
131
124
#endif
132
125
#ifdef F_SETLKW
133
- /* Document-const: F_SETLKW
134
- *
126
+ /*
135
127
* Acquire a lock on a region of a file, waiting if necessary. This uses
136
128
* one of the F_*LCK flags
137
129
*/
138
130
rb_define_const (mFcntl , "F_SETLKW" , INT2NUM (F_SETLKW ));
139
131
#endif
140
132
#ifdef FD_CLOEXEC
141
- /* Document-const: FD_CLOEXEC
142
- *
133
+ /*
143
134
* the value of the close-on-exec flag.
144
135
*/
145
136
rb_define_const (mFcntl , "FD_CLOEXEC" , INT2NUM (FD_CLOEXEC ));
146
137
#endif
147
138
#ifdef F_RDLCK
148
- /* Document-const: F_RDLCK
149
- *
139
+ /*
150
140
* Read lock for a region of a file
151
141
*/
152
142
rb_define_const (mFcntl , "F_RDLCK" , INT2NUM (F_RDLCK ));
153
143
#endif
154
144
#ifdef F_UNLCK
155
- /* Document-const: F_UNLCK
156
- *
145
+ /*
157
146
* Remove lock for a region of a file
158
147
*/
159
148
rb_define_const (mFcntl , "F_UNLCK" , INT2NUM (F_UNLCK ));
160
149
#endif
161
150
#ifdef F_WRLCK
162
- /* Document-const: F_WRLCK
163
- *
151
+ /*
164
152
* Write lock for a region of a file
165
153
*/
166
154
rb_define_const (mFcntl , "F_WRLCK" , INT2NUM (F_WRLCK ));
167
155
#endif
168
156
#ifdef F_SETPIPE_SZ
169
- /* Document-const: F_SETPIPE_SZ
170
- *
157
+ /*
171
158
* Change the capacity of the pipe referred to by fd to be at least arg bytes.
172
159
*/
173
160
rb_define_const (mFcntl , "F_SETPIPE_SZ" , INT2NUM (F_SETPIPE_SZ ));
174
161
#endif
175
162
#ifdef F_GETPIPE_SZ
176
- /* Document-const: F_GETPIPE_SZ
177
- *
163
+ /*
178
164
* Return (as the function result) the capacity of the pipe referred to by fd.
179
165
*/
180
166
rb_define_const (mFcntl , "F_GETPIPE_SZ" , INT2NUM (F_GETPIPE_SZ ));
181
167
#endif
182
168
#ifdef O_CREAT
183
- /* Document-const: O_CREAT
184
- *
169
+ /*
185
170
* Create the file if it doesn't exist
186
171
*/
187
172
rb_define_const (mFcntl , "O_CREAT" , INT2NUM (O_CREAT ));
188
173
#endif
189
174
#ifdef O_EXCL
190
- /* Document-const: O_EXCL
191
- *
175
+ /*
192
176
* Used with O_CREAT, fail if the file exists
193
177
*/
194
178
rb_define_const (mFcntl , "O_EXCL" , INT2NUM (O_EXCL ));
195
179
#endif
196
180
#ifdef O_NOCTTY
197
- /* Document-const: O_NOCTTY
198
- *
181
+ /*
199
182
* Open TTY without it becoming the controlling TTY
200
183
*/
201
184
rb_define_const (mFcntl , "O_NOCTTY" , INT2NUM (O_NOCTTY ));
202
185
#endif
203
186
#ifdef O_TRUNC
204
- /* Document-const: O_TRUNC
205
- *
187
+ /*
206
188
* Truncate the file on open
207
189
*/
208
190
rb_define_const (mFcntl , "O_TRUNC" , INT2NUM (O_TRUNC ));
209
191
#endif
210
192
#ifdef O_APPEND
211
- /* Document-const: O_APPEND
212
- *
193
+ /*
213
194
* Open the file in append mode
214
195
*/
215
196
rb_define_const (mFcntl , "O_APPEND" , INT2NUM (O_APPEND ));
216
197
#endif
217
198
#ifdef O_NONBLOCK
218
- /* Document-const: O_NONBLOCK
219
- *
199
+ /*
220
200
* Open the file in non-blocking mode
221
201
*/
222
202
rb_define_const (mFcntl , "O_NONBLOCK" , INT2NUM (O_NONBLOCK ));
223
203
#endif
224
204
#ifdef O_NDELAY
225
- /* Document-const: O_NDELAY
226
- *
205
+ /*
227
206
* Open the file in non-blocking mode
228
207
*/
229
208
rb_define_const (mFcntl , "O_NDELAY" , INT2NUM (O_NDELAY ));
230
209
#endif
231
210
#ifdef O_RDONLY
232
- /* Document-const: O_RDONLY
233
- *
211
+ /*
234
212
* Open the file in read-only mode
235
213
*/
236
214
rb_define_const (mFcntl , "O_RDONLY" , INT2NUM (O_RDONLY ));
237
215
#endif
238
216
#ifdef O_RDWR
239
- /* Document-const: O_RDWR
240
- *
217
+ /*
241
218
* Open the file in read-write mode
242
219
*/
243
220
rb_define_const (mFcntl , "O_RDWR" , INT2NUM (O_RDWR ));
244
221
#endif
245
222
#ifdef O_WRONLY
246
- /* Document-const: O_WRONLY
247
- *
223
+ /*
248
224
* Open the file in write-only mode.
249
225
*/
250
226
rb_define_const (mFcntl , "O_WRONLY" , INT2NUM (O_WRONLY ));
251
227
#endif
252
228
#ifdef O_ACCMODE
253
- /* Document-const: O_ACCMODE
254
- *
229
+ /*
255
230
* Mask to extract the read/write flags
256
231
*/
257
232
rb_define_const (mFcntl , "O_ACCMODE" , INT2FIX (O_ACCMODE ));
258
233
#else
259
- /* Document-const: O_ACCMODE
260
- *
234
+ /*
261
235
* Mask to extract the read/write flags
262
236
*/
263
237
rb_define_const (mFcntl , "O_ACCMODE" , INT2FIX (O_RDONLY | O_WRONLY | O_RDWR ));
264
238
#endif
265
239
#ifdef F_DUP2FD
266
- /* Document-const: F_DUP2FD
267
- *
240
+ /*
268
241
* It is a FreeBSD specific constant and equivalent
269
242
* to dup2 call.
270
243
*/
271
244
rb_define_const (mFcntl , "F_DUP2FD" , INT2NUM (F_DUP2FD ));
272
245
#endif
273
246
#ifdef F_DUP2FD_CLOEXEC
274
- /* Document-const: F_DUP2FD_CLOEXEC
275
- *
247
+ /*
276
248
* It is a FreeBSD specific constant and acts
277
249
* similarly as F_DUP2FD but set the FD_CLOEXEC
278
250
* flag in addition.
0 commit comments