| @@ -1,326 +1,326 @@ | | | @@ -1,326 +1,326 @@ |
1 | /* This is an OS dependent, generated file */ | | 1 | /* This is an OS dependent, generated file */ |
2 | | | 2 | |
3 | | | 3 | |
4 | #ifndef __ROKEN_H__ | | 4 | #ifndef __ROKEN_H__ |
5 | #define __ROKEN_H__ | | 5 | #define __ROKEN_H__ |
6 | | | 6 | |
7 | /* -*- C -*- */ | | 7 | /* -*- C -*- */ |
8 | /* | | 8 | /* |
9 | * Copyright (c) 1995-2005 Kungliga Tekniska Högskolan | | 9 | * Copyright (c) 1995-2005 Kungliga Tekniska Högskolan |
10 | * (Royal Institute of Technology, Stockholm, Sweden). | | 10 | * (Royal Institute of Technology, Stockholm, Sweden). |
11 | * All rights reserved. | | 11 | * All rights reserved. |
12 | * | | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | | 13 | * Redistribution and use in source and binary forms, with or without |
14 | * modification, are permitted provided that the following conditions | | 14 | * modification, are permitted provided that the following conditions |
15 | * are met: | | 15 | * are met: |
16 | * | | 16 | * |
17 | * 1. Redistributions of source code must retain the above copyright | | 17 | * 1. Redistributions of source code must retain the above copyright |
18 | * notice, this list of conditions and the following disclaimer. | | 18 | * notice, this list of conditions and the following disclaimer. |
19 | * | | 19 | * |
20 | * 2. Redistributions in binary form must reproduce the above copyright | | 20 | * 2. Redistributions in binary form must reproduce the above copyright |
21 | * notice, this list of conditions and the following disclaimer in the | | 21 | * notice, this list of conditions and the following disclaimer in the |
22 | * documentation and/or other materials provided with the distribution. | | 22 | * documentation and/or other materials provided with the distribution. |
23 | * | | 23 | * |
24 | * 3. Neither the name of the Institute nor the names of its contributors | | 24 | * 3. Neither the name of the Institute nor the names of its contributors |
25 | * may be used to endorse or promote products derived from this software | | 25 | * may be used to endorse or promote products derived from this software |
26 | * without specific prior written permission. | | 26 | * without specific prior written permission. |
27 | * | | 27 | * |
28 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND | | 28 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND |
29 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 29 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE | | 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE |
32 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 32 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
36 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 36 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
37 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 37 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
38 | * SUCH DAMAGE. | | 38 | * SUCH DAMAGE. |
39 | */ | | 39 | */ |
40 | | | 40 | |
41 | | | 41 | |
42 | #include <stdio.h> | | 42 | #include <stdio.h> |
43 | #include <stdlib.h> | | 43 | #include <stdlib.h> |
44 | #include <stdarg.h> | | 44 | #include <stdarg.h> |
45 | #include <stdint.h> | | 45 | #include <stdint.h> |
46 | #include <string.h> | | 46 | #include <string.h> |
47 | #include <limits.h> | | 47 | #include <limits.h> |
48 | #include <signal.h> | | 48 | #include <signal.h> |
49 | | | 49 | |
50 | | | 50 | |
51 | | | 51 | |
52 | typedef int rk_socket_t; | | 52 | typedef int rk_socket_t; |
53 | | | 53 | |
54 | #define rk_closesocket(x) close(x) | | 54 | #define rk_closesocket(x) close(x) |
55 | #define rk_SOCK_IOCTL(s,c,a) ioctl((s),(c),(a)) | | 55 | #define rk_SOCK_IOCTL(s,c,a) ioctl((s),(c),(a)) |
56 | #define rk_IS_BAD_SOCKET(s) ((s) < 0) | | 56 | #define rk_IS_BAD_SOCKET(s) ((s) < 0) |
57 | #define rk_IS_SOCKET_ERROR(rv) ((rv) < 0) | | 57 | #define rk_IS_SOCKET_ERROR(rv) ((rv) < 0) |
58 | #define rk_SOCK_ERRNO errno | | 58 | #define rk_SOCK_ERRNO errno |
59 | #define rk_INVALID_SOCKET (-1) | | 59 | #define rk_INVALID_SOCKET (-1) |
60 | | | 60 | |
61 | #define rk_SOCK_INIT() 0 | | 61 | #define rk_SOCK_INIT() 0 |
62 | #define rk_SOCK_EXIT() do { } while(0) | | 62 | #define rk_SOCK_EXIT() do { } while(0) |
63 | | | 63 | |
64 | | | 64 | |
65 | #define IN_LOOPBACKNET 127 | | 65 | #define IN_LOOPBACKNET 127 |
66 | | | 66 | |
67 | | | 67 | |
68 | #define UNREACHABLE(x) | | 68 | #define UNREACHABLE(x) |
69 | #define UNUSED_ARGUMENT(x) | | 69 | #define UNUSED_ARGUMENT(x) |
70 | | | 70 | |
71 | | | 71 | |
72 | #include <sys/param.h> | | 72 | #include <sys/param.h> |
73 | #include <inttypes.h> | | 73 | #include <inttypes.h> |
74 | #include <sys/types.h> | | 74 | #include <sys/types.h> |
75 | #include <sys/errno.h> | | 75 | #include <sys/errno.h> |
76 | #include <unistd.h> | | 76 | #include <unistd.h> |
77 | #include <sys/socket.h> | | 77 | #include <sys/socket.h> |
78 | #include <sys/uio.h> | | 78 | #include <sys/uio.h> |
79 | #include <grp.h> | | 79 | #include <grp.h> |
80 | #include <sys/stat.h> | | 80 | #include <sys/stat.h> |
81 | #include <netinet/in.h> | | 81 | #include <netinet/in.h> |
82 | #include <arpa/inet.h> | | 82 | #include <arpa/inet.h> |
83 | #include <netdb.h> | | 83 | #include <netdb.h> |
84 | #include <arpa/nameser.h> | | 84 | #include <arpa/nameser.h> |
85 | #include <resolv.h> | | 85 | #include <resolv.h> |
86 | #include <syslog.h> | | 86 | #include <syslog.h> |
87 | #include <fcntl.h> | | 87 | #include <fcntl.h> |
88 | #include <errno.h> | | 88 | #include <errno.h> |
89 | #include <err.h> | | 89 | #include <err.h> |
90 | #include <termios.h> | | 90 | #include <termios.h> |
91 | #include <sys/ioctl.h> | | 91 | #include <sys/ioctl.h> |
92 | #include <sys/time.h> | | 92 | #include <sys/time.h> |
93 | #include <time.h> | | 93 | #include <time.h> |
94 | | | 94 | |
95 | #include <paths.h> | | 95 | #include <paths.h> |
96 | | | 96 | |
97 | #include <dirent.h> | | 97 | #include <dirent.h> |
98 | | | 98 | |
99 | | | 99 | |
100 | | | 100 | |
101 | | | 101 | |
102 | #include "roken-common.h" | | 102 | #include <krb5/roken-common.h> |
103 | | | 103 | |
104 | ROKEN_CPP_START | | 104 | ROKEN_CPP_START |
105 | | | 105 | |
106 | #define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x)) | | 106 | #define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x)) |
107 | | | 107 | |
108 | | | 108 | |
109 | | | 109 | |
110 | | | 110 | |
111 | | | 111 | |
112 | | | 112 | |
113 | | | 113 | |
114 | | | 114 | |
115 | | | 115 | |
116 | | | 116 | |
117 | | | 117 | |
118 | | | 118 | |
119 | #define asnprintf rk_asnprintf | | 119 | #define asnprintf rk_asnprintf |
120 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 120 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
121 | rk_asnprintf (char **, size_t, const char *, ...) | | 121 | rk_asnprintf (char **, size_t, const char *, ...) |
122 | __attribute__ ((__format__ (__printf__, 3, 4))); | | 122 | __attribute__ ((__format__ (__printf__, 3, 4))); |
123 | | | 123 | |
124 | #define vasnprintf rk_vasnprintf | | 124 | #define vasnprintf rk_vasnprintf |
125 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 125 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
126 | vasnprintf (char **, size_t, const char *, va_list) | | 126 | vasnprintf (char **, size_t, const char *, va_list) |
127 | __attribute__ ((__format__ (__printf__, 3, 0))); | | 127 | __attribute__ ((__format__ (__printf__, 3, 0))); |
128 | | | 128 | |
129 | | | 129 | |
130 | | | 130 | |
131 | #define strlwr rk_strlwr | | 131 | #define strlwr rk_strlwr |
132 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strlwr(char *); | | 132 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strlwr(char *); |
133 | | | 133 | |
134 | | | 134 | |
135 | | | 135 | |
136 | #define strsep_copy rk_strsep_copy | | 136 | #define strsep_copy rk_strsep_copy |
137 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL strsep_copy(const char**, const char*, char*, size_t); | | 137 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL strsep_copy(const char**, const char*, char*, size_t); |
138 | | | 138 | |
139 | | | 139 | |
140 | | | 140 | |
141 | | | 141 | |
142 | #define strupr rk_strupr | | 142 | #define strupr rk_strupr |
143 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strupr(char *); | | 143 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strupr(char *); |
144 | | | 144 | |
145 | | | 145 | |
146 | | | 146 | |
147 | | | 147 | |
148 | | | 148 | |
149 | #define rk_strerror_r strerror_r | | 149 | #define rk_strerror_r strerror_r |
150 | | | 150 | |
151 | | | 151 | |
152 | | | 152 | |
153 | | | 153 | |
154 | | | 154 | |
155 | | | 155 | |
156 | | | 156 | |
157 | #include <pwd.h> | | 157 | #include <pwd.h> |
158 | ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwnam (const char *); | | 158 | ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwnam (const char *); |
159 | ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwuid (uid_t); | | 159 | ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwuid (uid_t); |
160 | | | 160 | |
161 | #define rk_getpwnam_r(_n, _pw, _b, _sz, _pwd) getpwnam_r(_n, _pw, _b, _sz, _pwd) | | 161 | #define rk_getpwnam_r(_n, _pw, _b, _sz, _pwd) getpwnam_r(_n, _pw, _b, _sz, _pwd) |
162 | | | 162 | |
163 | ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL get_default_username (void); | | 163 | ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL get_default_username (void); |
164 | | | 164 | |
165 | | | 165 | |
166 | | | 166 | |
167 | | | 167 | |
168 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL mkstemp(char *); | | 168 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL mkstemp(char *); |
169 | | | 169 | |
170 | | | 170 | |
171 | | | 171 | |
172 | | | 172 | |
173 | #define rk_rename(__rk_rn_from,__rk_rn_to) rename(__rk_rn_from,__rk_rn_to) | | 173 | #define rk_rename(__rk_rn_from,__rk_rn_to) rename(__rk_rn_from,__rk_rn_to) |
174 | | | 174 | |
175 | #define rk_mkdir(__rk_rn_name, __rk_rn_mode) mkdir(__rk_rn_name,__rk_rn_mode) | | 175 | #define rk_mkdir(__rk_rn_name, __rk_rn_mode) mkdir(__rk_rn_name,__rk_rn_mode) |
176 | | | 176 | |
177 | | | 177 | |
178 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL daemon(int, int); | | 178 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL daemon(int, int); |
179 | | | 179 | |
180 | | | 180 | |
181 | | | 181 | |
182 | | | 182 | |
183 | | | 183 | |
184 | | | 184 | |
185 | | | 185 | |
186 | | | 186 | |
187 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_pidfile (const char*); | | 187 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_pidfile (const char*); |
188 | | | 188 | |
189 | | | 189 | |
190 | | | 190 | |
191 | | | 191 | |
192 | | | 192 | |
193 | | | 193 | |
194 | ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL tm2time (struct tm, int); | | 194 | ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL tm2time (struct tm, int); |
195 | | | 195 | |
196 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL unix_verify_user(char *, char *); | | 196 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL unix_verify_user(char *, char *); |
197 | | | 197 | |
198 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_concat (char *, size_t, ...); | | 198 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_concat (char *, size_t, ...); |
199 | | | 199 | |
200 | ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL roken_mconcat (char **, size_t, ...); | | 200 | ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL roken_mconcat (char **, size_t, ...); |
201 | | | 201 | |
202 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_vconcat (char *, size_t, va_list); | | 202 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_vconcat (char *, size_t, va_list); |
203 | | | 203 | |
204 | ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL | | 204 | ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL |
205 | roken_vmconcat (char **, size_t, va_list); | | 205 | roken_vmconcat (char **, size_t, va_list); |
206 | | | 206 | |
207 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL roken_detach_prep(int, char **, char *); | | 207 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL roken_detach_prep(int, char **, char *); |
208 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL roken_detach_finish(const char *, int); | | 208 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL roken_detach_finish(const char *, int); |
209 | | | 209 | |
210 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL | | 210 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL |
211 | net_write (rk_socket_t, const void *, size_t); | | 211 | net_write (rk_socket_t, const void *, size_t); |
212 | | | 212 | |
213 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL | | 213 | ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL |
214 | net_read (rk_socket_t, void *, size_t); | | 214 | net_read (rk_socket_t, void *, size_t); |
215 | | | 215 | |
216 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 216 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
217 | issuid(void); | | 217 | issuid(void); |
218 | | | 218 | |
219 | | | 219 | |
220 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL get_window_size(int fd, int *, int *); | | 220 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL get_window_size(int fd, int *, int *); |
221 | | | 221 | |
222 | | | 222 | |
223 | | | 223 | |
224 | | | 224 | |
225 | #define getipnodebyname rk_getipnodebyname | | 225 | #define getipnodebyname rk_getipnodebyname |
226 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL | | 226 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL |
227 | getipnodebyname (const char *, int, int, int *); | | 227 | getipnodebyname (const char *, int, int, int *); |
228 | | | 228 | |
229 | #define getipnodebyaddr rk_getipnodebyaddr | | 229 | #define getipnodebyaddr rk_getipnodebyaddr |
230 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL | | 230 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL |
231 | getipnodebyaddr (const void *, size_t, int, int *); | | 231 | getipnodebyaddr (const void *, size_t, int, int *); |
232 | | | 232 | |
233 | #define freehostent rk_freehostent | | 233 | #define freehostent rk_freehostent |
234 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL | | 234 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL |
235 | freehostent (struct hostent *); | | 235 | freehostent (struct hostent *); |
236 | | | 236 | |
237 | #define copyhostent rk_copyhostent | | 237 | #define copyhostent rk_copyhostent |
238 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL | | 238 | ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL |
239 | copyhostent (const struct hostent *); | | 239 | copyhostent (const struct hostent *); |
240 | | | 240 | |
241 | | | 241 | |
242 | | | 242 | |
243 | | | 243 | |
244 | | | 244 | |
245 | | | 245 | |
246 | | | 246 | |
247 | | | 247 | |
248 | | | 248 | |
249 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 249 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
250 | getnameinfo_verified(const struct sockaddr *, socklen_t, | | 250 | getnameinfo_verified(const struct sockaddr *, socklen_t, |
251 | char *, size_t, | | 251 | char *, size_t, |
252 | char *, size_t, | | 252 | char *, size_t, |
253 | int); | | 253 | int); |
254 | | | 254 | |
255 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 255 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
256 | roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **); | | 256 | roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **); |
257 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 257 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
258 | roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **); | | 258 | roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **); |
259 | | | 259 | |
260 | | | 260 | |
261 | | | 261 | |
262 | | | 262 | |
263 | #define emalloc rk_emalloc | | 263 | #define emalloc rk_emalloc |
264 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL emalloc (size_t); | | 264 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL emalloc (size_t); |
265 | #define ecalloc rk_ecalloc | | 265 | #define ecalloc rk_ecalloc |
266 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL ecalloc(size_t, size_t); | | 266 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL ecalloc(size_t, size_t); |
267 | #define erealloc rk_erealloc | | 267 | #define erealloc rk_erealloc |
268 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL erealloc (void *, size_t); | | 268 | ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL erealloc (void *, size_t); |
269 | #define estrdup rk_estrdup | | 269 | #define estrdup rk_estrdup |
270 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL estrdup (const char *); | | 270 | ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL estrdup (const char *); |
271 | | | 271 | |
272 | /* | | 272 | /* |
273 | * kludges and such | | 273 | * kludges and such |
274 | */ | | 274 | */ |
275 | | | 275 | |
276 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL | | 276 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
277 | roken_gethostby_setup(const char*, const char*); | | 277 | roken_gethostby_setup(const char*, const char*); |
278 | ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL | | 278 | ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL |
279 | roken_gethostbyname(const char*); | | 279 | roken_gethostbyname(const char*); |
280 | ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL | | 280 | ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL |
281 | roken_gethostbyaddr(const void*, size_t, int); | | 281 | roken_gethostbyaddr(const void*, size_t, int); |
282 | | | 282 | |
283 | #define roken_getservbyname(x,y) getservbyname(x,y) | | 283 | #define roken_getservbyname(x,y) getservbyname(x,y) |
284 | | | 284 | |
285 | #define roken_openlog(a,b,c) openlog(a,b,c) | | 285 | #define roken_openlog(a,b,c) openlog(a,b,c) |
286 | | | 286 | |
287 | #define roken_getsockname(a,b,c) getsockname(a,b,c) | | 287 | #define roken_getsockname(a,b,c) getsockname(a,b,c) |
288 | | | 288 | |
289 | | | 289 | |
290 | | | 290 | |
291 | | | 291 | |
292 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL | | 292 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL |
293 | mini_inetd_addrinfo (struct addrinfo*, rk_socket_t *); | | 293 | mini_inetd_addrinfo (struct addrinfo*, rk_socket_t *); |
294 | | | 294 | |
295 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL | | 295 | ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL |
296 | mini_inetd (int, rk_socket_t *); | | 296 | mini_inetd (int, rk_socket_t *); |
297 | | | 297 | |
298 | | | 298 | |
299 | | | 299 | |
300 | | | 300 | |
301 | | | 301 | |
302 | | | 302 | |
303 | | | 303 | |
304 | | | 304 | |
305 | | | 305 | |
306 | | | 306 | |
307 | | | 307 | |
308 | | | 308 | |
309 | | | 309 | |
310 | | | 310 | |
311 | | | 311 | |
312 | #define memset_s rk_memset_s | | 312 | #define memset_s rk_memset_s |
313 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL memset_s(void *s, size_t smax, | | 313 | ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL memset_s(void *s, size_t smax, |
314 | int c, size_t n); | | 314 | int c, size_t n); |
315 | | | 315 | |
316 | # define rk_random() arc4random() | | 316 | # define rk_random() arc4random() |
317 | | | 317 | |
318 | | | 318 | |
319 | | | 319 | |
320 | /* Microsoft VC 2010 POSIX definitions */ | | 320 | /* Microsoft VC 2010 POSIX definitions */ |
321 | | | 321 | |
322 | | | 322 | |
323 | | | 323 | |
324 | ROKEN_CPP_END | | 324 | ROKEN_CPP_END |
325 | | | 325 | |
326 | #endif /* __ROKEN_H__ */ | | 326 | #endif /* __ROKEN_H__ */ |