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 | | |
35 | | |
36 | | |
37 | | |
38 | | |
39 | | |
40 | | |
41 | | |
42 | | |
43 | | |
44 | | |
45 | | |
46 | | |
47 | | |
48 | | |
49 | | |
50 | | |
51 | | |
52 | | |
53 | | |
54 | | |
55 | | |
56 | | |
57 | | |
58 | | |
59 | | |
60 | | |
61 | | |
62 | | |
63 | | |
64 | | |
65 | | |
66 | | |
67 | | |
68 | | |
69 | | |
70 | | |
71 | | |
72 | | |
73 | | |
74 | | |
75 | | |
76 | | |
77 | | |
78 | | |
79 | | |
80 | | |
81 | | |
82 | | |
83 | | |
84 | | |
85 | | |
86 | | |
87 | | |
88 | | |
89 | | |
90 | | |
91 | | |
92 | | |
93 | | |
94 | | |
95 | | |
96 | | |
97 | | |
98 | | |
99 | | |
100 | | |
101 | | |
102 | | |
103 | | |
104 | | |
105 | | |
106 | | |
107 | | |
108 | | |
109 | | |
110 | | |
111 | | |
112 | | |
113 | | |
114 | | |
115 | | |
116 | | |
117 | | |
118 | | |
119 | | |
120 | | |
121 | | |
122 | | |
123 | | |
124 | | |
125 | | |
126 | | |
127 | | |
128 | | |
129 | | |
130 | | |
131 | | |
132 | | |
133 | | |
134 | | |
135 | | |
136 | | |
137 | | |
138 | | |
139 | | |
140 | | |
141 | | |
142 | | |
143 | | |
144 | | |
145 | | |
146 | | |
147 | | |
148 | | |
149 | | |
150 | | |
151 | | |
152 | | |
153 | | |
154 | | |
155 | | |
156 | | |
157 | | |
158 | | |
159 | | |
160 | | |
161 | | |
162 | | |
163 | | |
164 | | |
165 | | |
166 | | |
167 | | |
168 | | |
169 | | |
170 | | |
171 | | |
172 | | |
173 | | |
174 | | |
175 | | |
176 | | |
177 | | |
178 | | |
179 | | |
180 | | |
181 | | |
182 | | |
183 | | |
184 | | |
185 | | |
186 | | |
187 | | |
188 | | |
189 | | |
190 | | |
191 | | |
192 | | |
193 | | |
194 | | |
195 | | |
196 | | |
197 | | |
| | | | | | | #define CB_FUNC tFunc(tNone,tOr(tVoid,tMixed)) | | | FILE_FUNC("open",file_open, tFunc(tStr tStr tOr(tVoid,tInt),tInt)) | #ifdef HAVE_OPENAT | | FILE_FUNC("openat",file_openat, tFunc(tStr tStr tOr(tVoid,tInt),tObjImpl_STDIO_FD)) | #endif | | FILE_FUNC("close",file_close, tFunc(tOr(tStr,tVoid),tInt)) | | FILE_FUNC("read",file_read, tFunc(tOr(tInt,tVoid) tOr(tInt01,tVoid),tStr8)) | | FILE_FUNC("peek",file_peek, tFunc(tOr3(tFlt,tInt,tVoid) tOr(tInt,tVoid), tInt)) | | FILE_FUNC("write",file_write, | tOr3(tFunc(tStr, tInt), | tFuncV(tArr(tStr), tMixed, tInt), | tFuncV(tAttr("sprintf_format", tStr), | tAttr("sprintf_args", tMixed),tInt))) | | FILE_FUNC("read_oob",file_read_oob, tFunc(tOr(tInt,tVoid) tOr(tInt,tVoid),tStr8)) | | FILE_FUNC("write_oob",file_write_oob, | tOr3(tFunc(tStr, tInt), | tFuncV(tArr(tStr), tMixed, tInt), | tFuncV(tAttr("sprintf_format", tStr), | tAttr("sprintf_args", tMixed),tInt))) | | | #ifdef HAVE_PIKE_SEND_FD | FILE_FUNC("send_fd", file_send_fd, tFunc(tObjIs_STDIO_FD, tVoid)) | #endif | | #ifdef SO_LINGER | | FILE_FUNC("linger", file_linger, | tFunc(tOr3(tInt_10, tWord, tVoid), tInt01)) | #endif | | #ifdef HAVE_FSYNC | | FILE_FUNC("sync", file_sync, tFunc(tNone,tInt)) | #endif /* HAVE_FSYNC */ | | | FILE_FUNC("seek",file_seek, | tOr(tFunc(tInt tOr(tNStr(tInt05),tVoid),tInt), | tAttr("deprecated",tFunc(tInt tInt tOr(tInt,tVoid),tInt)))) | | FILE_FUNC("tell",file_tell, tFunc(tNone,tInt)) | | FILE_FUNC("truncate",file_truncate, tFunc(tInt,tInt)) | | FILE_FUNC("stat",file_stat, tFunc(tNone,tObjImpl_STDIO_STAT)) | #ifdef HAVE_FSTATAT | FILE_FUNC("statat", file_statat, | tFunc(tStr tOr(tVoid, tInt01), tObjImpl_STDIO_STAT)) | #ifdef HAVE_UNLINKAT | FILE_FUNC("unlinkat", file_unlinkat, tFunc(tStr, tInt01)); | #endif /* HAVE_UNLINKAT */ | #endif /* HAVE_FSTATAT */ | #if defined(HAVE_FDOPENDIR) && defined(HAVE_OPENAT) | FILE_FUNC("get_dir", file_get_dir, tFunc(tOr(tStr,tVoid),tArr(tStr8))); | #endif /* HAVE_FDOPENDIR && HAVE_OPENAT */ | | FILE_FUNC("errno",file_errno, tFunc(tNone,tInt)) | | FILE_FUNC("mode",file_mode, tFunc(tNone,tInt)) | | | FILE_FUNC("set_close_on_exec",file_set_close_on_exec, tFunc(tInt,tVoid)) | | FILE_FUNC("set_nonblocking",file_set_nonblocking, tFunc(tNone,tVoid)) | | | | FILE_FUNC("set_backend", file_set_backend, tFunc(tObj,tVoid)) | | FILE_FUNC("query_backend", file_query_backend, tFunc(tVoid,tObj)) | | | FILE_FUNC("set_read_callback",file_set_read_callback, tFunc(CB_FUNC,tVoid)) | | FILE_FUNC("set_write_callback",file_set_write_callback, tFunc(CB_FUNC,tVoid)) | | FILE_FUNC("set_read_oob_callback",file_set_read_oob_callback, tFunc(CB_FUNC,tVoid)) | | FILE_FUNC("set_write_oob_callback",file_set_write_oob_callback, tFunc(CB_FUNC,tVoid)) | | FILE_FUNC("set_fs_event_callback",file_set_fs_event_callback, tFunc(tFunc(tInt,tOr(tVoid,tMixed)) tInt,tVoid)) | | FILE_FUNC("query_fs_event_flags",file_query_fs_event_flags, tFunc(tVoid,tInt)) | | #undef CB_FUNC | | | | FILE_FUNC("_enable_callbacks",file__enable_callbacks, tFunc(tNone,tVoid)) | | FILE_FUNC("_disable_callbacks",file__disable_callbacks, tFunc(tNone,tVoid)) | | | FILE_FUNC("set_blocking",file_set_blocking, tFunc(tNone,tVoid)) | | FILE_FUNC ("is_open", file_is_open, tFunc(tNone,tInt)) | | FILE_FUNC("query_fd",file_query_fd, tFunc(tNone,tInt)) | | FILE_FUNC("release_fd",file_release_fd, tFunc(tVoid,tInt)) | | FILE_FUNC("take_fd",file_take_fd, tFunc(tInt,tVoid)) | | | | FILE_FUNC("dup2",file_dup2, tFunc(tObj,tInt)) | | FILE_FUNC("dup",file_dup, tFunc(tNone,tObjImpl_STDIO_FD)) | | FILE_FUNC("pipe",file_pipe, tFunc(tOr(tVoid,tInt),tObjImpl_STDIO_FD)) | | | FILE_FUNC("set_buffer",file_set_buffer, tFunc(tInt tOr(tStr,tVoid),tVoid)) | | FILE_FUNC("open_socket",file_open_socket, | tFunc(tOr3(tInt,tStr,tVoid) tOr(tStr,tVoid) tOr(tInt,tVoid),tInt)) | | FILE_FUNC("connect",file_connect, tOr3(tFunc(tStr tOr(tInt,tStr),tInt),tFunc(tStr tOr(tInt,tStr) tStr tOr(tInt,tStr),tInt), | tFunc(tStr tOr(tInt,tStr) tStr tOr(tInt,tStr) tStr8,tStr))) | #ifdef HAVE_SYS_UN_H | | FILE_FUNC("connect_unix",file_connect_unix, tFunc(tStr,tInt)) | #endif /* HAVE_SYS_UN_H */ | | FILE_FUNC("query_address",file_query_address, tFunc(tOr(tInt01,tVoid),tStr)) | | FILE_FUNC("create",file_create, tFunc(tOr3(tVoid,tInt,tStr) tOr(tVoid,tStr) tOr(tVoid,tInt),tVoid)) | | #ifdef _REENTRANT | | FILE_FUNC("proxy",file_proxy, tFunc(tObj,tVoid)) | #endif | | #if defined(HAVE_FD_FLOCK) || defined(HAVE_FD_LOCKF) | | FILE_FUNC("lock",file_lock, tFunc(tOr(tVoid,tInt),tObjImpl_STDIO_FILE_LOCK_KEY)) | | FILE_FUNC("trylock",file_trylock, tFunc(tOr(tVoid,tInt),tObjImpl_STDIO_FILE_LOCK_KEY)) | #endif | | #if !defined(__NT__) && (defined(HAVE_POSIX_OPENPT) || defined(PTY_MASTER_PATHNAME)) | | FILE_FUNC("openpt",file_openpt, tFunc(tStr,tInt)) | #endif | | #if defined(HAVE_GRANTPT) || defined(USE_PT_CHMOD) || defined(USE_CHGPT) | | FILE_FUNC("grantpt",file_grantpt, tFunc(tNone,tStr)) | #endif | | #if defined(HAVE_TERMIOS_H) | | FILE_FUNC("tcgetattr",file_tcgetattr, tFunc(tNone,tMapping)) | | FILE_FUNC("tcsetattr",file_tcsetattr, tFunc(tMapping tOr(tVoid,tStr),tInt)) | | FILE_FUNC("tcsendbreak",file_tcsendbreak, tFunc(tInt,tInt)) | | FILE_FUNC("tcflush",file_tcflush, tFunc(tNone,tStr)) | | | | | #endif | | #ifdef SO_KEEPALIVE | | FILE_FUNC("set_keepalive",file_set_keepalive, tFunc(tInt,tInt)) | #endif | | #if defined(HAVE_FSETXATTR) && defined(HAVE_FGETXATTR) && defined(HAVE_FLISTXATTR) | FILE_FUNC( "listxattr", file_listxattr, tFunc(tVoid,tArr(tStr))) | FILE_FUNC( "setxattr", file_setxattr, tFunc(tStr tStr tInt,tInt)) | FILE_FUNC( "getxattr", file_getxattr, tFunc(tStr,tStr)) | FILE_FUNC( "removexattr", file_removexattr, tFunc(tStr,tInt)) | #endif | | #undef FILE_FUNC | #undef FILE_OBJ | | |
|