3 * Copyright (C) 2008-2009 Jürg Billeter
4 * Copyright (C) 2010 Marco Trevisan (Treviño)
5 * Copyright (C) 2013 Nikolay Orliuk
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 * Jürg Billeter <j@bitron.ch>
23 * Marco Trevisan (Treviño) <mail@3v1n0.net>
24 * Nikolay Orliuk <virkony@gmail.com>
27 [CCode (cprefix = "", lower_case_cprefix = "")]
29 [CCode (cheader_filename = "assert.h")]
30 public void assert (bool expression);
32 [CCode (cheader_filename = "ctype.h")]
33 public bool isalnum (int c);
34 [CCode (cheader_filename = "ctype.h")]
35 public bool isalpha (int c);
36 [CCode (cheader_filename = "ctype.h")]
37 public bool isascii (int c);
38 [CCode (cheader_filename = "ctype.h")]
39 public bool iscntrl (int c);
40 [CCode (cheader_filename = "ctype.h")]
41 public bool isdigit (int c);
42 [CCode (cheader_filename = "ctype.h")]
43 public bool isgraph (int c);
44 [CCode (cheader_filename = "ctype.h")]
45 public bool islower (int c);
46 [CCode (cheader_filename = "ctype.h")]
47 public bool isprint (int c);
48 [CCode (cheader_filename = "ctype.h")]
49 public bool ispunct (int c);
50 [CCode (cheader_filename = "ctype.h")]
51 public bool isspace (int c);
52 [CCode (cheader_filename = "ctype.h")]
53 public bool isupper (int c);
54 [CCode (cheader_filename = "ctype.h")]
55 public bool isxdigit (int c);
56 [CCode (cheader_filename = "ctype.h")]
57 public int toascii (int c);
58 [CCode (cheader_filename = "ctype.h")]
59 public int tolower (int c);
60 [CCode (cheader_filename = "ctype.h")]
61 public int toupper (int c);
64 [CCode (cname = "struct dirent", cheader_filename = "dirent.h")]
68 public ushort d_reclen;
70 public char d_name[256];
74 [CCode (cname = "DIR", free_function = "closedir", cheader_filename = "dirent.h")]
78 [CCode (cheader_filename = "dirent.h")]
79 public int dirfd (Dir dir);
80 [CCode (cheader_filename = "dirent.h")]
81 public Dir? opendir (string filename);
82 [CCode (cheader_filename = "dirent.h")]
83 public Dir? fdopendir (int fd);
84 [CCode (cheader_filename = "dirent.h")]
85 public unowned DirEnt? readdir (Dir dir);
86 [CCode (cheader_filename = "dirent.h")]
87 public void rewinddir (Dir dir);
88 [CCode (cheader_filename = "dirent.h")]
89 public void seekdir (Dir dir, long pos);
90 [CCode (cheader_filename = "dirent.h")]
91 public long telldir (Dir dir);
93 [CCode (cheader_filename = "errno.h")]
95 [CCode (cheader_filename = "errno.h")]
96 public const int E2BIG;
97 [CCode (cheader_filename = "errno.h")]
98 public const int EACCES;
99 [CCode (cheader_filename = "errno.h")]
100 public const int EADDRINUSE;
101 [CCode (cheader_filename = "errno.h")]
102 public const int EADDRNOTAVAIL;
103 [CCode (cheader_filename = "errno.h")]
104 public const int EAFNOSUPPORT;
105 [CCode (cheader_filename = "errno.h")]
106 public const int EAGAIN;
107 [CCode (cheader_filename = "errno.h")]
108 public const int EALREADY;
109 [CCode (cheader_filename = "errno.h")]
110 public const int EBADF;
111 [CCode (cheader_filename = "errno.h")]
112 public const int EBADMSG;
113 [CCode (cheader_filename = "errno.h")]
114 public const int EBUSY;
115 [CCode (cheader_filename = "errno.h")]
116 public const int ECANCELED;
117 [CCode (cheader_filename = "errno.h")]
118 public const int ECHILD;
119 [CCode (cheader_filename = "errno.h")]
120 public const int ECONNABORTED;
121 [CCode (cheader_filename = "errno.h")]
122 public const int ECONNREFUSED;
123 [CCode (cheader_filename = "errno.h")]
124 public const int ECONNRESET;
125 [CCode (cheader_filename = "errno.h")]
126 public const int EDEADLK;
127 [CCode (cheader_filename = "errno.h")]
128 public const int EDESTADDRREQ;
129 [CCode (cheader_filename = "errno.h")]
130 public const int EDOM;
131 [CCode (cheader_filename = "errno.h")]
132 public const int EDQUOT;
133 [CCode (cheader_filename = "errno.h")]
134 public const int EEXIST;
135 [CCode (cheader_filename = "errno.h")]
136 public const int EFAULT;
137 [CCode (cheader_filename = "errno.h")]
138 public const int EFBIG;
139 [CCode (cheader_filename = "errno.h")]
140 public const int EHOSTUNREACH;
141 [CCode (cheader_filename = "errno.h")]
142 public const int EIDRM;
143 [CCode (cheader_filename = "errno.h")]
144 public const int EILSEQ;
145 [CCode (cheader_filename = "errno.h")]
146 public const int EINPROGRESS;
147 [CCode (cheader_filename = "errno.h")]
148 public const int EINTR;
149 [CCode (cheader_filename = "errno.h")]
150 public const int EINVAL;
151 [CCode (cheader_filename = "errno.h")]
152 public const int EIO;
153 [CCode (cheader_filename = "errno.h")]
154 public const int EISCONN;
155 [CCode (cheader_filename = "errno.h")]
156 public const int EISDIR;
157 [CCode (cheader_filename = "errno.h")]
158 public const int ELOOP;
159 [CCode (cheader_filename = "errno.h")]
160 public const int EMFILE;
161 [CCode (cheader_filename = "errno.h")]
162 public const int EMLINK;
163 [CCode (cheader_filename = "errno.h")]
164 public const int EMSGSIZE;
165 [CCode (cheader_filename = "errno.h")]
166 public const int EMULTIHOP;
167 [CCode (cheader_filename = "errno.h")]
168 public const int ENAMETOOLONG;
169 [CCode (cheader_filename = "errno.h")]
170 public const int ENETDOWN;
171 [CCode (cheader_filename = "errno.h")]
172 public const int ENETRESET;
173 [CCode (cheader_filename = "errno.h")]
174 public const int ENETUNREACH;
175 [CCode (cheader_filename = "errno.h")]
176 public const int ENFILE;
177 [CCode (cheader_filename = "errno.h")]
178 public const int ENOBUFS;
179 [CCode (cheader_filename = "errno.h")]
180 public const int ENODATA;
181 [CCode (cheader_filename = "errno.h")]
182 public const int ENODEV;
183 [CCode (cheader_filename = "errno.h")]
184 public const int ENOENT;
185 [CCode (cheader_filename = "errno.h")]
186 public const int ENOEXEC;
187 [CCode (cheader_filename = "errno.h")]
188 public const int ENOLCK;
189 [CCode (cheader_filename = "errno.h")]
190 public const int ENOLINK;
191 [CCode (cheader_filename = "errno.h")]
192 public const int ENOMEM;
193 [CCode (cheader_filename = "errno.h")]
194 public const int ENOMSG;
195 [CCode (cheader_filename = "errno.h")]
196 public const int ENOPROTOOPT;
197 [CCode (cheader_filename = "errno.h")]
198 public const int ENOSPC;
199 [CCode (cheader_filename = "errno.h")]
200 public const int ENOSR;
201 [CCode (cheader_filename = "errno.h")]
202 public const int ENOSTR;
203 [CCode (cheader_filename = "errno.h")]
204 public const int ENOSYS;
205 [CCode (cheader_filename = "errno.h")]
206 public const int ENOTCONN;
207 [CCode (cheader_filename = "errno.h")]
208 public const int ENOTDIR;
209 [CCode (cheader_filename = "errno.h")]
210 public const int ENOTEMPTY;
211 [CCode (cheader_filename = "errno.h")]
212 public const int ENOTSOCK;
213 [CCode (cheader_filename = "errno.h")]
214 public const int ENOTSUP;
215 [CCode (cheader_filename = "errno.h")]
216 public const int ENOTTY;
217 [CCode (cheader_filename = "errno.h")]
218 public const int ENXIO;
219 [CCode (cheader_filename = "errno.h")]
220 public const int EOPNOTSUPP;
221 [CCode (cheader_filename = "errno.h")]
222 public const int EOVERFLOW;
223 [CCode (cheader_filename = "errno.h")]
224 public const int EPERM;
225 [CCode (cheader_filename = "errno.h")]
226 public const int EPIPE;
227 [CCode (cheader_filename = "errno.h")]
228 public const int EPROTO;
229 [CCode (cheader_filename = "errno.h")]
230 public const int EPROTONOSUPPORT;
231 [CCode (cheader_filename = "errno.h")]
232 public const int EPROTOTYPE;
233 [CCode (cheader_filename = "errno.h")]
234 public const int ERANGE;
235 [CCode (cheader_filename = "errno.h")]
236 public const int EROFS;
237 [CCode (cheader_filename = "errno.h")]
238 public const int ESPIPE;
239 [CCode (cheader_filename = "errno.h")]
240 public const int ESRCH;
241 [CCode (cheader_filename = "errno.h")]
242 public const int ESTALE;
243 [CCode (cheader_filename = "errno.h")]
244 public const int ETIME;
245 [CCode (cheader_filename = "errno.h")]
246 public const int ETIMEDOUT;
247 [CCode (cheader_filename = "errno.h")]
248 public const int ETXTBSY;
249 [CCode (cheader_filename = "errno.h")]
250 public const int EWOULDBLOCK;
251 [CCode (cheader_filename = "errno.h")]
252 public const int EXDEV;
254 [CCode (cheader_filename = "fcntl.h")]
255 public const int F_DUPFD;
256 [CCode (cheader_filename = "fcntl.h")]
257 public const int F_GETFD;
258 [CCode (cheader_filename = "fcntl.h")]
259 public const int F_SETFD;
260 [CCode (cheader_filename = "fcntl.h")]
261 public const int F_GETFL;
262 [CCode (cheader_filename = "fcntl.h")]
263 public const int F_SETFL;
264 [CCode (cheader_filename = "fcntl.h")]
265 public const int F_GETLK;
266 [CCode (cheader_filename = "fcntl.h")]
267 public const int F_SETLK;
268 [CCode (cheader_filename = "fcntl.h")]
269 public const int F_SETLKW;
270 [CCode (cheader_filename = "fcntl.h")]
271 public const int F_GETOWN;
272 [CCode (cheader_filename = "fcntl.h")]
273 public const int F_SETOWN;
274 [CCode (cheader_filename = "fcntl.h")]
275 public const int FD_CLOEXEC;
276 [CCode (cheader_filename = "fcntl.h")]
277 public const int F_RDLCK;
278 [CCode (cheader_filename = "fcntl.h")]
279 public const int F_UNLCK;
280 [CCode (cheader_filename = "fcntl.h")]
281 public const int F_WRLCK;
282 [CCode (cheader_filename = "fcntl.h")]
283 public const int O_CREAT;
284 [CCode (cheader_filename = "fcntl.h")]
285 public const int O_EXCL;
286 [CCode (cheader_filename = "fcntl.h")]
287 public const int O_NOCTTY;
288 [CCode (cheader_filename = "fcntl.h")]
289 public const int O_TRUNC;
290 [CCode (cheader_filename = "fcntl.h")]
291 public const int O_APPEND;
292 [CCode (cheader_filename = "fcntl.h")]
293 public const int O_DSYNC;
294 [CCode (cheader_filename = "fcntl.h")]
295 public const int O_NONBLOCK;
296 [CCode (cheader_filename = "fcntl.h")]
297 public const int O_RSYNC;
298 [CCode (cheader_filename = "fcntl.h")]
299 public const int O_SYNC;
300 [CCode (cheader_filename = "fcntl.h")]
301 public const int O_ACCMODE;
302 [CCode (cheader_filename = "fcntl.h")]
303 public const int O_RDONLY;
304 [CCode (cheader_filename = "fcntl.h")]
305 public const int O_RDWR;
306 [CCode (cheader_filename = "fcntl.h")]
307 public const int O_WRONLY;
308 [CCode (cheader_filename = "fcntl.h")]
309 public const int POSIX_FADV_NORMAL;
310 [CCode (cheader_filename = "fcntl.h")]
311 public const int POSIX_FADV_SEQUENTIAL;
312 [CCode (cheader_filename = "fcntl.h")]
313 public const int POSIX_FADV_RANDOM;
314 [CCode (cheader_filename = "fcntl.h")]
315 public const int POSIX_FADV_WILLNEED;
316 [CCode (cheader_filename = "fcntl.h")]
317 public const int POSIX_FADV_DONTNEED;
318 [CCode (cheader_filename = "fcntl.h")]
319 public const int POSIX_FADV_NOREUSE;
320 [CCode (cheader_filename = "fcntl.h")]
321 public int creat (string path, mode_t mode);
322 [CCode (cheader_filename = "fcntl.h")]
323 public int fcntl (int fd, int cmd, ...);
324 [CCode (cheader_filename = "fcntl.h")]
325 public int open (string path, int oflag, mode_t mode=0);
326 [CCode (cheader_filename = "fcntl.h")]
327 public int posix_fadvise (int fd, long offset, long len, int advice);
328 [CCode (cheader_filename = "fcntl.h")]
329 public int posix_fallocate (int fd, long offset, long len);
331 [CCode (cname = "struct flock", cheader_filename = "fcntl.h", has_type_id = false)]
332 public struct Flock {
335 public off_t l_start;
341 [CCode (cname = "struct group", cheader_filename = "grp.h")]
343 public string gr_name;
344 public string gr_passwd;
346 [CCode (array_length = false, array_null_terminated = true)]
347 public string[] gr_mem;
349 [CCode (cheader_filename = "grp.h")]
350 public void endgrent ();
351 public unowned Group? getgrent ();
352 public void setgrent ();
353 [CCode (cheader_filename = "grp.h")]
354 public unowned Group? getgrgid (gid_t gid);
355 [CCode (cheader_filename = "grp.h")]
356 public unowned Group? getgrnam (string name);
358 [CCode (cheader_filename = "netinet/in.h")]
359 public const int INET_ADDRSTRLEN;
360 [CCode (cheader_filename = "netinet/in.h")]
361 public const int INET6_ADDRSTRLEN;
363 [CCode (cheader_filename = "netinet/in.h", cname = "int", cprefix = "IPPROTO_", has_type_id = false)]
364 public enum IPProto {
391 [CCode (cheader_filename = "netinet/tcp.h")]
392 public const int TCP_NODELAY;
393 [CCode (cheader_filename = "netinet/tcp.h")]
394 public const int TCP_MAXSEG;
395 [CCode (cheader_filename = "netinet/tcp.h")]
396 public const int TCP_CORK;
397 [CCode (cheader_filename = "netinet/tcp.h")]
398 public const int TCP_KEEPIDLE;
399 [CCode (cheader_filename = "netinet/tcp.h")]
400 public const int TCP_KEEPINTVL;
401 [CCode (cheader_filename = "netinet/tcp.h")]
402 public const int TCP_KEEPCNT;
403 [CCode (cheader_filename = "netinet/tcp.h")]
404 public const int TCP_SYNCNT;
405 [CCode (cheader_filename = "netinet/tcp.h")]
406 public const int TCP_LINGER2;
407 [CCode (cheader_filename = "netinet/tcp.h")]
408 public const int TCP_DEFER_ACCEPT;
409 [CCode (cheader_filename = "netinet/tcp.h")]
410 public const int TCP_WINDOW_CLAMP;
411 [CCode (cheader_filename = "netinet/tcp.h")]
412 public const int TCP_INFO;
413 [CCode (cheader_filename = "netinet/tcp.h")]
414 public const int TCP_QUICKACK;
415 [CCode (cheader_filename = "netinet/tcp.h")]
416 public const int TCP_CONGESTION;
417 [CCode (cheader_filename = "netinet/tcp.h")]
418 public const int TCP_MD5SIG;
419 [CCode (cheader_filename = "netinet/tcp.h")]
420 public const int TCP_COOKIE_TRANSACTIONS;
421 [CCode (cheader_filename = "netinet/tcp.h")]
422 public const int TCP_THIN_LINEAR_TIMEOUTS;
423 [CCode (cheader_filename = "netinet/tcp.h")]
424 public const int TCP_THIN_DUPACK;
425 [CCode (cheader_filename = "netinet/tcp.h")]
426 public const int TCP_USER_TIMEOUT;
427 [CCode (cheader_filename = "netinet/tcp.h")]
428 public const int TCP_REPAIR;
429 [CCode (cheader_filename = "netinet/tcp.h")]
430 public const int TCP_REPAIR_QUEUE;
431 [CCode (cheader_filename = "netinet/tcp.h")]
432 public const int TCP_QUEUE_SEQ;
433 [CCode (cheader_filename = "netinet/tcp.h")]
434 public const int TCP_REPAIR_OPTIONS;
435 [CCode (cheader_filename = "netinet/tcp.h")]
436 public const int TCP_FASTOPEN;
437 [CCode (cheader_filename = "netinet/tcp.h")]
438 public const int TCP_TIMESTAMP;
440 [CCode (cheader_filename = "arpa/inet.h")]
441 public uint32 inet_addr (string host);
442 [CCode (cheader_filename = "arpa/inet.h")]
443 public unowned string inet_ntoa (InAddr addr);
444 [CCode (cheader_filename = "arpa/inet.h")]
445 public unowned string? inet_ntop (int af, void* src, uint8[] dst);
446 [CCode (cheader_filename = "arpa/inet.h")]
447 public int inet_pton (int af, string src, void* dst);
448 [CCode (cheader_filename = "arpa/inet.h")]
449 public uint32 htonl (uint32 hostlong);
450 [CCode (cheader_filename = "arpa/inet.h")]
451 public uint32 ntohl (uint32 netlong);
452 [CCode (cheader_filename = "arpa/inet.h")]
453 public uint16 htons (uint16 hostshort);
454 [CCode (cheader_filename = "arpa/inet.h")]
455 public uint16 ntohs (uint16 netshort);
457 [CCode (cheader_filename = "math.h")]
458 public double acos (double x);
459 [CCode (cheader_filename = "math.h")]
460 public float acosf (float x);
461 [CCode (cheader_filename = "math.h")]
462 public double asin (double x);
463 [CCode (cheader_filename = "math.h")]
464 public float asinf (float x);
465 [CCode (cheader_filename = "math.h")]
466 public double atan (double x);
467 [CCode (cheader_filename = "math.h")]
468 public float atanf (float x);
469 [CCode (cheader_filename = "math.h")]
470 public double atan2 (double y, double x);
471 [CCode (cheader_filename = "math.h")]
472 public float atan2f (float y, float x);
473 [CCode (cheader_filename = "math.h")]
474 public double cos (double x);
475 [CCode (cheader_filename = "math.h")]
476 public float cosf (float x);
477 [CCode (cheader_filename = "math.h")]
478 public double sin (double x);
479 [CCode (cheader_filename = "math.h")]
480 public float sinf (float x);
481 [CCode (cheader_filename = "math.h")]
482 public double tan (double x);
483 [CCode (cheader_filename = "math.h")]
484 public float tanf (float x);
485 [CCode (cheader_filename = "math.h")]
486 public double cosh (double x);
487 [CCode (cheader_filename = "math.h")]
488 public float coshf (float x);
489 [CCode (cheader_filename = "math.h")]
490 public double sinh (double x);
491 [CCode (cheader_filename = "math.h")]
492 public float sinhf (float x);
493 [CCode (cheader_filename = "math.h")]
494 public double tanh (double x);
495 [CCode (cheader_filename = "math.h")]
496 public float tanhf (float x);
497 [CCode (cheader_filename = "math.h")]
498 public void sincos (double x, out double sinx, out double cosx);
499 [CCode (cheader_filename = "math.h")]
500 public void sincosf (float x, out float sinx, out float cosx);
501 [CCode (cheader_filename = "math.h")]
502 public double acosh (double x);
503 [CCode (cheader_filename = "math.h")]
504 public float acoshf (float x);
505 [CCode (cheader_filename = "math.h")]
506 public double asinh (double x);
507 [CCode (cheader_filename = "math.h")]
508 public float asinhf (float x);
509 [CCode (cheader_filename = "math.h")]
510 public double atanh (double x);
511 [CCode (cheader_filename = "math.h")]
512 public float atanhf (float x);
513 [CCode (cheader_filename = "math.h")]
514 public double exp (double x);
515 [CCode (cheader_filename = "math.h")]
516 public float expf (float x);
517 [CCode (cheader_filename = "math.h")]
518 public double frexp (double x, out int exponent);
519 [CCode (cheader_filename = "math.h")]
520 public float frexpf (float x, out int exponent);
521 [CCode (cheader_filename = "math.h")]
522 public double ldexp (double x, int exponent);
523 [CCode (cheader_filename = "math.h")]
524 public float ldexpf (float x, int exponent);
525 [CCode (cheader_filename = "math.h")]
526 public double log (double x);
527 [CCode (cheader_filename = "math.h")]
528 public float logf (float x);
529 [CCode (cheader_filename = "math.h")]
530 public double log10 (double x);
531 [CCode (cheader_filename = "math.h")]
532 public float log10f (float x);
533 [CCode (cheader_filename = "math.h")]
534 public double modf (double x, out double iptr);
535 [CCode (cheader_filename = "math.h")]
536 public float modff (float x, out float iptr);
537 [CCode (cheader_filename = "math.h")]
538 public double exp10 (double x);
539 [CCode (cheader_filename = "math.h")]
540 public float exp10f (float x);
541 [CCode (cheader_filename = "math.h")]
542 public double pow10 (double x);
543 [CCode (cheader_filename = "math.h")]
544 public float pow10f (float x);
545 [CCode (cheader_filename = "math.h")]
546 public double expm1 (double x);
547 [CCode (cheader_filename = "math.h")]
548 public float expm1f (float x);
549 [CCode (cheader_filename = "math.h")]
550 public double log1p (double x);
551 [CCode (cheader_filename = "math.h")]
552 public float log1pf (float x);
553 [CCode (cheader_filename = "math.h")]
554 public double logb (double x);
555 [CCode (cheader_filename = "math.h")]
556 public float logbf (float x);
557 [CCode (cheader_filename = "math.h")]
558 public double exp2 (double x);
559 [CCode (cheader_filename = "math.h")]
560 public float exp2f (float x);
561 [CCode (cheader_filename = "math.h")]
562 public double log2 (double x);
563 [CCode (cheader_filename = "math.h")]
564 public float log2f (float x);
565 [CCode (cheader_filename = "math.h")]
566 public double pow (double x, double y);
567 [CCode (cheader_filename = "math.h")]
568 public float powf (float x, float y);
569 [CCode (cheader_filename = "math.h")]
570 public double sqrt (double x);
571 [CCode (cheader_filename = "math.h")]
572 public float sqrtf (float x);
573 [CCode (cheader_filename = "math.h")]
574 public double hypot (double x, double y);
575 [CCode (cheader_filename = "math.h")]
576 public float hypotf (float x, float y);
577 [CCode (cheader_filename = "math.h")]
578 public double cbrt (double x);
579 [CCode (cheader_filename = "math.h")]
580 public float cbrtf (float x);
581 [CCode (cheader_filename = "math.h")]
582 public double ceil (double x);
583 [CCode (cheader_filename = "math.h")]
584 public float ceilf (float x);
585 [CCode (cheader_filename = "math.h")]
586 public double fabs (double x);
587 [CCode (cheader_filename = "math.h")]
588 public float fabsf (float x);
589 [CCode (cheader_filename = "math.h")]
590 public double floor (double x);
591 [CCode (cheader_filename = "math.h")]
592 public float floorf (float x);
593 [CCode (cheader_filename = "math.h")]
594 public double fmod (double x, double y);
595 [CCode (cheader_filename = "math.h")]
596 public float fmodf (float x, float y);
597 [CCode (cheader_filename = "math.h")]
598 public int isinf (double value);
599 [CCode (cheader_filename = "math.h")]
600 public int isinff (float value);
601 [CCode (cheader_filename = "math.h")]
602 public int finite (double value);
603 [CCode (cheader_filename = "math.h")]
604 public int finitef (float value);
605 [CCode (cheader_filename = "math.h")]
606 public double drem (double x, double y);
607 [CCode (cheader_filename = "math.h")]
608 public float dremf (float x, float y);
609 [CCode (cheader_filename = "math.h")]
610 public double significand (double x);
611 [CCode (cheader_filename = "math.h")]
612 public float significandf (float x);
613 [CCode (cheader_filename = "math.h")]
614 public double copysign (double x, double y);
615 [CCode (cheader_filename = "math.h")]
616 public float copysignf (float x, float y);
617 [CCode (cheader_filename = "math.h")]
618 public double nan (string tagb);
619 [CCode (cheader_filename = "math.h")]
620 public float nanf (string tagb);
621 [CCode (cheader_filename = "math.h")]
622 public int isnan (double value);
623 [CCode (cheader_filename = "math.h")]
624 public int isnanf (float value);
625 [CCode (cheader_filename = "math.h")]
626 public double j0 (double x0);
627 [CCode (cheader_filename = "math.h")]
628 public float j0f (float x0);
629 [CCode (cheader_filename = "math.h")]
630 public double j1 (double x0);
631 [CCode (cheader_filename = "math.h")]
632 public float j1f (float x0);
633 [CCode (cheader_filename = "math.h")]
634 public double jn (int x0, double x1);
635 [CCode (cheader_filename = "math.h")]
636 public float jnf (int x0, float x1);
637 [CCode (cheader_filename = "math.h")]
638 public double y0 (double x0);
639 [CCode (cheader_filename = "math.h")]
640 public float y0f (float x0);
641 [CCode (cheader_filename = "math.h")]
642 public double y1 (double x0);
643 [CCode (cheader_filename = "math.h")]
644 public float y1f (float x0);
645 [CCode (cheader_filename = "math.h")]
646 public double yn (int x0, double x1);
647 [CCode (cheader_filename = "math.h")]
648 public float ynf (int x0, float x1);
649 [CCode (cheader_filename = "math.h")]
650 public double erf (double x0);
651 [CCode (cheader_filename = "math.h")]
652 public float erff (float x0);
653 [CCode (cheader_filename = "math.h")]
654 public double erfc (double x0);
655 [CCode (cheader_filename = "math.h")]
656 public float erfcf (float x0);
657 [CCode (cheader_filename = "math.h")]
658 public double lgamma (double x0);
659 [CCode (cheader_filename = "math.h")]
660 public float lgammaf (float x0);
661 [CCode (cheader_filename = "math.h")]
662 public double tgamma (double x0);
663 [CCode (cheader_filename = "math.h")]
664 public float tgammaf (float x0);
665 [CCode (cheader_filename = "math.h")]
666 public double gamma (double x0);
667 [CCode (cheader_filename = "math.h")]
668 public float gammaf (float x0);
669 [CCode (cheader_filename = "math.h")]
670 public double lgamma_r (double x0, out int signgamp);
671 [CCode (cheader_filename = "math.h")]
672 public float lgamma_rf (float x0, out int signgamp);
673 [CCode (cheader_filename = "math.h")]
674 public double rint (double x);
675 [CCode (cheader_filename = "math.h")]
676 public float rintf (float x);
677 [CCode (cheader_filename = "math.h")]
678 public double nextafter (double x, double y);
679 [CCode (cheader_filename = "math.h")]
680 public float nextafterf (float x, float y);
681 [CCode (cheader_filename = "math.h")]
682 public double nexttoward (double x, double y);
683 [CCode (cheader_filename = "math.h")]
684 public float nexttowardf (float x, double y);
685 [CCode (cheader_filename = "math.h")]
686 public double remainder (double x, double y);
687 [CCode (cheader_filename = "math.h")]
688 public float remainderf (float x, float y);
689 [CCode (cheader_filename = "math.h")]
690 public double scalbn (double x, int n);
691 [CCode (cheader_filename = "math.h")]
692 public float scalbnf (float x, int n);
693 [CCode (cheader_filename = "math.h")]
694 public int ilogb (double x);
695 [CCode (cheader_filename = "math.h")]
696 public int ilogbf (float x);
697 [CCode (cheader_filename = "math.h")]
698 public double scalbln (double x, long n);
699 [CCode (cheader_filename = "math.h")]
700 public float scalblnf (float x, long n);
701 [CCode (cheader_filename = "math.h")]
702 public double nearbyint (double x);
703 [CCode (cheader_filename = "math.h")]
704 public float nearbyintf (float x);
705 [CCode (cheader_filename = "math.h")]
706 public double round (double x);
707 [CCode (cheader_filename = "math.h")]
708 public float roundf (float x);
709 [CCode (cheader_filename = "math.h")]
710 public double trunc (double x);
711 [CCode (cheader_filename = "math.h")]
712 public float truncf (float x);
713 [CCode (cheader_filename = "math.h")]
714 public double remquo (double x, double y, out int quo);
715 [CCode (cheader_filename = "math.h")]
716 public float remquof (float x, float y, out int quo);
717 [CCode (cheader_filename = "math.h")]
718 public long lrint (double x);
719 [CCode (cheader_filename = "math.h")]
720 public long lrintf (float x);
721 [CCode (cheader_filename = "math.h")]
722 public int64 llrint (double x);
723 [CCode (cheader_filename = "math.h")]
724 public int64 llrintf (float x);
725 [CCode (cheader_filename = "math.h")]
726 public long lround (double x);
727 [CCode (cheader_filename = "math.h")]
728 public long lroundf (float x);
729 [CCode (cheader_filename = "math.h")]
730 public int64 llround (double x);
731 [CCode (cheader_filename = "math.h")]
732 public int64 llroundf (float x);
733 [CCode (cheader_filename = "math.h")]
734 public double fdim (double x, double y);
735 [CCode (cheader_filename = "math.h")]
736 public float fdimf (float x, float y);
737 [CCode (cheader_filename = "math.h")]
738 public double fmax (double x, double y);
739 [CCode (cheader_filename = "math.h")]
740 public float fmaxf (float x, float y);
741 [CCode (cheader_filename = "math.h")]
742 public double fmin (double x, double y);
743 [CCode (cheader_filename = "math.h")]
744 public float fminf (float x, float y);
745 [CCode (cheader_filename = "math.h")]
746 public double fma (double x, double y, double z);
747 [CCode (cheader_filename = "math.h")]
748 public float fmaf (float x, float y, float z);
749 [CCode (cheader_filename = "math.h")]
750 public double scalb (double x, double n);
751 [CCode (cheader_filename = "math.h")]
752 public float scalbf (float x, float n);
754 [CCode (cheader_filename = "netdb.h")]
755 public const int NI_NAMEREQD;
756 [CCode (cheader_filename = "netdb.h")]
757 public const int NI_DGRAM;
758 [CCode (cheader_filename = "netdb.h")]
759 public const int NI_NOFQDN;
760 [CCode (cheader_filename = "netdb.h")]
761 public const int NI_NUMERICHOST;
762 [CCode (cheader_filename = "netdb.h")]
763 public const int NI_NUMERICSERV;
765 [CCode (cheader_filename = "netdb.h,sys/socket.h")]
766 public int getnameinfo (SockAddr sa, socklen_t salen, char[] node, char[] service, int flags);
768 [CCode (cheader_filename = "poll.h", cname = "struct pollfd", has_type_id = false)]
769 public struct pollfd {
775 [CCode (cheader_filename = "poll.h")]
776 public const int POLLIN;
777 [CCode (cheader_filename = "poll.h")]
778 public const int POLLPRI;
779 [CCode (cheader_filename = "poll.h")]
780 public const int POLLOUT;
781 [CCode (cheader_filename = "poll.h")]
782 public const int POLLRDHUP;
783 [CCode (cheader_filename = "poll.h")]
784 public const int POLLERR;
785 [CCode (cheader_filename = "poll.h")]
786 public const int POLLHUP;
787 [CCode (cheader_filename = "poll.h")]
788 public const int POLLNVAL;
791 [IntegerType (rank = 9)]
792 [CCode (cheader_filename = "poll.h", cname = "nfds_t", has_type_id = false)]
793 public struct nfds_t {
796 [CCode (cheader_filename = "poll.h")]
797 public int poll (pollfd[] fds, int timeout);
798 [CCode (cheader_filename = "poll.h")]
799 public int ppoll (pollfd[] fds, timespec? timeout, sigset_t? sigmask);
802 [CCode (cname = "struct passwd", cheader_filename = "pwd.h")]
803 public class Passwd {
804 public string pw_name;
805 public string pw_passwd;
808 public string pw_gecos;
809 public string pw_dir;
810 public string pw_shell;
812 [CCode (cheader_filename = "pwd.h")]
813 public void endpwent ();
814 public unowned Passwd? getpwent ();
815 public void setpwent ();
816 [CCode (cheader_filename = "pwd.h")]
817 public unowned Passwd? getpwnam (string name);
818 [CCode (cheader_filename = "pwd.h")]
819 public unowned Passwd? getpwuid (uid_t uid);
821 [CCode (cheader_filename = "sys/resource.h")]
822 public const int PRIO_PROCESS;
823 [CCode (cheader_filename = "sys/resource.h")]
824 public const int PRIO_PGRP;
825 [CCode (cheader_filename = "sys/resource.h")]
826 public const int PRIO_USER;
828 [CCode (cheader_filename = "signal.h")]
829 public const int SIGABRT;
830 [CCode (cheader_filename = "signal.h")]
831 public const int SIGALRM;
832 [CCode (cheader_filename = "signal.h")]
833 public const int SIGBUS;
834 [CCode (cheader_filename = "signal.h")]
835 public const int SIGCHLD;
836 [CCode (cheader_filename = "signal.h")]
837 public const int SIGCONT;
838 [CCode (cheader_filename = "signal.h")]
839 public const int SIGFPE;
840 [CCode (cheader_filename = "signal.h")]
841 public const int SIGHUP;
842 [CCode (cheader_filename = "signal.h")]
843 public const int SIGILL;
844 [CCode (cheader_filename = "signal.h")]
845 public const int SIGINT;
846 [CCode (cheader_filename = "signal.h")]
847 public const int SIGKILL;
848 [CCode (cheader_filename = "signal.h")]
849 public const int SIGPIPE;
850 [CCode (cheader_filename = "signal.h")]
851 public const int SIGQUIT;
852 [CCode (cheader_filename = "signal.h")]
853 public const int SIGSEGV;
854 [CCode (cheader_filename = "signal.h")]
855 public const int SIGSTOP;
856 [CCode (cheader_filename = "signal.h")]
857 public const int SIGTERM;
858 [CCode (cheader_filename = "signal.h")]
859 public const int SIGTSTP;
860 [CCode (cheader_filename = "signal.h")]
861 public const int SIGTTIN;
862 [CCode (cheader_filename = "signal.h")]
863 public const int SIGTTOU;
864 [CCode (cheader_filename = "signal.h")]
865 public const int SIGUSR1;
866 [CCode (cheader_filename = "signal.h")]
867 public const int SIGUSR2;
868 [CCode (cheader_filename = "signal.h")]
869 public const int SIGPOLL;
870 [CCode (cheader_filename = "signal.h")]
871 public const int SIGPROF;
872 [CCode (cheader_filename = "signal.h")]
873 public const int SIGSYS;
874 [CCode (cheader_filename = "signal.h")]
875 public const int SIGTRAP;
876 [CCode (cheader_filename = "signal.h")]
877 public const int SIGURG;
878 [CCode (cheader_filename = "signal.h")]
879 public const int SIGVTALRM;
880 [CCode (cheader_filename = "signal.h")]
881 public const int SIGXCPU;
882 [CCode (cheader_filename = "signal.h")]
883 public const int SIGXFSZ;
884 [CCode (cheader_filename = "signal.h")]
885 public const int SIGIOT;
886 [CCode (cheader_filename = "signal.h")]
887 public const int SIGSTKFLT;
889 [CCode (cheader_filename = "signal.h")]
890 public const int SA_NOCLDSTOP;
891 [CCode (cheader_filename = "signal.h")]
892 public const int SA_NOCLDWAIT;
893 [CCode (cheader_filename = "signal.h")]
894 public const int SA_NODEFER;
895 [CCode (cheader_filename = "signal.h")]
896 public const int SA_ONSTACK;
897 [CCode (cheader_filename = "signal.h")]
898 public const int SA_RESETHAND;
899 [CCode (cheader_filename = "signal.h")]
900 public const int SA_RESTART;
901 [CCode (cheader_filename = "signal.h")]
902 public const int SA_SIGINFO;
903 [CCode (cheader_filename = "signal.h")]
904 public const int SI_USER;
905 [CCode (cheader_filename = "signal.h")]
906 public const int SI_KERNEL;
907 [CCode (cheader_filename = "signal.h")]
908 public const int SI_QUEUE;
909 [CCode (cheader_filename = "signal.h")]
910 public const int SI_TIMER;
911 [CCode (cheader_filename = "signal.h")]
912 public const int SI_MESGQ;
913 [CCode (cheader_filename = "signal.h")]
914 public const int SI_ASYNCIO;
915 [CCode (cheader_filename = "signal.h")]
916 public const int SI_SIGIO;
917 [CCode (cheader_filename = "signal.h")]
918 public const int SI_TKILL;
919 [CCode (cheader_filename = "signal.h")]
920 public const int ILL_ILLOPC;
921 [CCode (cheader_filename = "signal.h")]
922 public const int ILL_ILLOPN;
923 [CCode (cheader_filename = "signal.h")]
924 public const int ILL_ILLADR;
925 [CCode (cheader_filename = "signal.h")]
926 public const int ILL_ILLTRP;
927 [CCode (cheader_filename = "signal.h")]
928 public const int ILL_PRVOPC;
929 [CCode (cheader_filename = "signal.h")]
930 public const int ILL_PRVREG;
931 [CCode (cheader_filename = "signal.h")]
932 public const int ILL_COPROC;
933 [CCode (cheader_filename = "signal.h")]
934 public const int ILL_BADSTK;
935 [CCode (cheader_filename = "signal.h")]
936 public const int FPE_INTDIV;
937 [CCode (cheader_filename = "signal.h")]
938 public const int FPE_INTOVF;
939 [CCode (cheader_filename = "signal.h")]
940 public const int FPE_FLTDIV;
941 [CCode (cheader_filename = "signal.h")]
942 public const int FPE_FLTOVF;
943 [CCode (cheader_filename = "signal.h")]
944 public const int FPE_FLTUND;
945 [CCode (cheader_filename = "signal.h")]
946 public const int FPE_FLTRES;
947 [CCode (cheader_filename = "signal.h")]
948 public const int FPE_FLTINV;
949 [CCode (cheader_filename = "signal.h")]
950 public const int FPE_FLTSUB;
951 [CCode (cheader_filename = "signal.h")]
952 public const int SEGV_MAPERR;
953 [CCode (cheader_filename = "signal.h")]
954 public const int SEGV_ACCERR;
955 [CCode (cheader_filename = "signal.h")]
956 public const int BUS_ADRALN;
957 [CCode (cheader_filename = "signal.h")]
958 public const int BUS_ADRERR;
959 [CCode (cheader_filename = "signal.h")]
960 public const int BUS_OBJERR;
961 [CCode (cheader_filename = "signal.h")]
962 public const int BUS_MCEERR_AR;
963 [CCode (cheader_filename = "signal.h")]
964 public const int BUS_MCEERR_AO;
965 [CCode (cheader_filename = "signal.h")]
966 public const int TRAP_BRKPT;
967 [CCode (cheader_filename = "signal.h")]
968 public const int TRAP_TRACE;
969 [CCode (cheader_filename = "signal.h")]
970 public const int TRAP_BRANCH;
971 [CCode (cheader_filename = "signal.h")]
972 public const int TRAP_HWBKPT;
973 [CCode (cheader_filename = "signal.h")]
974 public const int CLD_EXITED;
975 [CCode (cheader_filename = "signal.h")]
976 public const int CLD_KILLED;
977 [CCode (cheader_filename = "signal.h")]
978 public const int CLD_DUMPED;
979 [CCode (cheader_filename = "signal.h")]
980 public const int CLD_TRAPPED;
981 [CCode (cheader_filename = "signal.h")]
982 public const int CLD_STOPPED;
983 [CCode (cheader_filename = "signal.h")]
984 public const int CLD_CONTINUED;
985 [CCode (cheader_filename = "signal.h")]
986 public const int POLL_IN;
987 [CCode (cheader_filename = "signal.h")]
988 public const int POLL_OUT;
989 [CCode (cheader_filename = "signal.h")]
990 public const int POLL_MSG;
991 [CCode (cheader_filename = "signal.h")]
992 public const int POLL_ERR;
993 [CCode (cheader_filename = "signal.h")]
994 public const int POLL_PRI;
995 [CCode (cheader_filename = "signal.h")]
996 public const int POLL_HUP;
997 [CCode (cheader_filename = "signal.h")]
998 public const int SIG_BLOCK;
999 [CCode (cheader_filename = "signal.h")]
1000 public const int SIG_UNBLOCK;
1001 [CCode (cheader_filename = "signal.h")]
1002 public const int SIG_SETMASK;
1005 [IntegerType (rank = 6)]
1006 [CCode (cname = "pid_t", default_value = "0", cheader_filename = "sys/types.h", has_type_id = false)]
1007 public struct pid_t {
1010 [CCode (cname = "struct sigaction", cheader_filename = "signal.h", has_type_id = false)]
1011 public struct sigaction_t {
1012 sighandler_t sa_handler;
1013 siginfohandler_t sa_sigaction;
1019 [CCode (cname = "sigval_t", cheader_filename = "signal.h", has_type_id = false)]
1020 public struct sigval_t {
1025 [CCode (cname = "siginfo_t", cheader_filename = "signal.h", has_type_id = false)]
1026 public struct siginfo_t {
1047 [CCode (cheader_filename = "signal.h")]
1048 public int kill (pid_t pid, int signum);
1049 [CCode (cheader_filename = "signal.h")]
1050 public int killpg (pid_t pgpr, int signum);
1051 [CCode (cheader_filename = "signal.h")]
1052 public int raise (int signum);
1053 [CCode (cheader_filename = "signal.h")]
1054 public int sigemptyset (sigset_t sigset);
1055 [CCode (cheader_filename = "signal.h")]
1056 public int sigfillset (sigset_t sigset);
1057 [CCode (cheader_filename = "signal.h")]
1058 public int sigaddset (sigset_t sigset, int signo);
1059 [CCode (cheader_filename = "signal.h")]
1060 public int sigdelset (sigset_t sigset, int __signo);
1061 [CCode (cheader_filename = "signal.h")]
1062 public int sigismember (sigset_t sigset, int __signo);
1063 [CCode (cheader_filename = "signal.h")]
1064 public int sigprocmask (int how, sigset_t sigset, sigset_t oset);
1065 [CCode (cheader_filename = "signal.h")]
1066 public int sigqueue (pid_t pid, int signum, sigval_t val);
1067 [CCode (cheader_filename = "signal.h")]
1068 public int sigsuspend (sigset_t sigset);
1069 [CCode (cheader_filename = "signal.h")]
1070 public int sigpending (sigset_t sigset);
1071 [CCode (cheader_filename = "signal.h")]
1072 public int sigwait (sigset_t sigset, out int sig);
1073 [CCode (cheader_filename = "signal.h")]
1074 public int sigaction (int signum, sigaction_t? act, out sigaction_t? oldact);
1076 [CCode (has_target = false, cheader_filename = "signal.h")]
1077 public delegate void sighandler_t (int signal);
1079 [CCode (has_target = false, cheader_filename = "signal.h")]
1080 public delegate void siginfohandler_t (int signal, siginfo_t info, void* data);
1082 [CCode (cheader_filename = "signal.h")]
1083 public sighandler_t SIG_DFL;
1085 [CCode (cheader_filename = "signal.h")]
1086 public sighandler_t SIG_ERR;
1088 [CCode (cheader_filename = "signal.h")]
1089 public sighandler_t SIG_IGN;
1091 [CCode (cheader_filename = "signal.h")]
1092 public sighandler_t signal (int signum, sighandler_t? handler);
1094 [CCode (cheader_filename = "stdio.h")]
1096 public void printf (string format,...);
1098 [CCode (cheader_filename = "stdlib.h")]
1099 public void abort ();
1100 [CCode (cheader_filename = "stdlib.h")]
1101 public void exit (int status);
1103 [CCode (cheader_filename = "stdlib.h")]
1104 public void _exit (int status);
1106 [CCode (has_target = false)]
1107 public delegate void AtExitFunc ();
1109 [CCode (cheader_filename = "stdlib.h")]
1110 public void atexit (AtExitFunc func);
1112 [CCode (cheader_filename = "stdlib.h")]
1113 public int mkstemp (string template);
1115 [CCode (cheader_filename = "stdlib.h")]
1116 public int mkostemp (string template, int flags);
1118 [CCode (cheader_filename = "stdlib.h")]
1119 public string? realpath (string path, [CCode (array_length = false)] uint8[]? resolved_path = null);
1121 [CCode (cheader_filename = "stdlib.h")]
1122 public int posix_openpt (int flags);
1123 [CCode (cheader_filename = "stdlib.h")]
1124 public int grantpt (int fd);
1125 [CCode (cheader_filename = "stdlib.h")]
1126 public int unlockpt (int fd);
1128 [CCode (cheader_filename = "stdlib.h")]
1129 public int system (string command);
1131 [CCode (has_target = false, cheader_filename = "stdlib.h", cname = "__compar_fn_t")]
1132 public delegate int compar_fn_t (void* key1, void* key2);
1134 [CCode (cheader_filename = "stdlib.h")]
1135 public void* bsearch (void* key, void* base, size_t nmemb, size_t size, compar_fn_t func);
1137 [CCode (cheader_filename = "stdlib.h")]
1138 public void qsort (void* base, size_t nmemb, size_t size, compar_fn_t func);
1140 [CCode (cheader_filename = "stdlib.h")]
1141 public void qsort_r (void* base, size_t nmemb, size_t size, compar_fn_t func, void* arg);
1143 [CCode (cheader_filename = "stdlib.h")]
1144 public const int EXIT_FAILURE;
1145 [CCode (cheader_filename = "stdlib.h")]
1146 public const int EXIT_SUCCESS;
1148 [CCode (cheader_filename = "string.h")]
1149 public void* memccpy (void* s1, void* s2, int c, size_t n);
1150 [CCode (cheader_filename = "string.h")]
1151 public void* memchr (void* s, int c, size_t n);
1152 [CCode (cheader_filename = "string.h")]
1153 public int memcmp (void* s1, void* s2, size_t n);
1154 [CCode (cheader_filename = "string.h")]
1155 public void* memcpy (void* s1, void* s2, size_t n);
1156 [CCode (cheader_filename = "string.h")]
1157 public void* memmove (void* s1, void* s2, size_t n);
1158 [CCode (cheader_filename = "string.h")]
1159 public void* memset (void* s, int c, size_t n);
1160 [CCode (cheader_filename = "string.h")]
1161 public unowned string strcat (string s1, string s2);
1162 [CCode (cheader_filename = "string.h")]
1163 public unowned string? strchr (string s, int c);
1164 [CCode (cheader_filename = "string.h")]
1165 public int strcmp (string s1, string s2);
1166 [CCode (cheader_filename = "string.h")]
1167 public int strcoll (string s1, string s2);
1168 [CCode (cheader_filename = "string.h")]
1169 public unowned string strcpy (string s1, string s2);
1170 [CCode (cheader_filename = "string.h")]
1171 public size_t strcspn (string s1, string s2);
1172 [CCode (cheader_filename = "string.h")]
1173 public string strdup (string s1);
1174 [CCode (cheader_filename = "string.h")]
1175 public unowned string strerror (int errnum);
1176 [CCode (cheader_filename = "string.h")]
1177 public int* strerror_r (int errnum, string strerrbuf, size_t buflen);
1178 [CCode (cheader_filename = "string.h")]
1179 public size_t strlen (string s);
1180 [CCode (cheader_filename = "string.h")]
1181 public unowned string strncat (string s1, string s2, size_t n);
1182 [CCode (cheader_filename = "string.h")]
1183 public int strncmp (string s1, string s2, size_t n);
1184 [CCode (cheader_filename = "string.h")]
1185 public unowned string strncpy (string s1, string s2, size_t n);
1186 [CCode (cheader_filename = "string.h")]
1187 public unowned string? strpbrk (string s1, string s2);
1188 [CCode (cheader_filename = "string.h")]
1189 public unowned string? strrchr (string s, int c);
1190 [CCode (cheader_filename = "string.h")]
1191 public size_t strspn (string s1, string s2);
1192 [CCode (cheader_filename = "string.h")]
1193 public unowned string? strstr (string s1, string s2);
1194 [CCode (cheader_filename = "string.h")]
1195 public unowned string? strtok (string s1, string s2);
1196 [CCode (cheader_filename = "string.h")]
1197 public unowned string? strtok_r (string? s, string sep, out unowned string lasts);
1198 [CCode (cheader_filename = "string.h")]
1199 public size_t strxfrm (string s1, string s2, size_t n);
1201 [CCode (cheader_filename = "strings.h")]
1202 public int ffs (int i);
1204 [CCode (cheader_filename = "stropts.h")]
1205 public const int I_PUSH;
1206 [CCode (cheader_filename = "stropts.h")]
1207 public const int I_POP;
1208 [CCode (cheader_filename = "stropts.h")]
1209 public const int I_LOOK;
1210 [CCode (cheader_filename = "stropts.h")]
1211 public const int I_FLUSH;
1212 [CCode (cheader_filename = "stropts.h")]
1213 public const int I_FLUSHBAND;
1214 [CCode (cheader_filename = "stropts.h")]
1215 public const int I_SETSIG;
1216 [CCode (cheader_filename = "stropts.h")]
1217 public const int I_GETSIG;
1218 [CCode (cheader_filename = "stropts.h")]
1219 public const int I_FIND;
1220 [CCode (cheader_filename = "stropts.h")]
1221 public const int I_PEEK;
1222 [CCode (cheader_filename = "stropts.h")]
1223 public const int I_SRDOPT;
1224 [CCode (cheader_filename = "stropts.h")]
1225 public const int I_GRDOPT;
1226 [CCode (cheader_filename = "stropts.h")]
1227 public const int I_NREAD;
1228 [CCode (cheader_filename = "stropts.h")]
1229 public const int I_FDINSERT;
1230 [CCode (cheader_filename = "stropts.h")]
1231 public const int I_STR;
1232 [CCode (cheader_filename = "stropts.h")]
1233 public const int I_SWROPT;
1234 [CCode (cheader_filename = "stropts.h")]
1235 public const int I_GWROPT;
1236 [CCode (cheader_filename = "stropts.h")]
1237 public const int I_SENDFD;
1238 [CCode (cheader_filename = "stropts.h")]
1239 public const int I_RECVFD;
1240 [CCode (cheader_filename = "stropts.h")]
1241 public const int I_LIST;
1242 [CCode (cheader_filename = "stropts.h")]
1243 public const int I_ATMARK;
1244 [CCode (cheader_filename = "stropts.h")]
1245 public const int I_CKBAND;
1246 [CCode (cheader_filename = "stropts.h")]
1247 public const int I_GETBAND;
1248 [CCode (cheader_filename = "stropts.h")]
1249 public const int I_CANPUT;
1250 [CCode (cheader_filename = "stropts.h")]
1251 public const int I_SETCLTIME;
1252 [CCode (cheader_filename = "stropts.h")]
1253 public const int I_GETCLTIME;
1254 [CCode (cheader_filename = "stropts.h")]
1255 public const int I_LINK;
1256 [CCode (cheader_filename = "stropts.h")]
1257 public const int I_UNLINK;
1258 [CCode (cheader_filename = "stropts.h")]
1259 public const int I_PLINK;
1260 [CCode (cheader_filename = "stropts.h")]
1261 public const int I_PUNLINK;
1262 [CCode (cheader_filename = "stropts.h")]
1263 public const int FLUSHR;
1264 [CCode (cheader_filename = "stropts.h")]
1265 public const int FLUSHW;
1266 [CCode (cheader_filename = "stropts.h")]
1267 public const int FLUSHRW;
1268 [CCode (cheader_filename = "stropts.h")]
1269 public const int S_RDNORM;
1270 [CCode (cheader_filename = "stropts.h")]
1271 public const int S_RDBAND;
1272 [CCode (cheader_filename = "stropts.h")]
1273 public const int S_INPUT;
1274 [CCode (cheader_filename = "stropts.h")]
1275 public const int S_HIPRI;
1276 [CCode (cheader_filename = "stropts.h")]
1277 public const int S_OUTPUT;
1278 [CCode (cheader_filename = "stropts.h")]
1279 public const int S_WRNORM;
1280 [CCode (cheader_filename = "stropts.h")]
1281 public const int S_WRBAND;
1282 [CCode (cheader_filename = "stropts.h")]
1283 public const int S_MSG;
1284 [CCode (cheader_filename = "stropts.h")]
1285 public const int S_ERROR;
1286 [CCode (cheader_filename = "stropts.h")]
1287 public const int S_HANGUP;
1288 [CCode (cheader_filename = "stropts.h")]
1289 public const int S_BANDURG;
1290 [CCode (cheader_filename = "stropts.h")]
1291 public const int RS_HIPRI;
1292 [CCode (cheader_filename = "stropts.h")]
1293 public const int RNORM;
1294 [CCode (cheader_filename = "stropts.h")]
1295 public const int RMSGD;
1296 [CCode (cheader_filename = "stropts.h")]
1297 public const int RMSGN;
1298 [CCode (cheader_filename = "stropts.h")]
1299 public const int RPROTNORN;
1300 [CCode (cheader_filename = "stropts.h")]
1301 public const int RPROTDAT;
1302 [CCode (cheader_filename = "stropts.h")]
1303 public const int RPROTDIS;
1304 [CCode (cheader_filename = "stropts.h")]
1305 public const int SNDZERO;
1306 [CCode (cheader_filename = "stropts.h")]
1307 public const int ANYMARK;
1308 [CCode (cheader_filename = "stropts.h")]
1309 public const int LASTMARK;
1310 [CCode (cheader_filename = "stropts.h")]
1311 public const int MUXID_ALL;
1312 [CCode (cheader_filename = "stropts.h")]
1313 public const int MSG_ANY;
1314 [CCode (cheader_filename = "stropts.h")]
1315 public const int MSG_BAND;
1316 [CCode (cheader_filename = "stropts.h")]
1317 public const int MSG_HIPRI;
1318 [CCode (cheader_filename = "stropts.h")]
1319 public const int MORECTL;
1320 [CCode (cheader_filename = "stropts.h")]
1321 public const int MOREDATA;
1322 [CCode (cheader_filename = "sys/ioctl.h", sentinel = "")]
1323 public int ioctl (int fildes, int request, ...);
1325 [CCode (cheader_filename = "syslog.h")]
1326 public void openlog (string ident, int option, int facility );
1328 [CCode (cheader_filename = "syslog.h")]
1329 public int setlogmask (int mask);
1331 [CCode (cheader_filename = "syslog.h")]
1332 public int LOG_UPTO (int pri);
1334 [CCode (cheader_filename = "syslog.h"), PrintfFormat]
1335 public void syslog (int priority, string format, ... );
1337 [CCode (cheader_filename = "syslog.h")]
1338 public void closelog ();
1340 [CCode (cheader_filename = "syslog.h")]
1341 public const int LOG_PID;
1342 [CCode (cheader_filename = "syslog.h")]
1343 public const int LOG_CONS;
1344 [CCode (cheader_filename = "syslog.h")]
1345 public const int LOG_ODELAY;
1346 [CCode (cheader_filename = "syslog.h")]
1347 public const int LOG_NDELAY;
1348 [CCode (cheader_filename = "syslog.h")]
1349 public const int LOG_NOWAIT;
1350 [CCode (cheader_filename = "syslog.h")]
1351 public const int LOG_EMERG;
1352 [CCode (cheader_filename = "syslog.h")]
1353 public const int LOG_ALERT;
1354 [CCode (cheader_filename = "syslog.h")]
1355 public const int LOG_CRIT;
1356 [CCode (cheader_filename = "syslog.h")]
1357 public const int LOG_ERR;
1358 [CCode (cheader_filename = "syslog.h")]
1359 public const int LOG_WARNING;
1360 [CCode (cheader_filename = "syslog.h")]
1361 public const int LOG_NOTICE;
1362 [CCode (cheader_filename = "syslog.h")]
1363 public const int LOG_INFO;
1364 [CCode (cheader_filename = "syslog.h")]
1365 public const int LOG_DEBUG;
1366 [CCode (cheader_filename = "syslog.h")]
1367 public const int LOG_KERN;
1368 [CCode (cheader_filename = "syslog.h")]
1369 public const int LOG_USER;
1370 [CCode (cheader_filename = "syslog.h")]
1371 public const int LOG_MAIL;
1372 [CCode (cheader_filename = "syslog.h")]
1373 public const int LOG_DAEMON;
1374 [CCode (cheader_filename = "syslog.h")]
1375 public const int LOG_SYSLOG;
1376 [CCode (cheader_filename = "syslog.h")]
1377 public const int LOG_LPR;
1378 [CCode (cheader_filename = "syslog.h")]
1379 public const int LOG_NEWS;
1380 [CCode (cheader_filename = "syslog.h")]
1381 public const int LOG_UUCP;
1382 [CCode (cheader_filename = "syslog.h")]
1383 public const int LOG_CRON;
1384 [CCode (cheader_filename = "syslog.h")]
1385 public const int LOG_AUTHPRIV;
1386 [CCode (cheader_filename = "syslog.h")]
1387 public const int LOG_FTP;
1388 [CCode (cheader_filename = "syslog.h")]
1389 public const int LOG_LOCAL0;
1390 [CCode (cheader_filename = "syslog.h")]
1391 public const int LOG_LOCAL1;
1392 [CCode (cheader_filename = "syslog.h")]
1393 public const int LOG_LOCAL2;
1394 [CCode (cheader_filename = "syslog.h")]
1395 public const int LOG_LOCAL3;
1396 [CCode (cheader_filename = "syslog.h")]
1397 public const int LOG_LOCAL4;
1398 [CCode (cheader_filename = "syslog.h")]
1399 public const int LOG_LOCAL5;
1400 [CCode (cheader_filename = "syslog.h")]
1401 public const int LOG_LOCAL6;
1402 [CCode (cheader_filename = "syslog.h")]
1403 public const int LOG_LOCAL7;
1405 [CCode (cheader_filename = "sys/socket.h")]
1406 public const int SOCK_DGRAM;
1407 [CCode (cheader_filename = "sys/socket.h")]
1408 public const int SOCK_RAW;
1409 [CCode (cheader_filename = "sys/socket.h")]
1410 public const int SOCK_SEQPACKET;
1411 [CCode (cheader_filename = "sys/socket.h")]
1412 public const int SOCK_STREAM;
1413 [CCode (cheader_filename = "sys/socket.h")]
1414 public const int AF_UNSPEC;
1415 [CCode (cheader_filename = "sys/socket.h")]
1416 public const int AF_INET;
1417 [CCode (cheader_filename = "sys/socket.h")]
1418 public const int AF_INET6;
1419 [CCode (cheader_filename = "sys/socket.h")]
1420 public const int AF_UNIX;
1422 [CCode (cheader_filename = "sys/socket.h")]
1423 public const int SHUT_RD;
1424 [CCode (cheader_filename = "sys/socket.h")]
1425 public const int SHUT_WR;
1426 [CCode (cheader_filename = "sys/socket.h")]
1427 public const int SHUT_RDWR;
1429 [CCode (cheader_filename = "netdb.h")]
1430 public const int AI_PASSIVE;
1431 [CCode (cheader_filename = "netdb.h")]
1432 public const int AI_CANONNAME;
1433 [CCode (cheader_filename = "netdb.h")]
1434 public const int AI_NUMERICHOST;
1435 [CCode (cheader_filename = "netdb.h")]
1436 public const int AI_V4MAPPED;
1437 [CCode (cheader_filename = "netdb.h")]
1438 public const int AI_ALL;
1439 [CCode (cheader_filename = "netdb.h")]
1440 public const int AI_ADDRCONFIG;
1441 [CCode (cheader_filename = "netdb.h")]
1442 public const int AI_IDN;
1443 [CCode (cheader_filename = "netdb.h")]
1444 public const int AI_CANONIDN;
1445 [CCode (cheader_filename = "netdb.h")]
1446 public const int AI_IDN_ALLOW_UNASSIGNED;
1447 [CCode (cheader_filename = "netdb.h")]
1448 public const int AI_IDN_USE_STD3_ASCII_RULES;
1449 [CCode (cheader_filename = "netdb.h")]
1450 public const int AI_NUMERICSERV;
1452 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1453 public int accept (int sfd, ... );
1454 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1455 public int bind (int sockfd, ...);
1456 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1457 public int connect(int sfd, ... );
1458 [CCode (cheader_filename = "sys/socket.h")]
1459 public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
1460 [CCode (cheader_filename = "sys/socket.h")]
1461 public int listen (int sfd, int backlog);
1462 [CCode (cheader_filename = "sys/socket.h")]
1463 public ssize_t recv (int sockfd, void *buf, size_t len, int flags);
1464 [CCode (cheader_filename = "sys/socket.h")]
1465 public ssize_t send (int sockfd, void* buf, size_t len, int flags);
1466 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1467 public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
1468 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1469 public ssize_t sendmsg (int sockfd, ...);
1470 [CCode (cheader_filename = "sys/socket.h")]
1471 public int setsockopt (int sockfd, int level, int optname, void* optval, socklen_t optlen);
1472 [CCode (cheader_filename = "sys/socket.h")]
1473 public int shutdown (int sockfd, int how);
1474 [CCode (cheader_filename = "sys/socket.h")]
1475 public int socket (int domain, int type, int protocol);
1476 [CCode (cheader_filename = "sys/socket.h")]
1477 public int socketpair (int domain, int type, int protocol, [CCode (array_length = false)] int[] sv);
1478 [CCode (cheader_filename = "netdb.h")]
1479 public int getaddrinfo (string node, string service, AddrInfo hints, out AddrInfo *res);
1480 [CCode (cheader_filename = "netdb.h")]
1481 public void freeaddrinfo (AddrInfo *res);
1482 [CCode (cheader_filename = "netdb.h")]
1483 public unowned string gai_strerror (int errcode);
1484 [CCode (cheader_filename = "netdb.h")]
1485 public unowned HostEnt? gethostbyname (string name);
1487 [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0", has_type_id = false)]
1488 public struct socklen_t : int {
1492 [CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h,netinet/in.h", destroy_function = "", has_type_id = false)]
1493 public struct InAddr {
1494 public uint32 s_addr;
1497 [CCode (cname = "struct in6_addr", cheader_filename = "sys/socket.h,netinet/in.h", destroy_function = "", has_type_id = false)]
1498 public struct In6Addr {
1499 public uint8 s6_addr[16];
1502 [CCode (cname = "struct sockaddr", cheader_filename = "sys/socket.h", destroy_function = "", has_type_id = false)]
1503 public struct SockAddr {
1504 public int sa_family;
1505 [CCode (array_length = false)]
1506 public char[] sa_data;
1509 [CCode (cname = "struct sockaddr_in", cheader_filename = "netinet/in.h", destroy_function = "", has_type_id = false)]
1510 public struct SockAddrIn {
1511 public int sin_family;
1512 public uint16 sin_port;
1513 public InAddr sin_addr;
1516 [CCode (cname = "struct sockaddr_in6", cheader_filename = "netinet/in.h", destroy_function = "", has_type_id = false)]
1517 public struct SockAddrIn6 {
1518 public int sin6_family;
1519 public uint16 sin6_port;
1520 public uint32 sin6_flowinfo;
1521 public In6Addr sin6_addr;
1522 public uint32 sin6_scope_id;
1525 [CCode (cname = "struct addrinfo", cheader_filename = "netdb.h", destroy_function = "", has_type_id = false)]
1526 public struct AddrInfo {
1527 public int ai_flags;
1528 public int ai_family;
1529 public int ai_socktype;
1530 public int ai_protocol;
1531 public socklen_t ai_addrlen;
1532 public SockAddr *ai_addr;
1533 public string ai_canonname;
1534 public AddrInfo *ai_next;
1538 [CCode (cname = "struct hostent", cheader_filename = "netdb.h", destroy_function = "", has_type_id = false)]
1539 public class HostEnt {
1540 public string h_name;
1541 [CCode (array_length=false, array_null_terminated=true)]
1542 public string[] h_aliases;
1543 public int h_addrtype;
1544 public int h_length;
1545 [CCode (array_length=false, array_null_terminated=true)]
1546 public string[] h_addr_list;
1549 [CCode (cheader_filename = "sys/stat.h")]
1550 public int mkfifo (string filename, mode_t mode);
1552 [CCode (cheader_filename = "sys/stat.h")]
1553 public const mode_t S_IFMT;
1554 [CCode (cheader_filename = "sys/stat.h")]
1555 public const mode_t S_IFBLK;
1556 [CCode (cheader_filename = "sys/stat.h")]
1557 public const mode_t S_IFCHR;
1558 [CCode (cheader_filename = "sys/stat.h")]
1559 public const mode_t S_IFIFO;
1560 [CCode (cheader_filename = "sys/stat.h")]
1561 public const mode_t S_IFREG;
1562 [CCode (cheader_filename = "sys/stat.h")]
1563 public const mode_t S_IFDIR;
1564 [CCode (cheader_filename = "sys/stat.h")]
1565 public const mode_t S_IFLNK;
1566 [CCode (cheader_filename = "sys/stat.h")]
1567 public const mode_t S_IFSOCK;
1569 [CCode (cheader_filename = "sys/stat.h")]
1570 public const mode_t S_IRWXU;
1571 [CCode (cheader_filename = "sys/stat.h")]
1572 public const mode_t S_IRUSR;
1573 [CCode (cheader_filename = "sys/stat.h")]
1574 public const mode_t S_IWUSR;
1575 [CCode (cheader_filename = "sys/stat.h")]
1576 public const mode_t S_IXUSR;
1577 [CCode (cheader_filename = "sys/stat.h")]
1578 public const mode_t S_IRWXG;
1579 [CCode (cheader_filename = "sys/stat.h")]
1580 public const mode_t S_IRGRP;
1581 [CCode (cheader_filename = "sys/stat.h")]
1582 public const mode_t S_IWGRP;
1583 [CCode (cheader_filename = "sys/stat.h")]
1584 public const mode_t S_IXGRP;
1585 [CCode (cheader_filename = "sys/stat.h")]
1586 public const mode_t S_IRWXO;
1587 [CCode (cheader_filename = "sys/stat.h")]
1588 public const mode_t S_IROTH;
1589 [CCode (cheader_filename = "sys/stat.h")]
1590 public const mode_t S_IWOTH;
1591 [CCode (cheader_filename = "sys/stat.h")]
1592 public const mode_t S_IXOTH;
1593 [CCode (cheader_filename = "sys/stat.h")]
1594 public const mode_t S_ISUID;
1595 [CCode (cheader_filename = "sys/stat.h")]
1596 public const mode_t S_ISGID;
1597 [CCode (cheader_filename = "sys/stat.h")]
1598 public const mode_t S_ISVTX;
1600 [CCode (cheader_filename = "sys/stat.h")]
1601 public bool S_ISBLK (mode_t mode);
1602 [CCode (cheader_filename = "sys/stat.h")]
1603 public bool S_ISCHR (mode_t mode);
1604 [CCode (cheader_filename = "sys/stat.h")]
1605 public bool S_ISDIR (mode_t mode);
1606 [CCode (cheader_filename = "sys/stat.h")]
1607 public bool S_ISFIFO (mode_t mode);
1608 [CCode (cheader_filename = "sys/stat.h")]
1609 public bool S_ISREG (mode_t mode);
1610 [CCode (cheader_filename = "sys/stat.h")]
1611 public bool S_ISLNK (mode_t mode);
1612 [CCode (cheader_filename = "sys/stat.h")]
1613 public bool S_ISSOCK (mode_t mode);
1615 [CCode (cheader_filename = "sys/stat.h", cname = "struct stat", has_type_id = false)]
1616 public struct Stat {
1617 public dev_t st_dev;
1618 public ino_t st_ino;
1619 public mode_t st_mode;
1620 public nlink_t st_nlink;
1621 public uid_t st_uid;
1622 public gid_t st_gid;
1623 public dev_t st_rdev;
1624 public size_t st_size;
1625 public timespec st_atim;
1626 public time_t st_atime;
1627 public timespec st_mtim;
1628 public time_t st_mtime;
1629 public timespec st_ctim;
1630 public time_t st_ctime;
1631 public blksize_t st_blksize;
1632 public blkcnt_t st_blocks;
1634 [CCode (cheader_filename = "sys/stat.h")]
1635 int fstat( int fd, out Stat buf);
1636 [CCode (cheader_filename = "sys/stat.h")]
1637 int stat (string filename, out Stat buf);
1638 [CCode (cheader_filename = "sys/stat.h")]
1639 int lstat (string filename, out Stat buf);
1641 [CCode (cheader_filename = "sys/stat.h")]
1642 public int chmod (string filename, mode_t mode);
1643 [CCode (cheader_filename = "sys/stat.h")]
1644 public int fchmod (int fd, mode_t mode);
1645 [CCode (cheader_filename = "sys/stat.h")]
1646 public mode_t umask (mode_t mask);
1647 [CCode (cheader_filename = "sys/stat.h")]
1648 public int mkdir (string path, mode_t mode);
1649 [CCode (cheader_filename = "sys/types.h,sys/stat.h,fcntl.h,unistd.h")]
1650 public pid_t mknod (string pathname, mode_t mode, dev_t dev);
1652 [CCode (cheader_filename = "sys/stat.h")]
1653 public int utimensat (int dirfd, string pathname, [CCode (array_length = false)] timespec[] times, int flags = 0);
1654 [CCode (cheader_filename = "sys/stat.h")]
1655 public int futimens (int fd, [CCode (array_length = false)] timespec[] times);
1657 [CCode (cheader_filename = "sys/wait.h")]
1658 public pid_t wait (out int status);
1659 [CCode (cheader_filename = "sys/wait.h")]
1660 public pid_t waitpid (pid_t pid, out int status, int options);
1661 [CCode (cheader_filename = "sys/wait.h")]
1662 public const int WNOHANG;
1663 [CCode (cheader_filename = "sys/wait.h")]
1664 public const int WUNTRACED;
1665 [CCode (cheader_filename = "sys/wait.h")]
1666 public const int WCONTINUED;
1669 [IntegerType (rank = 9)]
1670 [CCode (cheader_filename = "sys/types.h", cname = "key_t", has_type_id = false)]
1671 public struct key_t {
1675 [IntegerType (rank = 9)]
1676 [CCode (cheader_filename = "sys/statvfs.h", has_type_id = false)]
1677 public struct fsblkcnt_t {
1681 [IntegerType (rank = 9)]
1682 [CCode (cheader_filename = "sys/statvfs.h", has_type_id = false)]
1683 public struct fsfilcnt_t {
1686 [CCode (cheader_filename = "sys/statvfs.h", cname = "struct statvfs", has_type_id = false)]
1687 public struct statvfs {
1688 public ulong f_bsize;
1689 public ulong f_frsize;
1690 public fsblkcnt_t f_blocks;
1691 public fsblkcnt_t f_bfree;
1692 public fsblkcnt_t f_bavail;
1693 public fsfilcnt_t f_files;
1694 public fsfilcnt_t f_ffree;
1695 public fsfilcnt_t f_favail;
1698 [CCode (cheader_filename = "sys/statvfs.h", cname = "statvfs")]
1699 public int statvfs_exec (string path, out statvfs buf);
1700 [CCode (cheader_filename = "sys/statvfs.h")]
1701 public int fstatvfs (int fs, out statvfs buf);
1704 [IntegerType (rank = 9)]
1705 [CCode (cname="off_t", cheader_filename = "sys/types.h", has_type_id = false)]
1706 public struct off_t {
1710 [IntegerType (rank = 9)]
1711 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1712 public struct uid_t {
1716 [IntegerType (rank = 9)]
1717 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1718 public struct gid_t {
1722 [IntegerType (rank = 9)]
1723 [CCode (cname = "mode_t", cheader_filename = "sys/types.h", has_type_id = false)]
1724 public struct mode_t {
1728 [IntegerType (rank = 9)]
1729 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1730 public struct dev_t {
1733 [CCode (cheader_filename = "sys/types.h")]
1734 uint major (dev_t dev);
1735 [CCode (cheader_filename = "sys/types.h")]
1736 uint minor (dev_t dev);
1737 [CCode (cheader_filename = "sys/types.h")]
1738 dev_t makedev (int maj, int min);
1741 [IntegerType (rank = 9)]
1742 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1743 public struct ino_t {
1747 [IntegerType (rank = 9)]
1748 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1749 public struct nlink_t {
1753 [IntegerType (rank = 9)]
1754 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1755 public struct blksize_t {
1759 [IntegerType (rank = 9)]
1760 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
1761 public struct blkcnt_t {
1764 [CCode (cheader_filename = "time.h", has_type_id = false)]
1765 [IntegerType (rank = 8)]
1766 public struct clock_t {
1767 [CCode (cname = "clock")]
1771 [CCode (cname = "struct tm", cheader_filename = "time.h", has_type_id = false)]
1781 public int tm_isdst;
1784 [CCode (cname = "struct timespec", cheader_filename = "time.h", has_type_id = false)]
1785 public struct timespec {
1786 public time_t tv_sec;
1787 public long tv_nsec;
1790 [CCode (array_length = false, cheader_filename = "time.h")]
1791 public string[] tzname;
1792 [CCode (cheader_filename = "time.h")]
1793 public const long timezone;
1794 [CCode (cheader_filename = "time.h")]
1795 public const int daylight;
1797 [CCode (cheader_filename = "time.h")]
1798 public void tzset ();
1802 [CCode (cheader_filename = "time.h", has_type_id = false)]
1803 public struct clockid_t {
1806 [CCode (cheader_filename = "time.h")]
1807 public const clockid_t CLOCK_REALTIME;
1808 [CCode (cheader_filename = "time.h")]
1809 public const clockid_t CLOCK_MONOTONIC;
1810 [CCode (cheader_filename = "time.h")]
1811 public const clockid_t CLOCK_PROCESS_CPUTIME_ID;
1812 [CCode (cheader_filename = "time.h")]
1813 public const clockid_t CLOCK_THREAD_CPUTIME_ID;
1814 [CCode (cheader_filename = "time.h")]
1815 public const clockid_t CLOCK_REALTIME_COARSE;
1816 [CCode (cheader_filename = "time.h")]
1817 public const clockid_t CLOCK_MONOTONIC_COARSE;
1819 [CCode (cheader_filename = "time.h")]
1820 int clock_gettime (clockid_t clk_id, out timespec tp);
1822 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1823 public int getpriority (int which, int who);
1824 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1825 public int setpriority (int which, int who, int prio);
1827 [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h", has_type_id = false)]
1828 public struct iovector {
1829 public void* iov_base;
1830 public size_t iov_len;
1833 [CCode (cheader_filename = "unistd.h")]
1834 public int close (int fd);
1835 [CCode (cheader_filename = "unistd.h")]
1836 public int execl (string path, params string[] arg);
1837 [CCode (cheader_filename = "unistd.h")]
1838 public int execlp (string path, params string[] arg);
1839 [CCode (cheader_filename = "unistd.h")]
1840 public int execv (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
1841 [CCode (cheader_filename = "unistd.h")]
1842 public int execvp (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
1843 [CCode (cheader_filename = "unistd.h")]
1844 public int pipe ([CCode (array_length = false, null_terminated = false)] int[] pipefd);
1845 [CCode (cheader_filename = "unistd.h")]
1846 public ssize_t read (int fd, void* buf, size_t count);
1847 [CCode (cheader_filename = "unistd.h")]
1848 public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
1849 [CCode (cheader_filename = "unistd.h")]
1850 public ssize_t readlink (string path, char[] buf);
1851 [CCode (cheader_filename = "sys/uio.h")]
1852 public ssize_t readv (int fd, iovector vector, int iovcnt = 1);
1853 [CCode (cname = "readv", cheader_filename = "sys/uio.h")]
1854 public ssize_t read_vectors (int fd, iovector[] vector);
1855 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1856 public int setgid (gid_t gid);
1857 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1858 public int setuid (uid_t uid);
1859 [CCode (cheader_filename = "unistd.h")]
1860 public int unlink (string filename);
1861 [CCode (cheader_filename = "unistd.h")]
1862 public ssize_t write (int fd, void* buf, size_t count);
1863 [CCode (cheader_filename = "unistd.h")]
1864 public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
1865 [CCode (cheader_filename = "sys/uio.h")]
1866 public ssize_t writev (int fd, iovector vector, int iovcnt = 1);
1867 [CCode (cname = "writev", cheader_filename = "sys/uio.h")]
1868 public ssize_t write_vectors (int fd, iovector[] vector);
1869 [CCode (cheader_filename = "unistd.h")]
1870 public off_t lseek(int fildes, off_t offset, int whence);
1872 [CCode (cheader_filename = "unistd.h")]
1873 public const int SEEK_SET;
1874 [CCode (cheader_filename = "unistd.h")]
1875 public const int SEEK_CUR;
1876 [CCode (cheader_filename = "unistd.h")]
1877 public const int SEEK_END;
1879 [CCode (cheader_filename = "unistd.h")]
1880 public pid_t fork ();
1881 [CCode (cheader_filename = "unistd.h")]
1882 public pid_t vfork ();
1883 [CCode (cheader_filename = "unistd.h")]
1884 public unowned string ttyname (int fd);
1885 [CCode (cheader_filename = "unistd.h")]
1886 public int ttyname_r (int fd, char[] buf);
1887 [CCode (cheader_filename = "unistd.h")]
1888 public bool isatty (int fd);
1889 [CCode (cheader_filename = "unistd.h")]
1890 public int link (string from, string to);
1891 [CCode (cheader_filename = "unistd.h")]
1892 public int symlink (string from, string to);
1893 [CCode (cheader_filename = "unistd.h")]
1894 public long sysconf (int name);
1895 [CCode (cheader_filename = "unistd.h")]
1896 public int rmdir (string path);
1897 [CCode (cheader_filename = "unistd.h")]
1898 public pid_t tcgetpgrp (int fd);
1899 [CCode (cheader_filename = "unistd.h")]
1900 public int tcsetpgrp (int fd, pid_t pgrp_id);
1901 [CCode (cheader_filename = "unistd.h")]
1902 public unowned string getlogin ();
1903 [CCode (cheader_filename = "unistd.h")]
1904 public int vhangup ();
1905 [CCode (cheader_filename = "unistd.h")]
1906 public int revoke (string file);
1907 [CCode (cheader_filename = "unistd.h")]
1908 public int acct (string name);
1909 [CCode (cheader_filename = "unistd.h")]
1910 public unowned string getusershell ();
1911 [CCode (cheader_filename = "unistd.h")]
1912 public void endusershell ();
1913 [CCode (cheader_filename = "unistd.h")]
1914 public void setusershell ();
1915 [CCode (cheader_filename = "unistd.h")]
1916 public int chroot (string path);
1917 [Version (deprecated_since = "POSIX.2", replacement = "termios ECHO flag")]
1918 [CCode (cheader_filename = "unistd.h")]
1919 public unowned string getpass (string promt);
1923 * To expose Posix crypt() GNU's libc and others require the feature test
1924 * macro _XOPEN_SOURCE to be defined. See man 3 crypt.
1925 * A VAPI is unable to define and emit this macro before all include files
1926 * Instead use valac -X -D_XOPEN_SOURCE
1928 [CCode (cheader_filename = "unistd.h")]
1929 public unowned string crypt (string key, string salt);
1930 [CCode (cheader_filename = "unistd.h")]
1931 public int getpagesize ();
1932 [CCode (cheader_filename = "unistd.h")]
1933 public int getdtablesize ();
1935 [CCode (cheader_filename = "unistd.h")]
1936 public const int _SC_ARG_MAX;
1937 [CCode (cheader_filename = "unistd.h")]
1938 public const int _SC_CHILD_MAX;
1939 [CCode (cheader_filename = "unistd.h")]
1940 public const int _SC_HOST_NAME_MAX;
1941 [CCode (cheader_filename = "unistd.h")]
1942 public const int _SC_LOGIN_NAME_MAX;
1943 [CCode (cheader_filename = "unistd.h")]
1944 public const int _SC_CLK_TCK;
1945 [CCode (cheader_filename = "unistd.h")]
1946 public const int _SC_OPEN_MAX;
1947 [CCode (cheader_filename = "unistd.h")]
1948 public const int _SC_PAGESIZE;
1949 [CCode (cheader_filename = "unistd.h")]
1950 public const int _SC_RE_DUP_MAX;
1951 [CCode (cheader_filename = "unistd.h")]
1952 public const int _SC_STREAM_MAX;
1953 [CCode (cheader_filename = "unistd.h")]
1954 public const int _SC_SYMLOOP_MAX;
1955 [CCode (cheader_filename = "unistd.h")]
1956 public const int _SC_TTY_NAME_MAX;
1957 [CCode (cheader_filename = "unistd.h")]
1958 public const int _SC_TZNAME_MAX;
1959 [CCode (cheader_filename = "unistd.h")]
1960 public const int _SC_VERSION;
1961 [CCode (cheader_filename = "unistd.h")]
1962 public const int _SC_BASE_MAX;
1963 [CCode (cheader_filename = "unistd.h")]
1964 public const int _SC_BC_DIM_MAX;
1965 [CCode (cheader_filename = "unistd.h")]
1966 public const int _SC_BC_SCALE_MAX;
1967 [CCode (cheader_filename = "unistd.h")]
1968 public const int _SC_BC_STRING_MAX;
1969 [CCode (cheader_filename = "unistd.h")]
1970 public const int _SC_COLL_WEIGHTS_MAX;
1971 [CCode (cheader_filename = "unistd.h")]
1972 public const int _SC_EXRP_NEST_MAX;
1973 [CCode (cheader_filename = "unistd.h")]
1974 public const int _SC_LINE_MAX;
1975 [CCode (cheader_filename = "unistd.h")]
1976 public const int _SC_2_VERSION;
1977 [CCode (cheader_filename = "unistd.h")]
1978 public const int _SC_2_C_DEV;
1979 [CCode (cheader_filename = "unistd.h")]
1980 public const int _SC_2_FORT_DEV;
1981 [CCode (cheader_filename = "unistd.h")]
1982 public const int _SC_2_FORT_RUN;
1983 [CCode (cheader_filename = "unistd.h")]
1984 public const int _SC_2_LOCALEDEF;
1985 [CCode (cheader_filename = "unistd.h")]
1986 public const int _SC_2_SW_DEV;
1988 [CCode (cheader_filename = "unistd.h")]
1989 public const int STDIN_FILENO;
1990 [CCode (cheader_filename = "unistd.h")]
1991 public const int STDOUT_FILENO;
1992 [CCode (cheader_filename = "unistd.h")]
1993 public const int STDERR_FILENO;
1994 [CCode (cheader_filename = "unistd.h")]
1995 public const int R_OK;
1996 [CCode (cheader_filename = "unistd.h")]
1997 public const int W_OK;
1998 [CCode (cheader_filename = "unistd.h")]
1999 public const int X_OK;
2000 [CCode (cheader_filename = "unistd.h")]
2001 public const int F_OK;
2003 [CCode (cheader_filename = "unistd.h")]
2004 public int access (string patchname, int mode);
2005 [CCode (cheader_filename = "unistd.h")]
2006 public int euidaccess (string patchname, int mode);
2007 [CCode (cheader_filename = "unistd.h")]
2008 public int eaccess (string patchname, int mode);
2010 [CCode (cheader_filename = "unistd.h")]
2011 public uint alarm (uint seconds);
2012 [CCode (cheader_filename = "unistd.h")]
2013 public uint ualarm (uint useconds);
2014 [CCode (cheader_filename = "unistd.h")]
2015 public uint sleep (uint seconds);
2016 [CCode (cheader_filename = "unistd.h")]
2017 public uint usleep (uint useconds);
2018 [CCode (cheader_filename = "unistd.h")]
2019 public int pause ();
2020 [CCode (cheader_filename = "unistd.h")]
2021 public int chown (string filename, uid_t owner, gid_t group);
2022 [CCode (cheader_filename = "unistd.h")]
2023 public int fchown (int fd, uid_t owner, gid_t group);
2024 [CCode (cheader_filename = "unistd.h")]
2025 public int lchown (string filename, uid_t owner, gid_t group);
2026 [CCode (cheader_filename = "unistd.h")]
2027 public int chdir (string filepath);
2028 [CCode (cheader_filename = "unistd.h")]
2029 public int fchdir (int file);
2030 [CCode (cheader_filename = "unistd.h")]
2031 public int dup (int fd);
2032 [CCode (cheader_filename = "unistd.h")]
2033 public int dup2 (int fd1, int fd2);
2034 [CCode (cheader_filename = "unistd.h")]
2035 public int gethostname (char[] name);
2036 [CCode (cheader_filename = "unistd.h")]
2037 public pid_t getpid ();
2038 [CCode (cheader_filename = "unistd.h")]
2039 public pid_t getppid ();
2040 [CCode (cheader_filename = "unistd.h")]
2041 public pid_t getpgrp ();
2042 [CCode (cheader_filename = "unistd.h")]
2043 public pid_t getpgid (pid_t pid);
2044 [CCode (cheader_filename = "unistd.h")]
2045 public int setpgid (pid_t pid, pid_t pgid);
2046 [CCode (cheader_filename = "unistd.h")]
2047 public pid_t setpgrp ();
2048 [CCode (cheader_filename = "unistd.h")]
2049 public pid_t getsid (pid_t pid);
2050 [CCode (cheader_filename = "unistd.h")]
2051 public uid_t getuid ();
2052 [CCode (cheader_filename = "unistd.h")]
2053 public uid_t geteuid ();
2054 [CCode (cheader_filename = "unistd.h")]
2055 public gid_t getgid ();
2056 [CCode (cheader_filename = "unistd.h")]
2057 public gid_t getegid ();
2058 [CCode (cheader_filename = "unistd.h")]
2059 public int group_member (gid_t gid);
2060 [CCode (cheader_filename = "unistd.h")]
2061 public pid_t setsid ();
2062 [CCode (cheader_filename = "unistd.h")]
2063 public pid_t tcgetsid (int fd);
2065 [CCode (cheader_filename = "unistd.h")]
2066 public int fsync (int fd);
2067 [CCode (cheader_filename = "unistd.h")]
2068 public int fdatasync (int fd);
2069 [CCode (cheader_filename = "unistd.h")]
2072 [CCode (cheader_filename = "unistd.h")]
2073 public int ftruncate(int fd, off_t length);
2074 [CCode (cheader_filename = "unistd.h")]
2075 public int truncate(string path, off_t length);
2076 [CCode (cheader_filename = "unistd.h")]
2077 public int nice (int inc);
2080 [CCode (cname = "cc_t", cheader_filename = "termios.h", has_type_id = false)]
2081 [IntegerType (rank = 3, min = 0, max = 255)]
2082 public struct cc_t {
2086 [CCode (cname = "speed_t", cheader_filename = "termios.h", has_type_id = false)]
2087 [IntegerType (rank = 7)]
2088 public struct speed_t {
2092 [CCode (cname = "tcflag_t", cheader_filename = "termios.h", has_type_id = false)]
2093 [IntegerType (rank = 7)]
2094 public struct tcflag_t {
2097 [CCode (cname="struct termios", cheader_filename = "termios.h", has_type_id = false)]
2098 public struct termios
2100 public tcflag_t c_iflag;
2101 public tcflag_t c_oflag;
2102 public tcflag_t c_cflag;
2103 public tcflag_t c_lflag;
2105 public cc_t c_cc[32];
2106 public speed_t c_ispeed;
2107 public speed_t c_ospeed;
2110 [CCode (cheader_filename = "termios.h")]
2111 public int tcgetattr (int fd, out termios termios_p);
2112 [CCode (cheader_filename = "termios.h")]
2113 public int tcsetattr (int fd, int optional_actions, termios termios_p);
2114 [CCode (cheader_filename = "termios.h")]
2115 public int tcsendbreak (int fd, int duration);
2116 [CCode (cheader_filename = "termios.h")]
2117 public int tcdrain (int fd);
2118 [CCode (cheader_filename = "termios.h")]
2119 public int tcflush (int fd, int queue_selector);
2120 [CCode (cheader_filename = "termios.h")]
2121 public int tcflow (int fd, int action);
2122 [CCode (cheader_filename = "termios.h")]
2123 public void cfmakeraw (ref termios termios_p);
2124 [CCode (cheader_filename = "termios.h")]
2125 public speed_t cfgetispeed (termios termios_p);
2126 [CCode (cheader_filename = "termios.h")]
2127 public speed_t cfgetospeed (termios termios_p);
2128 [CCode (cheader_filename = "termios.h")]
2129 public int cfsetispeed (ref termios termios_p, speed_t speed);
2130 [CCode (cheader_filename = "termios.h")]
2131 public int cfsetospeed (ref termios termios_p, speed_t speed);
2132 [CCode (cheader_filename = "termios.h")]
2133 public int cfsetspeed (ref termios termios, speed_t speed);
2136 [CCode (cheader_filename = "termios.h")]
2137 public const tcflag_t IGNBRK;
2138 [CCode (cheader_filename = "termios.h")]
2139 public const tcflag_t BRKINT;
2140 [CCode (cheader_filename = "termios.h")]
2141 public const tcflag_t IGNPAR;
2142 [CCode (cheader_filename = "termios.h")]
2143 public const tcflag_t PARMRK;
2144 [CCode (cheader_filename = "termios.h")]
2145 public const tcflag_t INPCK;
2146 [CCode (cheader_filename = "termios.h")]
2147 public const tcflag_t ISTRIP;
2148 [CCode (cheader_filename = "termios.h")]
2149 public const tcflag_t INLCR;
2150 [CCode (cheader_filename = "termios.h")]
2151 public const tcflag_t IGNCR;
2152 [CCode (cheader_filename = "termios.h")]
2153 public const tcflag_t IXON;
2154 [CCode (cheader_filename = "termios.h")]
2155 public const tcflag_t IXANY;
2156 [CCode (cheader_filename = "termios.h")]
2157 public const tcflag_t IXOFF;
2158 [CCode (cheader_filename = "termios.h")]
2159 public const tcflag_t ICRNL;
2162 [CCode (cheader_filename = "termios.h")]
2163 public const tcflag_t OPOST;
2164 [CCode (cheader_filename = "termios.h")]
2165 public const tcflag_t ONLCR;
2166 [CCode (cheader_filename = "termios.h")]
2167 public const tcflag_t OCRNL;
2168 [CCode (cheader_filename = "termios.h")]
2169 public const tcflag_t ONOCR;
2170 [CCode (cheader_filename = "termios.h")]
2171 public const tcflag_t ONLRET;
2172 [CCode (cheader_filename = "termios.h")]
2173 public const tcflag_t OFILL;
2174 [CCode (cheader_filename = "termios.h")]
2175 public const tcflag_t NLDLY;
2176 [CCode (cheader_filename = "termios.h")]
2177 public const tcflag_t NL0;
2178 [CCode (cheader_filename = "termios.h")]
2179 public const tcflag_t NL1;
2180 [CCode (cheader_filename = "termios.h")]
2181 public const tcflag_t CRDLY;
2182 [CCode (cheader_filename = "termios.h")]
2183 public const tcflag_t CR0;
2184 [CCode (cheader_filename = "termios.h")]
2185 public const tcflag_t CR1;
2186 [CCode (cheader_filename = "termios.h")]
2187 public const tcflag_t CR2;
2188 [CCode (cheader_filename = "termios.h")]
2189 public const tcflag_t CR3;
2190 [CCode (cheader_filename = "termios.h")]
2191 public const tcflag_t TABDLY;
2192 [CCode (cheader_filename = "termios.h")]
2193 public const tcflag_t TAB0;
2194 [CCode (cheader_filename = "termios.h")]
2195 public const tcflag_t TAB1;
2196 [CCode (cheader_filename = "termios.h")]
2197 public const tcflag_t TAB2;
2198 [CCode (cheader_filename = "termios.h")]
2199 public const tcflag_t TAB3;
2200 [CCode (cheader_filename = "termios.h")]
2201 public const tcflag_t BSDLY;
2202 [CCode (cheader_filename = "termios.h")]
2203 public const tcflag_t BS0;
2204 [CCode (cheader_filename = "termios.h")]
2205 public const tcflag_t BS1;
2206 [CCode (cheader_filename = "termios.h")]
2207 public const tcflag_t VTDLY;
2208 [CCode (cheader_filename = "termios.h")]
2209 public const tcflag_t VT0;
2210 [CCode (cheader_filename = "termios.h")]
2211 public const tcflag_t VT1;
2212 [CCode (cheader_filename = "termios.h")]
2213 public const tcflag_t FFDLY;
2214 [CCode (cheader_filename = "termios.h")]
2215 public const tcflag_t FF0;
2216 [CCode (cheader_filename = "termios.h")]
2217 public const tcflag_t FF1;
2220 [CCode (cheader_filename = "termios.h")]
2221 public const tcflag_t CSIZE;
2222 [CCode (cheader_filename = "termios.h")]
2223 public const tcflag_t CS5;
2224 [CCode (cheader_filename = "termios.h")]
2225 public const tcflag_t CS6;
2226 [CCode (cheader_filename = "termios.h")]
2227 public const tcflag_t CS7;
2228 [CCode (cheader_filename = "termios.h")]
2229 public const tcflag_t CS8;
2230 [CCode (cheader_filename = "termios.h")]
2231 public const tcflag_t CSTOPB;
2232 [CCode (cheader_filename = "termios.h")]
2233 public const tcflag_t CREAD;
2234 [CCode (cheader_filename = "termios.h")]
2235 public const tcflag_t PARENB;
2236 [CCode (cheader_filename = "termios.h")]
2237 public const tcflag_t PARODD;
2238 [CCode (cheader_filename = "termios.h")]
2239 public const tcflag_t HUPCL;
2240 [CCode (cheader_filename = "termios.h")]
2241 public const tcflag_t CLOCAL;
2244 [CCode (cheader_filename = "termios.h")]
2245 public const tcflag_t ISIG;
2246 [CCode (cheader_filename = "termios.h")]
2247 public const tcflag_t ICANON;
2248 [CCode (cheader_filename = "termios.h")]
2249 public const tcflag_t ECHO;
2250 [CCode (cheader_filename = "termios.h")]
2251 public const tcflag_t ECHOE;
2252 [CCode (cheader_filename = "termios.h")]
2253 public const tcflag_t ECHOK;
2254 [CCode (cheader_filename = "termios.h")]
2255 public const tcflag_t ECHONL;
2256 [CCode (cheader_filename = "termios.h")]
2257 public const tcflag_t NOFLSH;
2258 [CCode (cheader_filename = "termios.h")]
2259 public const tcflag_t TOSTOP;
2260 [CCode (cheader_filename = "termios.h")]
2261 public const tcflag_t IEXTEN;
2264 [CCode (cheader_filename = "termios.h")]
2265 public const int VINTR;
2266 [CCode (cheader_filename = "termios.h")]
2267 public const int VQUIT;
2268 [CCode (cheader_filename = "termios.h")]
2269 public const int VERASE;
2270 [CCode (cheader_filename = "termios.h")]
2271 public const int VKILL;
2272 [CCode (cheader_filename = "termios.h")]
2273 public const int VEOF;
2274 [CCode (cheader_filename = "termios.h")]
2275 public const int VMIN;
2276 [CCode (cheader_filename = "termios.h")]
2277 public const int VEOL;
2278 [CCode (cheader_filename = "termios.h")]
2279 public const int VTIME;
2280 [CCode (cheader_filename = "termios.h")]
2281 public const int VSTART;
2282 [CCode (cheader_filename = "termios.h")]
2283 public const int VSTOP;
2284 [CCode (cheader_filename = "termios.h")]
2285 public const int VSUSP;
2288 [CCode (cheader_filename = "termios.h")]
2289 public const int TCSANOW;
2290 [CCode (cheader_filename = "termios.h")]
2291 public const int TCSADRAIN;
2292 [CCode (cheader_filename = "termios.h")]
2293 public const int TCSAFLUSH;
2296 [CCode (cheader_filename = "termios.h")]
2297 public const int TCIFLUSH;
2298 [CCode (cheader_filename = "termios.h")]
2299 public const int TCOFLUSH;
2300 [CCode (cheader_filename = "termios.h")]
2301 public const int TCIOFLUSH;
2304 [CCode (cheader_filename = "termios.h")]
2305 public const int TCOOFF;
2306 [CCode (cheader_filename = "termios.h")]
2307 public const int TCOON;
2308 [CCode (cheader_filename = "termios.h")]
2309 public const int TCIOFF;
2310 [CCode (cheader_filename = "termios.h")]
2311 public const int TCION;
2314 [CCode (cheader_filename = "termios.h")]
2315 public const speed_t B0;
2316 [CCode (cheader_filename = "termios.h")]
2317 public const speed_t B50;
2318 [CCode (cheader_filename = "termios.h")]
2319 public const speed_t B75;
2320 [CCode (cheader_filename = "termios.h")]
2321 public const speed_t B110;
2322 [CCode (cheader_filename = "termios.h")]
2323 public const speed_t B134;
2324 [CCode (cheader_filename = "termios.h")]
2325 public const speed_t B150;
2326 [CCode (cheader_filename = "termios.h")]
2327 public const speed_t B200;
2328 [CCode (cheader_filename = "termios.h")]
2329 public const speed_t B300;
2330 [CCode (cheader_filename = "termios.h")]
2331 public const speed_t B600;
2332 [CCode (cheader_filename = "termios.h")]
2333 public const speed_t B1200;
2334 [CCode (cheader_filename = "termios.h")]
2335 public const speed_t B1800;
2336 [CCode (cheader_filename = "termios.h")]
2337 public const speed_t B2400;
2338 [CCode (cheader_filename = "termios.h")]
2339 public const speed_t B4800;
2340 [CCode (cheader_filename = "termios.h")]
2341 public const speed_t B9600;
2342 [CCode (cheader_filename = "termios.h")]
2343 public const speed_t B19200;
2344 [CCode (cheader_filename = "termios.h")]
2345 public const speed_t B38400;
2346 [CCode (cheader_filename = "termios.h")]
2347 public const speed_t B57600;
2348 [CCode (cheader_filename = "termios.h")]
2349 public const speed_t B115200;
2350 [CCode (cheader_filename = "termios.h")]
2351 public const speed_t B230400;
2353 [CCode (cname = "fd_set", cheader_filename = "sys/select.h", has_type_id = false)]
2354 public struct fd_set {
2357 [CCode (cname = "struct timeval", cheader_filename = "sys/time.h", has_type_id = false)]
2358 public struct timeval {
2359 public time_t tv_sec;
2360 public long tv_usec;
2361 [CCode (cname = "gettimeofday")]
2362 public int get_time_of_day (void * timezone = null);
2363 [CCode (cname = "settimeofday")]
2364 public int set_time_of_day (void * timezone = null);
2367 [CCode (cname = "sigset_t", cheader_filename = "sys/select.h", has_type_id = false)]
2368 public struct sigset_t {
2371 [CCode (cheader_filename = "sys/select.h")]
2372 public int select (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval timeout);
2373 [CCode (cheader_filename = "sys/select.h")]
2374 public void FD_CLR (int fd, ref fd_set @set);
2375 [CCode (cheader_filename = "sys/select.h")]
2376 public int FD_ISSET (int fd, fd_set @set);
2377 [CCode (cheader_filename = "sys/select.h")]
2378 public void FD_SET (int fd, ref fd_set @set);
2379 [CCode (cheader_filename = "sys/select.h")]
2380 public void FD_ZERO (out fd_set @set);
2381 [CCode (cheader_filename = "sys/select.h")]
2382 public int pselect (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timespec timeout, sigset_t sigmask);
2384 // sys/mman.h - Posix mmap(), munmap(), mprotect()
2385 [CCode (cheader_filename = "sys/mman.h")]
2386 public void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2387 [CCode (cheader_filename = "sys/mman.h")]
2388 public int munmap(void *addr, size_t length);
2389 [CCode (cheader_filename = "sys/mman.h")]
2390 public int mprotect(void *addr, size_t len, int prot);
2391 [CCode (cheader_filename = "sys/mman.h")]
2392 public const int PROT_READ;
2393 [CCode (cheader_filename = "sys/mman.h")]
2394 public const int PROT_WRITE;
2395 [CCode (cheader_filename = "sys/mman.h")]
2396 public const int PROT_EXEC;
2397 [CCode (cheader_filename = "sys/mman.h")]
2398 public const int MAP_SHARED;
2399 [CCode (cheader_filename = "sys/mman.h")]
2400 public const int MAP_PRIVATE;
2401 [CCode (cheader_filename = "sys/mman.h")]
2402 public const int MAP_FIXED;
2403 [CCode (cheader_filename = "sys/mman.h")]
2404 public void *MAP_FAILED;
2405 // sys/mman.h - [MLR] Range Memory Locking
2406 [CCode (cheader_filename = "sys/mman.h")]
2407 public int mlock(void *addr, size_t len);
2408 [CCode (cheader_filename = "sys/mman.h")]
2409 public int munlock(void *addr, size_t len);
2410 // sys/mman.h - Process Memory Locking
2411 [CCode (cheader_filename = "sys/mman.h")]
2412 public const int MCL_CURRENT;
2413 [CCode (cheader_filename = "sys/mman.h")]
2414 public const int MCL_FUTURE;
2415 [CCode (cheader_filename = "sys/mman.h")]
2416 public int mlockall (int flags);
2417 [CCode (cheader_filename = "sys/mman.h")]
2418 public int munlockall ();
2419 // sys/mman.h - [XSI] X/Open System Interfaces
2420 [CCode (cheader_filename = "sys/mman.h")]
2421 public int msync(void *addr, size_t len, int flags);
2422 [CCode (cheader_filename = "sys/mman.h")]
2423 public const int MS_ASYNC;
2424 [CCode (cheader_filename = "sys/mman.h")]
2425 public const int MS_INVALIDATE;
2426 [CCode (cheader_filename = "sys/mman.h")]
2427 public const int MS_SYNC;
2429 [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h", has_type_id = false)]
2430 public struct utsname {
2431 public unowned string sysname;
2432 public unowned string nodename;
2433 public unowned string release;
2434 public unowned string version;
2435 public unowned string machine;
2436 [CCode (cname = "uname")]
2441 [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")]
2443 [CCode (cname = "EOF", cheader_filename = "stdio.h")]
2444 public const int EOF;
2445 [CCode (cname = "SEEK_SET", cheader_filename = "stdio.h")]
2446 public const int SEEK_SET;
2447 [CCode (cname = "SEEK_CUR", cheader_filename = "stdio.h")]
2448 public const int SEEK_CUR;
2449 [CCode (cname = "SEEK_END", cheader_filename = "stdio.h")]
2450 public const int SEEK_END;
2452 [CCode (cname = "fopen")]
2453 public static FILE? open (string path, string mode);
2454 [CCode (cname = "fdopen")]
2455 public static FILE? fdopen (int fildes, string mode);
2456 [CCode (cname = "popen")]
2457 public static FILE? popen (string command, string mode);
2459 [CCode (cname = "fprintf")]
2461 public int printf (string format, ...);
2462 [CCode (cname = "fputc", instance_pos = -1)]
2463 public int putc (char c);
2464 [CCode (cname = "fputs", instance_pos = -1)]
2465 public int puts (string s);
2466 [CCode (cname = "fwrite", instance_pos = -1)]
2467 public size_t write (void *ptr, size_t size, size_t nmemb);
2468 [CCode (cname = "fread", instance_pos = -1)]
2469 public size_t read (void *ptr, size_t size, size_t nmemb);
2470 [CCode (cname = "fgetc")]
2472 [CCode (cname = "fgets", instance_pos = -1)]
2473 public unowned string? gets (char[] s);
2474 [CCode (cname = "feof")]
2476 [CCode (cname = "fscanf"), ScanfFormat]
2477 public int scanf (string format, ...);
2478 [CCode (cname = "fflush")]
2479 public int flush ();
2480 [CCode (cname = "fseek")]
2481 public int seek (long offset, int whence);
2482 [CCode (cname = "ftell")]
2483 public long tell ();
2484 [CCode (cname = "rewind")]
2485 public void rewind ();
2486 [CCode (cname = "fileno")]
2487 public int fileno ();
2488 [CCode (cname = "ferror")]
2489 public int error ();
2490 [CCode (cname = "clearerr")]
2491 public void clearerr ();
2494 public static FILE stderr;
2495 public static FILE stdout;
2496 public static FILE stdin;
2498 [CCode(cheader_filename = "sched.h", cprefix = "sched_")]
2501 [CCode (cname = "struct sched_param", has_type_id = false)]
2502 public struct Param {
2503 public int sched_priority;
2506 public static int setparam(Posix.pid_t pid, ref Sched.Param param);
2507 public static int getparam(Posix.pid_t pid, out Sched.Param param);
2509 public static int setscheduler(Posix.pid_t pid, Algorithm policy, ref Sched.Param param);
2510 public static Algorithm getscheduler(Posix.pid_t pid);
2512 public static int @yield();
2514 public static int get_priority_max(int algorithm);
2515 public static int get_priority_min(int algorithm);
2517 public static int rr_get_interval(Posix.pid_t pid, out Posix.timespec? interval);
2519 [CCode (cprefix = "SCHED_", cname = "int", has_type_id = false)]
2520 public enum Algorithm {
2530 [CCode(cheader_filename = "sched.h", cname = "cpu_set_t", free_function = "CPU_FREE", copy_function="memcpy")]
2531 public class CpuSet {
2532 [CCode(cname = "CPU_ALLOC")]
2533 public CpuSet(int num = 1);
2535 [CCode(cname = "CPU_ALLOC_SIZE")]
2536 public static size_t alloc_size(int num = 1);
2538 [CCode(cname = "CPU_SETSIZE")]
2539 public static size_t size;
2541 [CCode(cname = "CPU_COUNT")]
2544 [CCode(cname = "CPU_COUNT_S", instance_pos = -1)]
2545 public int count_sized(size_t num);
2547 [CCode(cname = "CPU_ZERO")]
2550 [CCode(cname = "CPU_ZERO_S", instance_pos = -1)]
2551 public void zero_sized(size_t num);
2553 [CCode(cname = "CPU_SET", instance_pos = -1)]
2554 public void @set(int cpu);
2556 [CCode(cname = "CPU_SET_S", instance_pos = -1)]
2557 public void @set_sized(int cpu, size_t num);
2559 [CCode(cname = "CPU_CLR", instance_pos = -1)]
2560 public void clr(int cpu);
2562 [CCode(cname = "CPU_CLR_S", instance_pos = -1)]
2563 public void clr_sized(int cpu, size_t num);
2565 [CCode(cname = "CPU_ISSET", instance_pos = -1)]
2566 public bool is_set(int cpu);
2568 [CCode(cname = "CPU_ISSET_S", instance_pos = -1)]
2569 public bool is_set_sized(int cpu, size_t num);
2571 [CCode(cname = "CPU_EQUAL")]
2572 public static bool equal(CpuSet cs1, CpuSet cs2);
2574 public bool is_equal(CpuSet cs) {
2575 return CpuSet.equal(this, cs);
2578 [CCode(cname = "CPU_EQUAL_S", instance_pos = -1)]
2579 public static bool equal_sized(size_t num, CpuSet cs1, CpuSet cs2);
2581 public bool is_equal_sized(size_t num, CpuSet cs) {
2582 return CpuSet.equal_sized(num, this, cs);
2585 [CCode(cname = "CPU_AND", instance_pos = -1)]
2586 public void and(CpuSet destset, CpuSet srcset);
2588 [CCode(cname = "CPU_AND_S", instance_pos = -1)]
2589 public void and_sized(size_t num, CpuSet destset, CpuSet srcset);
2591 [CCode(cname = "CPU_OR", instance_pos = -1)]
2592 public void or(CpuSet destset, CpuSet srcset);
2594 [CCode(cname = "CPU_OR_S", instance_pos = -1)]
2595 public void or_sized(size_t num, CpuSet destset, CpuSet srcset);
2597 [CCode(cname = "CPU_XOR", instance_pos = -1)]
2598 public void xor(CpuSet destset, CpuSet srcset);
2600 [CCode(cname = "CPU_XOR_S", instance_pos = -1)]
2601 public void xor_sized(size_t num, CpuSet destset, CpuSet srcset);
2603 [CCode(cname = "sched_setaffinity", instance_pos = -1)]
2604 public int setaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2606 [CCode(cname = "sched_getaffinity", instance_pos = -1)]
2607 public int getaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2609 public static CpuSet init(int num = 1) {
2610 CpuSet cpus = new CpuSet(num);
2611 var size = CpuSet.alloc_size(num);
2612 cpus.zero_sized(size);
2617 [CCode (has_target = false)]
2618 public delegate int GlobErrorFunction (string filename, int errcode);
2620 [CCode (cheader_filename = "glob.h")]
2621 public const int GLOB_ERR;
2622 [CCode (cheader_filename = "glob.h")]
2623 public const int GLOB_MARK;
2624 [CCode (cheader_filename = "glob.h")]
2625 public const int GLOB_NOSORT;
2626 [CCode (cheader_filename = "glob.h")]
2627 public const int GLOB_DOOFFS;
2628 [CCode (cheader_filename = "glob.h")]
2629 public const int GLOB_NOCHECK;
2630 [CCode (cheader_filename = "glob.h")]
2631 public const int GLOB_APPEND;
2632 [CCode (cheader_filename = "glob.h")]
2633 public const int GLOB_NOESCAPE;
2634 [CCode (cheader_filename = "glob.h")]
2635 public const int GLOB_PERIOD;
2636 [CCode (cheader_filename = "glob.h")]
2637 public const int GLOB_MAGCHAR;
2638 [CCode (cheader_filename = "glob.h")]
2639 public const int GLOB_ALTDIRFUNC;
2640 [CCode (cheader_filename = "glob.h")]
2641 public const int GLOB_BRACE;
2642 [CCode (cheader_filename = "glob.h")]
2643 public const int GLOB_NOMAGIC;
2644 [CCode (cheader_filename = "glob.h")]
2645 public const int GLOB_TILDE;
2646 [CCode (cheader_filename = "glob.h")]
2647 public const int GLOB_ONLYDIR;
2648 [CCode (cheader_filename = "glob.h")]
2649 public const int GLOB_TILDE_CHECK;
2651 [CCode (cheader_filename = "glob.h")]
2652 public const int GLOB_NOSPACE;
2653 [CCode (cheader_filename = "glob.h")]
2654 public const int GLOB_ABORTED;
2655 [CCode (cheader_filename = "glob.h")]
2656 public const int GLOB_NOMATCH;
2658 [CCode (cheader_filename = "glob.h", cname = "glob_t", destroy_function = "globfree", has_type_id = false)]
2659 public struct Glob {
2660 [CCode (cname = "gl_pathc")]
2661 public size_t pathc;
2662 [CCode (cname = "gl_pathv", array_length = false, array_null_terminated = true)]
2663 public string[] pathv;
2664 [CCode (cname = "gl_offs")]
2667 [CCode (cname = "glob", instance_pos = -1)]
2668 public int glob (string pattern, int flags = 0, GlobErrorFunction? errfunc = null);
2671 [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "", has_type_id = false)]
2672 public enum NLItem {
2730 [CCode (cheader_filename = "langinfo.h")]
2731 public unowned string nl_langinfo (NLItem item);
2733 [CCode (cheader_filename = "unistd.h")]
2734 public int getopt ([CCode (array_length_pos = 0)] string[] args, string optstring);
2735 [CCode (cheader_filename = "unistd.h")]
2736 public static string optarg;
2737 [CCode (cheader_filename = "unistd.h")]
2738 public static int optind;
2739 [CCode (cheader_filename = "unistd.h")]
2740 public static int opterr;
2741 [CCode (cheader_filename = "unistd.h")]
2742 public static int optopt;