DEFINITIONS
This source file includes following functions.
- Init_fcntl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #include "ruby.h"
35 #include <fcntl.h>
36
37 void
38 Init_fcntl()
39 {
40 VALUE mFcntl = rb_define_module("Fcntl");
41 #ifdef F_DUPFD
42 rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
43 #endif
44 #ifdef F_GETFD
45 rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
46 #endif
47 #ifdef F_GETLK
48 rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK));
49 #endif
50 #ifdef F_SETFD
51 rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
52 #endif
53 #ifdef F_GETFL
54 rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
55 #endif
56 #ifdef F_SETFL
57 rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
58 #endif
59 #ifdef F_SETLK
60 rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK));
61 #endif
62 #ifdef F_SETLKW
63 rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
64 #endif
65 #ifdef FD_CLOEXEC
66 rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC));
67 #endif
68 #ifdef F_RDLCK
69 rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK));
70 #endif
71 #ifdef F_UNLCK
72 rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK));
73 #endif
74 #ifdef F_WRLCK
75 rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
76 #endif
77 #ifdef O_CREAT
78 rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
79 #endif
80 #ifdef O_EXCL
81 rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
82 #endif
83 #ifdef O_NOCTTY
84 rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY));
85 #endif
86 #ifdef O_TRUNC
87 rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
88 #endif
89 #ifdef O_APPEND
90 rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
91 #endif
92 #ifdef O_NONBLOCK
93 rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
94 #endif
95 #ifdef O_NDELAY
96 rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY));
97 #endif
98 #ifdef O_RDONLY
99 rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
100 #endif
101 #ifdef O_RDWR
102 rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
103 #endif
104 #ifdef O_WRONLY
105 rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
106 #endif
107 }