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 (out sigset_t sigset);
1055 [CCode (cheader_filename = "signal.h")]
1056 public int sigfillset (out sigset_t sigset);
1057 [CCode (cheader_filename = "signal.h")]
1058 public int sigaddset (ref sigset_t sigset, int signo);
1059 [CCode (cheader_filename = "signal.h")]
1060 public int sigdelset (ref 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, out 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/sysmacros.h")]
1734 uint major (dev_t dev);
1735 [CCode (cheader_filename = "sys/sysmacros.h")]
1736 uint minor (dev_t dev);
1737 [CCode (cheader_filename = "sys/sysmacros.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 (cheader_filename = "time.h")]
1772 public unowned string? ctime (ref time_t clock);
1774 [CCode (cname = "struct tm", cheader_filename = "time.h", has_type_id = false)]
1784 public int tm_isdst;
1787 [CCode (cname = "struct timespec", cheader_filename = "time.h", has_type_id = false)]
1788 public struct timespec {
1789 public time_t tv_sec;
1790 public long tv_nsec;
1793 [CCode (array_length = false, cheader_filename = "time.h")]
1794 public string[] tzname;
1795 [CCode (cheader_filename = "time.h")]
1796 public const long timezone;
1797 [CCode (cheader_filename = "time.h")]
1798 public const int daylight;
1800 [CCode (cheader_filename = "time.h")]
1801 public void tzset ();
1805 [CCode (cheader_filename = "time.h", has_type_id = false)]
1806 public struct clockid_t {
1809 [CCode (cheader_filename = "time.h")]
1810 public const clockid_t CLOCK_REALTIME;
1811 [CCode (cheader_filename = "time.h")]
1812 public const clockid_t CLOCK_MONOTONIC;
1813 [CCode (cheader_filename = "time.h")]
1814 public const clockid_t CLOCK_PROCESS_CPUTIME_ID;
1815 [CCode (cheader_filename = "time.h")]
1816 public const clockid_t CLOCK_THREAD_CPUTIME_ID;
1817 [CCode (cheader_filename = "time.h")]
1818 public const clockid_t CLOCK_REALTIME_COARSE;
1819 [CCode (cheader_filename = "time.h")]
1820 public const clockid_t CLOCK_MONOTONIC_COARSE;
1822 [CCode (cheader_filename = "time.h")]
1823 int clock_gettime (clockid_t clk_id, out timespec tp);
1825 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1826 public int getpriority (int which, int who);
1827 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1828 public int setpriority (int which, int who, int prio);
1830 [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h", has_type_id = false)]
1831 public struct iovector {
1832 public void* iov_base;
1833 public size_t iov_len;
1836 [CCode (cheader_filename = "unistd.h")]
1837 public int close (int fd);
1838 [CCode (cheader_filename = "unistd.h")]
1839 public int execl (string path, params string[] arg);
1840 [CCode (cheader_filename = "unistd.h")]
1841 public int execlp (string path, params string[] arg);
1842 [CCode (cheader_filename = "unistd.h")]
1843 public int execv (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
1844 [CCode (cheader_filename = "unistd.h")]
1845 public int execvp (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
1846 [CCode (cheader_filename = "unistd.h")]
1847 public int pipe ([CCode (array_length = false, null_terminated = false)] int[] pipefd);
1848 [CCode (cheader_filename = "unistd.h")]
1849 public ssize_t read (int fd, void* buf, size_t count);
1850 [CCode (cheader_filename = "unistd.h")]
1851 public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
1852 [CCode (cheader_filename = "unistd.h")]
1853 public ssize_t readlink (string path, char[] buf);
1854 [CCode (cheader_filename = "sys/uio.h")]
1855 public ssize_t readv (int fd, iovector vector, int iovcnt = 1);
1856 [CCode (cname = "readv", cheader_filename = "sys/uio.h")]
1857 public ssize_t read_vectors (int fd, iovector[] vector);
1858 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1859 public int setgid (gid_t gid);
1860 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1861 public int setuid (uid_t uid);
1862 [CCode (cheader_filename = "unistd.h")]
1863 public int unlink (string filename);
1864 [CCode (cheader_filename = "unistd.h")]
1865 public ssize_t write (int fd, void* buf, size_t count);
1866 [CCode (cheader_filename = "unistd.h")]
1867 public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
1868 [CCode (cheader_filename = "sys/uio.h")]
1869 public ssize_t writev (int fd, iovector vector, int iovcnt = 1);
1870 [CCode (cname = "writev", cheader_filename = "sys/uio.h")]
1871 public ssize_t write_vectors (int fd, iovector[] vector);
1872 [CCode (cheader_filename = "unistd.h")]
1873 public off_t lseek(int fildes, off_t offset, int whence);
1875 [CCode (cheader_filename = "unistd.h")]
1876 public const int SEEK_SET;
1877 [CCode (cheader_filename = "unistd.h")]
1878 public const int SEEK_CUR;
1879 [CCode (cheader_filename = "unistd.h")]
1880 public const int SEEK_END;
1882 [CCode (cheader_filename = "unistd.h")]
1883 public pid_t fork ();
1884 [CCode (cheader_filename = "unistd.h")]
1885 public pid_t vfork ();
1886 [CCode (cheader_filename = "unistd.h")]
1887 public unowned string ttyname (int fd);
1888 [CCode (cheader_filename = "unistd.h")]
1889 public int ttyname_r (int fd, char[] buf);
1890 [CCode (cheader_filename = "unistd.h")]
1891 public bool isatty (int fd);
1892 [CCode (cheader_filename = "unistd.h")]
1893 public int link (string from, string to);
1894 [CCode (cheader_filename = "unistd.h")]
1895 public int symlink (string from, string to);
1896 [CCode (cheader_filename = "unistd.h")]
1897 public long sysconf (int name);
1898 [CCode (cheader_filename = "unistd.h")]
1899 public int rmdir (string path);
1900 [CCode (cheader_filename = "unistd.h")]
1901 public pid_t tcgetpgrp (int fd);
1902 [CCode (cheader_filename = "unistd.h")]
1903 public int tcsetpgrp (int fd, pid_t pgrp_id);
1904 [CCode (cheader_filename = "unistd.h")]
1905 public unowned string getlogin ();
1906 [CCode (cheader_filename = "unistd.h")]
1907 public int vhangup ();
1908 [CCode (cheader_filename = "unistd.h")]
1909 public int revoke (string file);
1910 [CCode (cheader_filename = "unistd.h")]
1911 public int acct (string name);
1912 [CCode (cheader_filename = "unistd.h")]
1913 public unowned string getusershell ();
1914 [CCode (cheader_filename = "unistd.h")]
1915 public void endusershell ();
1916 [CCode (cheader_filename = "unistd.h")]
1917 public void setusershell ();
1918 [CCode (cheader_filename = "unistd.h")]
1919 public int chroot (string path);
1920 [Version (deprecated_since = "POSIX.2", replacement = "termios ECHO flag")]
1921 [CCode (cheader_filename = "unistd.h")]
1922 public unowned string getpass (string promt);
1926 * To expose Posix crypt() GNU's libc and others require the feature test
1927 * macro _XOPEN_SOURCE to be defined. See man 3 crypt.
1928 * A VAPI is unable to define and emit this macro before all include files
1929 * Instead use valac -X -D_XOPEN_SOURCE
1931 [CCode (cheader_filename = "unistd.h")]
1932 public unowned string crypt (string key, string salt);
1933 [CCode (cheader_filename = "unistd.h")]
1934 public int getpagesize ();
1935 [CCode (cheader_filename = "unistd.h")]
1936 public int getdtablesize ();
1938 [CCode (cheader_filename = "unistd.h")]
1939 public const int _SC_ARG_MAX;
1940 [CCode (cheader_filename = "unistd.h")]
1941 public const int _SC_CHILD_MAX;
1942 [CCode (cheader_filename = "unistd.h")]
1943 public const int _SC_HOST_NAME_MAX;
1944 [CCode (cheader_filename = "unistd.h")]
1945 public const int _SC_LOGIN_NAME_MAX;
1946 [CCode (cheader_filename = "unistd.h")]
1947 public const int _SC_CLK_TCK;
1948 [CCode (cheader_filename = "unistd.h")]
1949 public const int _SC_OPEN_MAX;
1950 [CCode (cheader_filename = "unistd.h")]
1951 public const int _SC_PAGESIZE;
1952 [CCode (cheader_filename = "unistd.h")]
1953 public const int _SC_RE_DUP_MAX;
1954 [CCode (cheader_filename = "unistd.h")]
1955 public const int _SC_STREAM_MAX;
1956 [CCode (cheader_filename = "unistd.h")]
1957 public const int _SC_SYMLOOP_MAX;
1958 [CCode (cheader_filename = "unistd.h")]
1959 public const int _SC_TTY_NAME_MAX;
1960 [CCode (cheader_filename = "unistd.h")]
1961 public const int _SC_TZNAME_MAX;
1962 [CCode (cheader_filename = "unistd.h")]
1963 public const int _SC_VERSION;
1964 [CCode (cheader_filename = "unistd.h")]
1965 public const int _SC_BASE_MAX;
1966 [CCode (cheader_filename = "unistd.h")]
1967 public const int _SC_BC_DIM_MAX;
1968 [CCode (cheader_filename = "unistd.h")]
1969 public const int _SC_BC_SCALE_MAX;
1970 [CCode (cheader_filename = "unistd.h")]
1971 public const int _SC_BC_STRING_MAX;
1972 [CCode (cheader_filename = "unistd.h")]
1973 public const int _SC_COLL_WEIGHTS_MAX;
1974 [CCode (cheader_filename = "unistd.h")]
1975 public const int _SC_EXRP_NEST_MAX;
1976 [CCode (cheader_filename = "unistd.h")]
1977 public const int _SC_LINE_MAX;
1978 [CCode (cheader_filename = "unistd.h")]
1979 public const int _SC_2_VERSION;
1980 [CCode (cheader_filename = "unistd.h")]
1981 public const int _SC_2_C_DEV;
1982 [CCode (cheader_filename = "unistd.h")]
1983 public const int _SC_2_FORT_DEV;
1984 [CCode (cheader_filename = "unistd.h")]
1985 public const int _SC_2_FORT_RUN;
1986 [CCode (cheader_filename = "unistd.h")]
1987 public const int _SC_2_LOCALEDEF;
1988 [CCode (cheader_filename = "unistd.h")]
1989 public const int _SC_2_SW_DEV;
1991 [CCode (cheader_filename = "unistd.h")]
1992 public const int STDIN_FILENO;
1993 [CCode (cheader_filename = "unistd.h")]
1994 public const int STDOUT_FILENO;
1995 [CCode (cheader_filename = "unistd.h")]
1996 public const int STDERR_FILENO;
1997 [CCode (cheader_filename = "unistd.h")]
1998 public const int R_OK;
1999 [CCode (cheader_filename = "unistd.h")]
2000 public const int W_OK;
2001 [CCode (cheader_filename = "unistd.h")]
2002 public const int X_OK;
2003 [CCode (cheader_filename = "unistd.h")]
2004 public const int F_OK;
2006 [CCode (cheader_filename = "unistd.h")]
2007 public int access (string patchname, int mode);
2008 [CCode (cheader_filename = "unistd.h")]
2009 public int euidaccess (string patchname, int mode);
2010 [CCode (cheader_filename = "unistd.h")]
2011 public int eaccess (string patchname, int mode);
2013 [CCode (cheader_filename = "unistd.h")]
2014 public uint alarm (uint seconds);
2015 [CCode (cheader_filename = "unistd.h")]
2016 public uint ualarm (uint useconds);
2017 [CCode (cheader_filename = "unistd.h")]
2018 public uint sleep (uint seconds);
2019 [CCode (cheader_filename = "unistd.h")]
2020 public uint usleep (uint useconds);
2021 [CCode (cheader_filename = "unistd.h")]
2022 public int pause ();
2023 [CCode (cheader_filename = "unistd.h")]
2024 public int chown (string filename, uid_t owner, gid_t group);
2025 [CCode (cheader_filename = "unistd.h")]
2026 public int fchown (int fd, uid_t owner, gid_t group);
2027 [CCode (cheader_filename = "unistd.h")]
2028 public int lchown (string filename, uid_t owner, gid_t group);
2029 [CCode (cheader_filename = "unistd.h")]
2030 public int chdir (string filepath);
2031 [CCode (cheader_filename = "unistd.h")]
2032 public int fchdir (int file);
2033 [CCode (cheader_filename = "unistd.h")]
2034 public int dup (int fd);
2035 [CCode (cheader_filename = "unistd.h")]
2036 public int dup2 (int fd1, int fd2);
2037 [CCode (cheader_filename = "unistd.h")]
2038 public int gethostname (char[] name);
2039 [CCode (cheader_filename = "unistd.h")]
2040 public pid_t getpid ();
2041 [CCode (cheader_filename = "unistd.h")]
2042 public pid_t getppid ();
2043 [CCode (cheader_filename = "unistd.h")]
2044 public pid_t getpgrp ();
2045 [CCode (cheader_filename = "unistd.h")]
2046 public pid_t getpgid (pid_t pid);
2047 [CCode (cheader_filename = "unistd.h")]
2048 public int setpgid (pid_t pid, pid_t pgid);
2049 [CCode (cheader_filename = "unistd.h")]
2050 public pid_t setpgrp ();
2051 [CCode (cheader_filename = "unistd.h")]
2052 public pid_t getsid (pid_t pid);
2053 [CCode (cheader_filename = "unistd.h")]
2054 public uid_t getuid ();
2055 [CCode (cheader_filename = "unistd.h")]
2056 public uid_t geteuid ();
2057 [CCode (cheader_filename = "unistd.h")]
2058 public gid_t getgid ();
2059 [CCode (cheader_filename = "unistd.h")]
2060 public gid_t getegid ();
2061 [CCode (cheader_filename = "unistd.h")]
2062 public int group_member (gid_t gid);
2063 [CCode (cheader_filename = "unistd.h")]
2064 public pid_t setsid ();
2065 [CCode (cheader_filename = "unistd.h")]
2066 public pid_t tcgetsid (int fd);
2068 [CCode (cheader_filename = "unistd.h")]
2069 public int fsync (int fd);
2070 [CCode (cheader_filename = "unistd.h")]
2071 public int fdatasync (int fd);
2072 [CCode (cheader_filename = "unistd.h")]
2075 [CCode (cheader_filename = "unistd.h")]
2076 public int ftruncate(int fd, off_t length);
2077 [CCode (cheader_filename = "unistd.h")]
2078 public int truncate(string path, off_t length);
2079 [CCode (cheader_filename = "unistd.h")]
2080 public int nice (int inc);
2083 [CCode (cname = "cc_t", cheader_filename = "termios.h", has_type_id = false)]
2084 [IntegerType (rank = 3, min = 0, max = 255)]
2085 public struct cc_t {
2089 [CCode (cname = "speed_t", cheader_filename = "termios.h", has_type_id = false)]
2090 [IntegerType (rank = 7)]
2091 public struct speed_t {
2095 [CCode (cname = "tcflag_t", cheader_filename = "termios.h", has_type_id = false)]
2096 [IntegerType (rank = 7)]
2097 public struct tcflag_t {
2100 [CCode (cname="struct termios", cheader_filename = "termios.h", has_type_id = false)]
2101 public struct termios
2103 public tcflag_t c_iflag;
2104 public tcflag_t c_oflag;
2105 public tcflag_t c_cflag;
2106 public tcflag_t c_lflag;
2108 public cc_t c_cc[32];
2109 public speed_t c_ispeed;
2110 public speed_t c_ospeed;
2113 [CCode (cheader_filename = "termios.h")]
2114 public int tcgetattr (int fd, out termios termios_p);
2115 [CCode (cheader_filename = "termios.h")]
2116 public int tcsetattr (int fd, int optional_actions, termios termios_p);
2117 [CCode (cheader_filename = "termios.h")]
2118 public int tcsendbreak (int fd, int duration);
2119 [CCode (cheader_filename = "termios.h")]
2120 public int tcdrain (int fd);
2121 [CCode (cheader_filename = "termios.h")]
2122 public int tcflush (int fd, int queue_selector);
2123 [CCode (cheader_filename = "termios.h")]
2124 public int tcflow (int fd, int action);
2125 [CCode (cheader_filename = "termios.h")]
2126 public void cfmakeraw (ref termios termios_p);
2127 [CCode (cheader_filename = "termios.h")]
2128 public speed_t cfgetispeed (termios termios_p);
2129 [CCode (cheader_filename = "termios.h")]
2130 public speed_t cfgetospeed (termios termios_p);
2131 [CCode (cheader_filename = "termios.h")]
2132 public int cfsetispeed (ref termios termios_p, speed_t speed);
2133 [CCode (cheader_filename = "termios.h")]
2134 public int cfsetospeed (ref termios termios_p, speed_t speed);
2135 [CCode (cheader_filename = "termios.h")]
2136 public int cfsetspeed (ref termios termios, speed_t speed);
2139 [CCode (cheader_filename = "termios.h")]
2140 public const tcflag_t IGNBRK;
2141 [CCode (cheader_filename = "termios.h")]
2142 public const tcflag_t BRKINT;
2143 [CCode (cheader_filename = "termios.h")]
2144 public const tcflag_t IGNPAR;
2145 [CCode (cheader_filename = "termios.h")]
2146 public const tcflag_t PARMRK;
2147 [CCode (cheader_filename = "termios.h")]
2148 public const tcflag_t INPCK;
2149 [CCode (cheader_filename = "termios.h")]
2150 public const tcflag_t ISTRIP;
2151 [CCode (cheader_filename = "termios.h")]
2152 public const tcflag_t INLCR;
2153 [CCode (cheader_filename = "termios.h")]
2154 public const tcflag_t IGNCR;
2155 [CCode (cheader_filename = "termios.h")]
2156 public const tcflag_t IXON;
2157 [CCode (cheader_filename = "termios.h")]
2158 public const tcflag_t IXANY;
2159 [CCode (cheader_filename = "termios.h")]
2160 public const tcflag_t IXOFF;
2161 [CCode (cheader_filename = "termios.h")]
2162 public const tcflag_t ICRNL;
2165 [CCode (cheader_filename = "termios.h")]
2166 public const tcflag_t OPOST;
2167 [CCode (cheader_filename = "termios.h")]
2168 public const tcflag_t ONLCR;
2169 [CCode (cheader_filename = "termios.h")]
2170 public const tcflag_t OCRNL;
2171 [CCode (cheader_filename = "termios.h")]
2172 public const tcflag_t ONOCR;
2173 [CCode (cheader_filename = "termios.h")]
2174 public const tcflag_t ONLRET;
2175 [CCode (cheader_filename = "termios.h")]
2176 public const tcflag_t OFILL;
2177 [CCode (cheader_filename = "termios.h")]
2178 public const tcflag_t NLDLY;
2179 [CCode (cheader_filename = "termios.h")]
2180 public const tcflag_t NL0;
2181 [CCode (cheader_filename = "termios.h")]
2182 public const tcflag_t NL1;
2183 [CCode (cheader_filename = "termios.h")]
2184 public const tcflag_t CRDLY;
2185 [CCode (cheader_filename = "termios.h")]
2186 public const tcflag_t CR0;
2187 [CCode (cheader_filename = "termios.h")]
2188 public const tcflag_t CR1;
2189 [CCode (cheader_filename = "termios.h")]
2190 public const tcflag_t CR2;
2191 [CCode (cheader_filename = "termios.h")]
2192 public const tcflag_t CR3;
2193 [CCode (cheader_filename = "termios.h")]
2194 public const tcflag_t TABDLY;
2195 [CCode (cheader_filename = "termios.h")]
2196 public const tcflag_t TAB0;
2197 [CCode (cheader_filename = "termios.h")]
2198 public const tcflag_t TAB1;
2199 [CCode (cheader_filename = "termios.h")]
2200 public const tcflag_t TAB2;
2201 [CCode (cheader_filename = "termios.h")]
2202 public const tcflag_t TAB3;
2203 [CCode (cheader_filename = "termios.h")]
2204 public const tcflag_t BSDLY;
2205 [CCode (cheader_filename = "termios.h")]
2206 public const tcflag_t BS0;
2207 [CCode (cheader_filename = "termios.h")]
2208 public const tcflag_t BS1;
2209 [CCode (cheader_filename = "termios.h")]
2210 public const tcflag_t VTDLY;
2211 [CCode (cheader_filename = "termios.h")]
2212 public const tcflag_t VT0;
2213 [CCode (cheader_filename = "termios.h")]
2214 public const tcflag_t VT1;
2215 [CCode (cheader_filename = "termios.h")]
2216 public const tcflag_t FFDLY;
2217 [CCode (cheader_filename = "termios.h")]
2218 public const tcflag_t FF0;
2219 [CCode (cheader_filename = "termios.h")]
2220 public const tcflag_t FF1;
2223 [CCode (cheader_filename = "termios.h")]
2224 public const tcflag_t CSIZE;
2225 [CCode (cheader_filename = "termios.h")]
2226 public const tcflag_t CS5;
2227 [CCode (cheader_filename = "termios.h")]
2228 public const tcflag_t CS6;
2229 [CCode (cheader_filename = "termios.h")]
2230 public const tcflag_t CS7;
2231 [CCode (cheader_filename = "termios.h")]
2232 public const tcflag_t CS8;
2233 [CCode (cheader_filename = "termios.h")]
2234 public const tcflag_t CSTOPB;
2235 [CCode (cheader_filename = "termios.h")]
2236 public const tcflag_t CREAD;
2237 [CCode (cheader_filename = "termios.h")]
2238 public const tcflag_t PARENB;
2239 [CCode (cheader_filename = "termios.h")]
2240 public const tcflag_t PARODD;
2241 [CCode (cheader_filename = "termios.h")]
2242 public const tcflag_t HUPCL;
2243 [CCode (cheader_filename = "termios.h")]
2244 public const tcflag_t CLOCAL;
2247 [CCode (cheader_filename = "termios.h")]
2248 public const tcflag_t ISIG;
2249 [CCode (cheader_filename = "termios.h")]
2250 public const tcflag_t ICANON;
2251 [CCode (cheader_filename = "termios.h")]
2252 public const tcflag_t ECHO;
2253 [CCode (cheader_filename = "termios.h")]
2254 public const tcflag_t ECHOE;
2255 [CCode (cheader_filename = "termios.h")]
2256 public const tcflag_t ECHOK;
2257 [CCode (cheader_filename = "termios.h")]
2258 public const tcflag_t ECHONL;
2259 [CCode (cheader_filename = "termios.h")]
2260 public const tcflag_t NOFLSH;
2261 [CCode (cheader_filename = "termios.h")]
2262 public const tcflag_t TOSTOP;
2263 [CCode (cheader_filename = "termios.h")]
2264 public const tcflag_t IEXTEN;
2267 [CCode (cheader_filename = "termios.h")]
2268 public const int VINTR;
2269 [CCode (cheader_filename = "termios.h")]
2270 public const int VQUIT;
2271 [CCode (cheader_filename = "termios.h")]
2272 public const int VERASE;
2273 [CCode (cheader_filename = "termios.h")]
2274 public const int VKILL;
2275 [CCode (cheader_filename = "termios.h")]
2276 public const int VEOF;
2277 [CCode (cheader_filename = "termios.h")]
2278 public const int VMIN;
2279 [CCode (cheader_filename = "termios.h")]
2280 public const int VEOL;
2281 [CCode (cheader_filename = "termios.h")]
2282 public const int VTIME;
2283 [CCode (cheader_filename = "termios.h")]
2284 public const int VSTART;
2285 [CCode (cheader_filename = "termios.h")]
2286 public const int VSTOP;
2287 [CCode (cheader_filename = "termios.h")]
2288 public const int VSUSP;
2291 [CCode (cheader_filename = "termios.h")]
2292 public const int TCSANOW;
2293 [CCode (cheader_filename = "termios.h")]
2294 public const int TCSADRAIN;
2295 [CCode (cheader_filename = "termios.h")]
2296 public const int TCSAFLUSH;
2299 [CCode (cheader_filename = "termios.h")]
2300 public const int TCIFLUSH;
2301 [CCode (cheader_filename = "termios.h")]
2302 public const int TCOFLUSH;
2303 [CCode (cheader_filename = "termios.h")]
2304 public const int TCIOFLUSH;
2307 [CCode (cheader_filename = "termios.h")]
2308 public const int TCOOFF;
2309 [CCode (cheader_filename = "termios.h")]
2310 public const int TCOON;
2311 [CCode (cheader_filename = "termios.h")]
2312 public const int TCIOFF;
2313 [CCode (cheader_filename = "termios.h")]
2314 public const int TCION;
2317 [CCode (cheader_filename = "termios.h")]
2318 public const speed_t B0;
2319 [CCode (cheader_filename = "termios.h")]
2320 public const speed_t B50;
2321 [CCode (cheader_filename = "termios.h")]
2322 public const speed_t B75;
2323 [CCode (cheader_filename = "termios.h")]
2324 public const speed_t B110;
2325 [CCode (cheader_filename = "termios.h")]
2326 public const speed_t B134;
2327 [CCode (cheader_filename = "termios.h")]
2328 public const speed_t B150;
2329 [CCode (cheader_filename = "termios.h")]
2330 public const speed_t B200;
2331 [CCode (cheader_filename = "termios.h")]
2332 public const speed_t B300;
2333 [CCode (cheader_filename = "termios.h")]
2334 public const speed_t B600;
2335 [CCode (cheader_filename = "termios.h")]
2336 public const speed_t B1200;
2337 [CCode (cheader_filename = "termios.h")]
2338 public const speed_t B1800;
2339 [CCode (cheader_filename = "termios.h")]
2340 public const speed_t B2400;
2341 [CCode (cheader_filename = "termios.h")]
2342 public const speed_t B4800;
2343 [CCode (cheader_filename = "termios.h")]
2344 public const speed_t B9600;
2345 [CCode (cheader_filename = "termios.h")]
2346 public const speed_t B19200;
2347 [CCode (cheader_filename = "termios.h")]
2348 public const speed_t B38400;
2349 [CCode (cheader_filename = "termios.h")]
2350 public const speed_t B57600;
2351 [CCode (cheader_filename = "termios.h")]
2352 public const speed_t B115200;
2353 [CCode (cheader_filename = "termios.h")]
2354 public const speed_t B230400;
2356 [CCode (cname = "fd_set", cheader_filename = "sys/select.h", has_type_id = false)]
2357 public struct fd_set {
2360 [CCode (cname = "struct timeval", cheader_filename = "sys/time.h", has_type_id = false)]
2361 public struct timeval {
2362 public time_t tv_sec;
2363 public long tv_usec;
2364 [CCode (cname = "gettimeofday")]
2365 public int get_time_of_day (void * timezone = null);
2366 [CCode (cname = "settimeofday")]
2367 public int set_time_of_day (void * timezone = null);
2370 [CCode (cname = "sigset_t", cheader_filename = "sys/select.h", has_type_id = false)]
2371 public struct sigset_t {
2374 [CCode (cheader_filename = "sys/select.h")]
2375 public int select (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval timeout);
2376 [CCode (cheader_filename = "sys/select.h")]
2377 public void FD_CLR (int fd, ref fd_set @set);
2378 [CCode (cheader_filename = "sys/select.h")]
2379 public int FD_ISSET (int fd, fd_set @set);
2380 [CCode (cheader_filename = "sys/select.h")]
2381 public void FD_SET (int fd, ref fd_set @set);
2382 [CCode (cheader_filename = "sys/select.h")]
2383 public void FD_ZERO (out fd_set @set);
2384 [CCode (cheader_filename = "sys/select.h")]
2385 public int pselect (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timespec timeout, sigset_t sigmask);
2387 // sys/mman.h - Posix mmap(), munmap(), mprotect()
2388 [CCode (cheader_filename = "sys/mman.h")]
2389 public void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2390 [CCode (cheader_filename = "sys/mman.h")]
2391 public int munmap(void *addr, size_t length);
2392 [CCode (cheader_filename = "sys/mman.h")]
2393 public int mprotect(void *addr, size_t len, int prot);
2394 [CCode (cheader_filename = "sys/mman.h")]
2395 public const int PROT_READ;
2396 [CCode (cheader_filename = "sys/mman.h")]
2397 public const int PROT_WRITE;
2398 [CCode (cheader_filename = "sys/mman.h")]
2399 public const int PROT_EXEC;
2400 [CCode (cheader_filename = "sys/mman.h")]
2401 public const int MAP_SHARED;
2402 [CCode (cheader_filename = "sys/mman.h")]
2403 public const int MAP_PRIVATE;
2404 [CCode (cheader_filename = "sys/mman.h")]
2405 public const int MAP_FIXED;
2406 [CCode (cheader_filename = "sys/mman.h")]
2407 public void *MAP_FAILED;
2408 // sys/mman.h - [MLR] Range Memory Locking
2409 [CCode (cheader_filename = "sys/mman.h")]
2410 public int mlock(void *addr, size_t len);
2411 [CCode (cheader_filename = "sys/mman.h")]
2412 public int munlock(void *addr, size_t len);
2413 // sys/mman.h - Process Memory Locking
2414 [CCode (cheader_filename = "sys/mman.h")]
2415 public const int MCL_CURRENT;
2416 [CCode (cheader_filename = "sys/mman.h")]
2417 public const int MCL_FUTURE;
2418 [CCode (cheader_filename = "sys/mman.h")]
2419 public int mlockall (int flags);
2420 [CCode (cheader_filename = "sys/mman.h")]
2421 public int munlockall ();
2422 // sys/mman.h - [XSI] X/Open System Interfaces
2423 [CCode (cheader_filename = "sys/mman.h")]
2424 public int msync(void *addr, size_t len, int flags);
2425 [CCode (cheader_filename = "sys/mman.h")]
2426 public const int MS_ASYNC;
2427 [CCode (cheader_filename = "sys/mman.h")]
2428 public const int MS_INVALIDATE;
2429 [CCode (cheader_filename = "sys/mman.h")]
2430 public const int MS_SYNC;
2432 [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h", has_type_id = false)]
2433 public struct utsname {
2434 public unowned string sysname;
2435 public unowned string nodename;
2436 public unowned string release;
2437 public unowned string version;
2438 public unowned string machine;
2439 [CCode (cname = "uname")]
2444 [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")]
2446 [CCode (cname = "EOF", cheader_filename = "stdio.h")]
2447 public const int EOF;
2448 [CCode (cname = "SEEK_SET", cheader_filename = "stdio.h")]
2449 public const int SEEK_SET;
2450 [CCode (cname = "SEEK_CUR", cheader_filename = "stdio.h")]
2451 public const int SEEK_CUR;
2452 [CCode (cname = "SEEK_END", cheader_filename = "stdio.h")]
2453 public const int SEEK_END;
2455 [CCode (cname = "fopen")]
2456 public static FILE? open (string path, string mode);
2457 [CCode (cname = "fdopen")]
2458 public static FILE? fdopen (int fildes, string mode);
2459 [CCode (cname = "popen")]
2460 public static FILE? popen (string command, string mode);
2462 [CCode (cname = "fprintf")]
2464 public int printf (string format, ...);
2465 [CCode (cname = "fputc", instance_pos = -1)]
2466 public int putc (char c);
2467 [CCode (cname = "fputs", instance_pos = -1)]
2468 public int puts (string s);
2469 [CCode (cname = "fwrite", instance_pos = -1)]
2470 public size_t write (void *ptr, size_t size, size_t nmemb);
2471 [CCode (cname = "fread", instance_pos = -1)]
2472 public size_t read (void *ptr, size_t size, size_t nmemb);
2473 [CCode (cname = "fgetc")]
2475 [CCode (cname = "fgets", instance_pos = -1)]
2476 public unowned string? gets (char[] s);
2477 [CCode (cname = "feof")]
2479 [CCode (cname = "fscanf"), ScanfFormat]
2480 public int scanf (string format, ...);
2481 [CCode (cname = "fflush")]
2482 public int flush ();
2483 [CCode (cname = "fseek")]
2484 public int seek (long offset, int whence);
2485 [CCode (cname = "ftell")]
2486 public long tell ();
2487 [CCode (cname = "rewind")]
2488 public void rewind ();
2489 [CCode (cname = "fileno")]
2490 public int fileno ();
2491 [CCode (cname = "ferror")]
2492 public int error ();
2493 [CCode (cname = "clearerr")]
2494 public void clearerr ();
2497 public static FILE stderr;
2498 public static FILE stdout;
2499 public static FILE stdin;
2501 [CCode(cheader_filename = "sched.h", cprefix = "sched_")]
2504 [CCode (cname = "struct sched_param", has_type_id = false)]
2505 public struct Param {
2506 public int sched_priority;
2509 public static int setparam(Posix.pid_t pid, ref Sched.Param param);
2510 public static int getparam(Posix.pid_t pid, out Sched.Param param);
2512 public static int setscheduler(Posix.pid_t pid, Algorithm policy, ref Sched.Param param);
2513 public static Algorithm getscheduler(Posix.pid_t pid);
2515 public static int @yield();
2517 public static int get_priority_max(int algorithm);
2518 public static int get_priority_min(int algorithm);
2520 public static int rr_get_interval(Posix.pid_t pid, out Posix.timespec? interval);
2522 [CCode (cprefix = "SCHED_", cname = "int", has_type_id = false)]
2523 public enum Algorithm {
2533 [CCode(cheader_filename = "sched.h", cname = "cpu_set_t", free_function = "CPU_FREE", copy_function="memcpy")]
2534 public class CpuSet {
2535 [CCode(cname = "CPU_ALLOC")]
2536 public CpuSet(int num = 1);
2538 [CCode(cname = "CPU_ALLOC_SIZE")]
2539 public static size_t alloc_size(int num = 1);
2541 [CCode(cname = "CPU_SETSIZE")]
2542 public static size_t size;
2544 [CCode(cname = "CPU_COUNT")]
2547 [CCode(cname = "CPU_COUNT_S", instance_pos = -1)]
2548 public int count_sized(size_t num);
2550 [CCode(cname = "CPU_ZERO")]
2553 [CCode(cname = "CPU_ZERO_S", instance_pos = -1)]
2554 public void zero_sized(size_t num);
2556 [CCode(cname = "CPU_SET", instance_pos = -1)]
2557 public void @set(int cpu);
2559 [CCode(cname = "CPU_SET_S", instance_pos = -1)]
2560 public void @set_sized(int cpu, size_t num);
2562 [CCode(cname = "CPU_CLR", instance_pos = -1)]
2563 public void clr(int cpu);
2565 [CCode(cname = "CPU_CLR_S", instance_pos = -1)]
2566 public void clr_sized(int cpu, size_t num);
2568 [CCode(cname = "CPU_ISSET", instance_pos = -1)]
2569 public bool is_set(int cpu);
2571 [CCode(cname = "CPU_ISSET_S", instance_pos = -1)]
2572 public bool is_set_sized(int cpu, size_t num);
2574 [CCode(cname = "CPU_EQUAL")]
2575 public static bool equal(CpuSet cs1, CpuSet cs2);
2577 public bool is_equal(CpuSet cs) {
2578 return CpuSet.equal(this, cs);
2581 [CCode(cname = "CPU_EQUAL_S", instance_pos = -1)]
2582 public static bool equal_sized(size_t num, CpuSet cs1, CpuSet cs2);
2584 public bool is_equal_sized(size_t num, CpuSet cs) {
2585 return CpuSet.equal_sized(num, this, cs);
2588 [CCode(cname = "CPU_AND", instance_pos = -1)]
2589 public void and(CpuSet destset, CpuSet srcset);
2591 [CCode(cname = "CPU_AND_S", instance_pos = -1)]
2592 public void and_sized(size_t num, CpuSet destset, CpuSet srcset);
2594 [CCode(cname = "CPU_OR", instance_pos = -1)]
2595 public void or(CpuSet destset, CpuSet srcset);
2597 [CCode(cname = "CPU_OR_S", instance_pos = -1)]
2598 public void or_sized(size_t num, CpuSet destset, CpuSet srcset);
2600 [CCode(cname = "CPU_XOR", instance_pos = -1)]
2601 public void xor(CpuSet destset, CpuSet srcset);
2603 [CCode(cname = "CPU_XOR_S", instance_pos = -1)]
2604 public void xor_sized(size_t num, CpuSet destset, CpuSet srcset);
2606 [CCode(cname = "sched_setaffinity", instance_pos = -1)]
2607 public int setaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2609 [CCode(cname = "sched_getaffinity", instance_pos = -1)]
2610 public int getaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2612 public static CpuSet init(int num = 1) {
2613 CpuSet cpus = new CpuSet(num);
2614 var size = CpuSet.alloc_size(num);
2615 cpus.zero_sized(size);
2620 [CCode (has_target = false)]
2621 public delegate int GlobErrorFunction (string filename, int errcode);
2623 [CCode (cheader_filename = "glob.h")]
2624 public const int GLOB_ERR;
2625 [CCode (cheader_filename = "glob.h")]
2626 public const int GLOB_MARK;
2627 [CCode (cheader_filename = "glob.h")]
2628 public const int GLOB_NOSORT;
2629 [CCode (cheader_filename = "glob.h")]
2630 public const int GLOB_DOOFFS;
2631 [CCode (cheader_filename = "glob.h")]
2632 public const int GLOB_NOCHECK;
2633 [CCode (cheader_filename = "glob.h")]
2634 public const int GLOB_APPEND;
2635 [CCode (cheader_filename = "glob.h")]
2636 public const int GLOB_NOESCAPE;
2637 [CCode (cheader_filename = "glob.h")]
2638 public const int GLOB_PERIOD;
2639 [CCode (cheader_filename = "glob.h")]
2640 public const int GLOB_MAGCHAR;
2641 [CCode (cheader_filename = "glob.h")]
2642 public const int GLOB_ALTDIRFUNC;
2643 [CCode (cheader_filename = "glob.h")]
2644 public const int GLOB_BRACE;
2645 [CCode (cheader_filename = "glob.h")]
2646 public const int GLOB_NOMAGIC;
2647 [CCode (cheader_filename = "glob.h")]
2648 public const int GLOB_TILDE;
2649 [CCode (cheader_filename = "glob.h")]
2650 public const int GLOB_ONLYDIR;
2651 [CCode (cheader_filename = "glob.h")]
2652 public const int GLOB_TILDE_CHECK;
2654 [CCode (cheader_filename = "glob.h")]
2655 public const int GLOB_NOSPACE;
2656 [CCode (cheader_filename = "glob.h")]
2657 public const int GLOB_ABORTED;
2658 [CCode (cheader_filename = "glob.h")]
2659 public const int GLOB_NOMATCH;
2661 [CCode (cheader_filename = "glob.h", cname = "glob_t", destroy_function = "globfree", has_type_id = false)]
2662 public struct Glob {
2663 [CCode (cname = "gl_pathc")]
2664 public size_t pathc;
2665 [CCode (cname = "gl_pathv", array_length = false, array_null_terminated = true)]
2666 public string[] pathv;
2667 [CCode (cname = "gl_offs")]
2670 [CCode (cname = "glob", instance_pos = -1)]
2671 public int glob (string pattern, int flags = 0, GlobErrorFunction? errfunc = null);
2674 [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "", has_type_id = false)]
2675 public enum NLItem {
2733 [CCode (cheader_filename = "langinfo.h")]
2734 public unowned string nl_langinfo (NLItem item);
2736 [CCode (cheader_filename = "unistd.h")]
2737 public int getopt ([CCode (array_length_pos = 0)] string[] args, string optstring);
2738 [CCode (cheader_filename = "unistd.h")]
2739 public static string optarg;
2740 [CCode (cheader_filename = "unistd.h")]
2741 public static int optind;
2742 [CCode (cheader_filename = "unistd.h")]
2743 public static int opterr;
2744 [CCode (cheader_filename = "unistd.h")]
2745 public static int optopt;