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;
340 [CCode(cheader_filename = "fnmatch.h")]
341 public int fnmatch (string pattern, string str, int flags = 0);
343 [CCode(cheader_filename = "fnmatch.h", feature_test_macro = "_GNU_SOURCE")]
344 public const int FNM_CASEFOLD;
345 [CCode(cheader_filename = "fnmatch.h", feature_test_macro = "_GNU_SOURCE")]
346 public const int FNM_EXTMATCH;
347 [CCode(cheader_filename = "fnmatch.h", feature_test_macro = "_GNU_SOURCE")]
348 public const int FNM_FILE_NAME;
349 [CCode(cheader_filename = "fnmatch.h", feature_test_macro = "_GNU_SOURCE")]
350 public const int FNM_LEADING_DIR;
351 [CCode(cheader_filename = "fnmatch.h")]
352 public const int FNM_NOESCAPE;
353 [CCode(cheader_filename = "fnmatch.h")]
354 public const int FNM_NOMATCH;
355 [CCode(cheader_filename = "fnmatch.h")]
356 public const int FNM_PATHNAME;
357 [CCode(cheader_filename = "fnmatch.h")]
358 public const int FNM_PERIOD;
361 [CCode (cname = "struct group", cheader_filename = "grp.h")]
363 public string gr_name;
364 public string gr_passwd;
366 [CCode (array_length = false, array_null_terminated = true)]
367 public string[] gr_mem;
369 [CCode (cheader_filename = "grp.h")]
370 public void endgrent ();
371 public unowned Group? getgrent ();
372 public void setgrent ();
373 [CCode (cheader_filename = "grp.h")]
374 public unowned Group? getgrgid (gid_t gid);
375 [CCode (cheader_filename = "grp.h")]
376 public unowned Group? getgrnam (string name);
378 [CCode (cheader_filename = "netinet/in.h")]
379 public const int INET_ADDRSTRLEN;
380 [CCode (cheader_filename = "netinet/in.h")]
381 public const int INET6_ADDRSTRLEN;
383 [CCode (cheader_filename = "netinet/in.h", cname = "int", cprefix = "IPPROTO_", has_type_id = false)]
384 public enum IPProto {
411 [CCode (cheader_filename = "netinet/tcp.h")]
412 public const int TCP_NODELAY;
413 [CCode (cheader_filename = "netinet/tcp.h")]
414 public const int TCP_MAXSEG;
415 [CCode (cheader_filename = "netinet/tcp.h")]
416 public const int TCP_CORK;
417 [CCode (cheader_filename = "netinet/tcp.h")]
418 public const int TCP_KEEPIDLE;
419 [CCode (cheader_filename = "netinet/tcp.h")]
420 public const int TCP_KEEPINTVL;
421 [CCode (cheader_filename = "netinet/tcp.h")]
422 public const int TCP_KEEPCNT;
423 [CCode (cheader_filename = "netinet/tcp.h")]
424 public const int TCP_SYNCNT;
425 [CCode (cheader_filename = "netinet/tcp.h")]
426 public const int TCP_LINGER2;
427 [CCode (cheader_filename = "netinet/tcp.h")]
428 public const int TCP_DEFER_ACCEPT;
429 [CCode (cheader_filename = "netinet/tcp.h")]
430 public const int TCP_WINDOW_CLAMP;
431 [CCode (cheader_filename = "netinet/tcp.h")]
432 public const int TCP_INFO;
433 [CCode (cheader_filename = "netinet/tcp.h")]
434 public const int TCP_QUICKACK;
435 [CCode (cheader_filename = "netinet/tcp.h")]
436 public const int TCP_CONGESTION;
437 [CCode (cheader_filename = "netinet/tcp.h")]
438 public const int TCP_MD5SIG;
439 [CCode (cheader_filename = "netinet/tcp.h")]
440 public const int TCP_COOKIE_TRANSACTIONS;
441 [CCode (cheader_filename = "netinet/tcp.h")]
442 public const int TCP_THIN_LINEAR_TIMEOUTS;
443 [CCode (cheader_filename = "netinet/tcp.h")]
444 public const int TCP_THIN_DUPACK;
445 [CCode (cheader_filename = "netinet/tcp.h")]
446 public const int TCP_USER_TIMEOUT;
447 [CCode (cheader_filename = "netinet/tcp.h")]
448 public const int TCP_REPAIR;
449 [CCode (cheader_filename = "netinet/tcp.h")]
450 public const int TCP_REPAIR_QUEUE;
451 [CCode (cheader_filename = "netinet/tcp.h")]
452 public const int TCP_QUEUE_SEQ;
453 [CCode (cheader_filename = "netinet/tcp.h")]
454 public const int TCP_REPAIR_OPTIONS;
455 [CCode (cheader_filename = "netinet/tcp.h")]
456 public const int TCP_FASTOPEN;
457 [CCode (cheader_filename = "netinet/tcp.h")]
458 public const int TCP_TIMESTAMP;
460 [CCode (cheader_filename = "arpa/inet.h")]
461 public uint32 inet_addr (string host);
462 [CCode (cheader_filename = "arpa/inet.h")]
463 public unowned string inet_ntoa (InAddr addr);
464 [CCode (cheader_filename = "arpa/inet.h")]
465 public unowned string? inet_ntop (int af, void* src, uint8[] dst);
466 [CCode (cheader_filename = "arpa/inet.h")]
467 public int inet_pton (int af, string src, void* dst);
468 [CCode (cheader_filename = "arpa/inet.h")]
469 public uint32 htonl (uint32 hostlong);
470 [CCode (cheader_filename = "arpa/inet.h")]
471 public uint32 ntohl (uint32 netlong);
472 [CCode (cheader_filename = "arpa/inet.h")]
473 public uint16 htons (uint16 hostshort);
474 [CCode (cheader_filename = "arpa/inet.h")]
475 public uint16 ntohs (uint16 netshort);
477 [CCode (cheader_filename = "math.h")]
478 public double acos (double x);
479 [CCode (cheader_filename = "math.h")]
480 public float acosf (float x);
481 [CCode (cheader_filename = "math.h")]
482 public double asin (double x);
483 [CCode (cheader_filename = "math.h")]
484 public float asinf (float x);
485 [CCode (cheader_filename = "math.h")]
486 public double atan (double x);
487 [CCode (cheader_filename = "math.h")]
488 public float atanf (float x);
489 [CCode (cheader_filename = "math.h")]
490 public double atan2 (double y, double x);
491 [CCode (cheader_filename = "math.h")]
492 public float atan2f (float y, float x);
493 [CCode (cheader_filename = "math.h")]
494 public double cos (double x);
495 [CCode (cheader_filename = "math.h")]
496 public float cosf (float x);
497 [CCode (cheader_filename = "math.h")]
498 public double sin (double x);
499 [CCode (cheader_filename = "math.h")]
500 public float sinf (float x);
501 [CCode (cheader_filename = "math.h")]
502 public double tan (double x);
503 [CCode (cheader_filename = "math.h")]
504 public float tanf (float x);
505 [CCode (cheader_filename = "math.h")]
506 public double cosh (double x);
507 [CCode (cheader_filename = "math.h")]
508 public float coshf (float x);
509 [CCode (cheader_filename = "math.h")]
510 public double sinh (double x);
511 [CCode (cheader_filename = "math.h")]
512 public float sinhf (float x);
513 [CCode (cheader_filename = "math.h")]
514 public double tanh (double x);
515 [CCode (cheader_filename = "math.h")]
516 public float tanhf (float x);
517 [CCode (cheader_filename = "math.h")]
518 public void sincos (double x, out double sinx, out double cosx);
519 [CCode (cheader_filename = "math.h")]
520 public void sincosf (float x, out float sinx, out float cosx);
521 [CCode (cheader_filename = "math.h")]
522 public double acosh (double x);
523 [CCode (cheader_filename = "math.h")]
524 public float acoshf (float x);
525 [CCode (cheader_filename = "math.h")]
526 public double asinh (double x);
527 [CCode (cheader_filename = "math.h")]
528 public float asinhf (float x);
529 [CCode (cheader_filename = "math.h")]
530 public double atanh (double x);
531 [CCode (cheader_filename = "math.h")]
532 public float atanhf (float x);
533 [CCode (cheader_filename = "math.h")]
534 public double exp (double x);
535 [CCode (cheader_filename = "math.h")]
536 public float expf (float x);
537 [CCode (cheader_filename = "math.h")]
538 public double frexp (double x, out int exponent);
539 [CCode (cheader_filename = "math.h")]
540 public float frexpf (float x, out int exponent);
541 [CCode (cheader_filename = "math.h")]
542 public double ldexp (double x, int exponent);
543 [CCode (cheader_filename = "math.h")]
544 public float ldexpf (float x, int exponent);
545 [CCode (cheader_filename = "math.h")]
546 public double log (double x);
547 [CCode (cheader_filename = "math.h")]
548 public float logf (float x);
549 [CCode (cheader_filename = "math.h")]
550 public double log10 (double x);
551 [CCode (cheader_filename = "math.h")]
552 public float log10f (float x);
553 [CCode (cheader_filename = "math.h")]
554 public double modf (double x, out double iptr);
555 [CCode (cheader_filename = "math.h")]
556 public float modff (float x, out float iptr);
557 [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")]
558 public double exp10 (double x);
559 [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")]
560 public float exp10f (float x);
561 [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")]
562 public double pow10 (double x);
563 [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")]
564 public float pow10f (float x);
565 [CCode (cheader_filename = "math.h")]
566 public double expm1 (double x);
567 [CCode (cheader_filename = "math.h")]
568 public float expm1f (float x);
569 [CCode (cheader_filename = "math.h")]
570 public double log1p (double x);
571 [CCode (cheader_filename = "math.h")]
572 public float log1pf (float x);
573 [CCode (cheader_filename = "math.h")]
574 public double logb (double x);
575 [CCode (cheader_filename = "math.h")]
576 public float logbf (float x);
577 [CCode (cheader_filename = "math.h")]
578 public double exp2 (double x);
579 [CCode (cheader_filename = "math.h")]
580 public float exp2f (float x);
581 [CCode (cheader_filename = "math.h")]
582 public double log2 (double x);
583 [CCode (cheader_filename = "math.h")]
584 public float log2f (float x);
585 [CCode (cheader_filename = "math.h")]
586 public double pow (double x, double y);
587 [CCode (cheader_filename = "math.h")]
588 public float powf (float x, float y);
589 [CCode (cheader_filename = "math.h")]
590 public double sqrt (double x);
591 [CCode (cheader_filename = "math.h")]
592 public float sqrtf (float x);
593 [CCode (cheader_filename = "math.h")]
594 public double hypot (double x, double y);
595 [CCode (cheader_filename = "math.h")]
596 public float hypotf (float x, float y);
597 [CCode (cheader_filename = "math.h")]
598 public double cbrt (double x);
599 [CCode (cheader_filename = "math.h")]
600 public float cbrtf (float x);
601 [CCode (cheader_filename = "math.h")]
602 public double ceil (double x);
603 [CCode (cheader_filename = "math.h")]
604 public float ceilf (float x);
605 [CCode (cheader_filename = "math.h")]
606 public double fabs (double x);
607 [CCode (cheader_filename = "math.h")]
608 public float fabsf (float x);
609 [CCode (cheader_filename = "math.h")]
610 public double floor (double x);
611 [CCode (cheader_filename = "math.h")]
612 public float floorf (float x);
613 [CCode (cheader_filename = "math.h")]
614 public double fmod (double x, double y);
615 [CCode (cheader_filename = "math.h")]
616 public float fmodf (float x, float y);
617 [CCode (cheader_filename = "math.h")]
618 public int isinf (double value);
619 [CCode (cheader_filename = "math.h")]
620 public int isinff (float value);
621 [CCode (cheader_filename = "math.h")]
622 public int finite (double value);
623 [CCode (cheader_filename = "math.h")]
624 public int finitef (float value);
625 [CCode (cheader_filename = "math.h")]
626 public double drem (double x, double y);
627 [CCode (cheader_filename = "math.h")]
628 public float dremf (float x, float y);
629 [CCode (cheader_filename = "math.h")]
630 public double significand (double x);
631 [CCode (cheader_filename = "math.h")]
632 public float significandf (float x);
633 [CCode (cheader_filename = "math.h")]
634 public double copysign (double x, double y);
635 [CCode (cheader_filename = "math.h")]
636 public float copysignf (float x, float y);
637 [CCode (cheader_filename = "math.h")]
638 public double nan (string tagb);
639 [CCode (cheader_filename = "math.h")]
640 public float nanf (string tagb);
641 [CCode (cheader_filename = "math.h")]
642 public int isnan (double value);
643 [CCode (cheader_filename = "math.h")]
644 public int isnanf (float value);
645 [CCode (cheader_filename = "math.h")]
646 public double j0 (double x0);
647 [CCode (cheader_filename = "math.h")]
648 public float j0f (float x0);
649 [CCode (cheader_filename = "math.h")]
650 public double j1 (double x0);
651 [CCode (cheader_filename = "math.h")]
652 public float j1f (float x0);
653 [CCode (cheader_filename = "math.h")]
654 public double jn (int x0, double x1);
655 [CCode (cheader_filename = "math.h")]
656 public float jnf (int x0, float x1);
657 [CCode (cheader_filename = "math.h")]
658 public double y0 (double x0);
659 [CCode (cheader_filename = "math.h")]
660 public float y0f (float x0);
661 [CCode (cheader_filename = "math.h")]
662 public double y1 (double x0);
663 [CCode (cheader_filename = "math.h")]
664 public float y1f (float x0);
665 [CCode (cheader_filename = "math.h")]
666 public double yn (int x0, double x1);
667 [CCode (cheader_filename = "math.h")]
668 public float ynf (int x0, float x1);
669 [CCode (cheader_filename = "math.h")]
670 public double erf (double x0);
671 [CCode (cheader_filename = "math.h")]
672 public float erff (float x0);
673 [CCode (cheader_filename = "math.h")]
674 public double erfc (double x0);
675 [CCode (cheader_filename = "math.h")]
676 public float erfcf (float x0);
677 [CCode (cheader_filename = "math.h")]
678 public double lgamma (double x0);
679 [CCode (cheader_filename = "math.h")]
680 public float lgammaf (float x0);
681 [CCode (cheader_filename = "math.h")]
682 public double tgamma (double x0);
683 [CCode (cheader_filename = "math.h")]
684 public float tgammaf (float x0);
685 [CCode (cheader_filename = "math.h")]
686 public double gamma (double x0);
687 [CCode (cheader_filename = "math.h")]
688 public float gammaf (float x0);
689 [CCode (cheader_filename = "math.h")]
690 public double lgamma_r (double x0, out int signgamp);
691 [CCode (cheader_filename = "math.h")]
692 public float lgamma_rf (float x0, out int signgamp);
693 [CCode (cheader_filename = "math.h")]
694 public double rint (double x);
695 [CCode (cheader_filename = "math.h")]
696 public float rintf (float x);
697 [CCode (cheader_filename = "math.h")]
698 public double nextafter (double x, double y);
699 [CCode (cheader_filename = "math.h")]
700 public float nextafterf (float x, float y);
701 [CCode (cheader_filename = "math.h")]
702 public double nexttoward (double x, double y);
703 [CCode (cheader_filename = "math.h")]
704 public float nexttowardf (float x, double y);
705 [CCode (cheader_filename = "math.h")]
706 public double remainder (double x, double y);
707 [CCode (cheader_filename = "math.h")]
708 public float remainderf (float x, float y);
709 [CCode (cheader_filename = "math.h")]
710 public double scalbn (double x, int n);
711 [CCode (cheader_filename = "math.h")]
712 public float scalbnf (float x, int n);
713 [CCode (cheader_filename = "math.h")]
714 public int ilogb (double x);
715 [CCode (cheader_filename = "math.h")]
716 public int ilogbf (float x);
717 [CCode (cheader_filename = "math.h")]
718 public double scalbln (double x, long n);
719 [CCode (cheader_filename = "math.h")]
720 public float scalblnf (float x, long n);
721 [CCode (cheader_filename = "math.h")]
722 public double nearbyint (double x);
723 [CCode (cheader_filename = "math.h")]
724 public float nearbyintf (float x);
725 [CCode (cheader_filename = "math.h")]
726 public double round (double x);
727 [CCode (cheader_filename = "math.h")]
728 public float roundf (float x);
729 [CCode (cheader_filename = "math.h")]
730 public double trunc (double x);
731 [CCode (cheader_filename = "math.h")]
732 public float truncf (float x);
733 [CCode (cheader_filename = "math.h")]
734 public double remquo (double x, double y, out int quo);
735 [CCode (cheader_filename = "math.h")]
736 public float remquof (float x, float y, out int quo);
737 [CCode (cheader_filename = "math.h")]
738 public long lrint (double x);
739 [CCode (cheader_filename = "math.h")]
740 public long lrintf (float x);
741 [CCode (cheader_filename = "math.h")]
742 public int64 llrint (double x);
743 [CCode (cheader_filename = "math.h")]
744 public int64 llrintf (float x);
745 [CCode (cheader_filename = "math.h")]
746 public long lround (double x);
747 [CCode (cheader_filename = "math.h")]
748 public long lroundf (float x);
749 [CCode (cheader_filename = "math.h")]
750 public int64 llround (double x);
751 [CCode (cheader_filename = "math.h")]
752 public int64 llroundf (float x);
753 [CCode (cheader_filename = "math.h")]
754 public double fdim (double x, double y);
755 [CCode (cheader_filename = "math.h")]
756 public float fdimf (float x, float y);
757 [CCode (cheader_filename = "math.h")]
758 public double fmax (double x, double y);
759 [CCode (cheader_filename = "math.h")]
760 public float fmaxf (float x, float y);
761 [CCode (cheader_filename = "math.h")]
762 public double fmin (double x, double y);
763 [CCode (cheader_filename = "math.h")]
764 public float fminf (float x, float y);
765 [CCode (cheader_filename = "math.h")]
766 public double fma (double x, double y, double z);
767 [CCode (cheader_filename = "math.h")]
768 public float fmaf (float x, float y, float z);
769 [CCode (cheader_filename = "math.h")]
770 public double scalb (double x, double n);
771 [CCode (cheader_filename = "math.h")]
772 public float scalbf (float x, float n);
775 [CCode (cname = "mqd_t", cheader_filename = "mqueue.h", lower_case_cprefix = "mq_", free_function = "mq_close", has_type_id = false)]
776 public struct MessageQueue {
777 [CCode (cname = "mq_open")]
778 public MessageQueue (string name, int oflag, mode_t mode = 0, MqAttr? attr = null);
779 public static int unlink (string name);
780 public int notify (sigevent_t? notification = null);
781 public int getattr (MqAttr attr);
782 public int setattr (MqAttr attr, MqAttr? oldattr = null);
783 public int send (uint8[] msg, uint prio = 0);
784 public int timedsend (uint8[] msg, uint prio, timespec abs_timeout);
785 public ssize_t receive (uint8[] msg, out uint prio);
786 public ssize_t timedreceive (uint8[] msg, out uint prio, timespec abs_timeout);
789 [CCode (cname = "struct mq_attr", cheader_filename = "mqueue.h", destroy_function = "", has_type_id = false)]
790 public struct MqAttr {
791 public long mq_flags;
792 public long mq_maxmsg;
793 public long mq_msgsize;
794 public long mq_curmsgs;
797 [CCode (cheader_filename = "netdb.h")]
798 public const int NI_NAMEREQD;
799 [CCode (cheader_filename = "netdb.h")]
800 public const int NI_DGRAM;
801 [CCode (cheader_filename = "netdb.h")]
802 public const int NI_NOFQDN;
803 [CCode (cheader_filename = "netdb.h")]
804 public const int NI_NUMERICHOST;
805 [CCode (cheader_filename = "netdb.h")]
806 public const int NI_NUMERICSERV;
808 [CCode (cheader_filename = "netdb.h,sys/socket.h")]
809 public int getnameinfo (SockAddr sa, socklen_t salen, char[] node, char[] service, int flags);
811 [CCode (cheader_filename = "poll.h", cname = "struct pollfd", has_type_id = false)]
812 public struct pollfd {
818 [CCode (cheader_filename = "poll.h")]
819 public const int POLLIN;
820 [CCode (cheader_filename = "poll.h")]
821 public const int POLLPRI;
822 [CCode (cheader_filename = "poll.h")]
823 public const int POLLOUT;
824 [CCode (cheader_filename = "poll.h")]
825 public const int POLLRDHUP;
826 [CCode (cheader_filename = "poll.h")]
827 public const int POLLERR;
828 [CCode (cheader_filename = "poll.h")]
829 public const int POLLHUP;
830 [CCode (cheader_filename = "poll.h")]
831 public const int POLLNVAL;
834 [IntegerType (rank = 9)]
835 [CCode (cheader_filename = "poll.h", cname = "nfds_t", has_type_id = false)]
836 public struct nfds_t {
839 [CCode (cheader_filename = "poll.h")]
840 public int poll (pollfd[] fds, int timeout);
841 [CCode (cheader_filename = "poll.h")]
842 public int ppoll (pollfd[] fds, timespec? timeout, sigset_t? sigmask);
845 [CCode (cname = "struct passwd", cheader_filename = "pwd.h")]
846 public class Passwd {
847 public string pw_name;
848 public string pw_passwd;
851 public string pw_gecos;
852 public string pw_dir;
853 public string pw_shell;
855 [CCode (cheader_filename = "pwd.h")]
856 public void endpwent ();
857 public unowned Passwd? getpwent ();
858 public void setpwent ();
859 [CCode (cheader_filename = "pwd.h")]
860 public unowned Passwd? getpwnam (string name);
861 [CCode (cheader_filename = "pwd.h")]
862 public unowned Passwd? getpwuid (uid_t uid);
865 [CCode (cname = "sem_t", cheader_filename = "semaphore.h", cprefix = "SEM_", lower_case_cprefix = "sem_", has_type_id = false, copy_function = "", free_function = "sem_close")]
866 public class NamedSemaphore {
867 [CCode (cname = "sem_open")]
868 public NamedSemaphore (string name, int oflag = 0, mode_t mode = 0, uint val = 0);
869 public int getvalue (out int sval);
872 public int trywait ();
873 public int timedwait (Posix.timespec abs_timeout);
874 public static int unlink (string name);
875 public const int FAILED;
878 [CCode (cheader_filename = "sys/resource.h")]
879 public const int PRIO_PROCESS;
880 [CCode (cheader_filename = "sys/resource.h")]
881 public const int PRIO_PGRP;
882 [CCode (cheader_filename = "sys/resource.h")]
883 public const int PRIO_USER;
885 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.ABRT")]
886 [CCode (cheader_filename = "signal.h")]
887 public const int SIGABRT;
888 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.ALRM")]
889 [CCode (cheader_filename = "signal.h")]
890 public const int SIGALRM;
891 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.BUS")]
892 [CCode (cheader_filename = "signal.h")]
893 public const int SIGBUS;
894 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.CHLD")]
895 [CCode (cheader_filename = "signal.h")]
896 public const int SIGCHLD;
897 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.CONT")]
898 [CCode (cheader_filename = "signal.h")]
899 public const int SIGCONT;
900 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.FPE")]
901 [CCode (cheader_filename = "signal.h")]
902 public const int SIGFPE;
903 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.HUP")]
904 [CCode (cheader_filename = "signal.h")]
905 public const int SIGHUP;
906 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.ILL")]
907 [CCode (cheader_filename = "signal.h")]
908 public const int SIGILL;
909 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.INT")]
910 [CCode (cheader_filename = "signal.h")]
911 public const int SIGINT;
912 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.KILL")]
913 [CCode (cheader_filename = "signal.h")]
914 public const int SIGKILL;
915 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.PIPE")]
916 [CCode (cheader_filename = "signal.h")]
917 public const int SIGPIPE;
918 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.QUIT")]
919 [CCode (cheader_filename = "signal.h")]
920 public const int SIGQUIT;
921 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.SEGV")]
922 [CCode (cheader_filename = "signal.h")]
923 public const int SIGSEGV;
924 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.STOP")]
925 [CCode (cheader_filename = "signal.h")]
926 public const int SIGSTOP;
927 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.TERM")]
928 [CCode (cheader_filename = "signal.h")]
929 public const int SIGTERM;
930 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.TSTP")]
931 [CCode (cheader_filename = "signal.h")]
932 public const int SIGTSTP;
933 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.TTIN")]
934 [CCode (cheader_filename = "signal.h")]
935 public const int SIGTTIN;
936 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.TTOU")]
937 [CCode (cheader_filename = "signal.h")]
938 public const int SIGTTOU;
939 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.USR1")]
940 [CCode (cheader_filename = "signal.h")]
941 public const int SIGUSR1;
942 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.USR2")]
943 [CCode (cheader_filename = "signal.h")]
944 public const int SIGUSR2;
945 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.POLL")]
946 [CCode (cheader_filename = "signal.h")]
947 public const int SIGPOLL;
948 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.PROF")]
949 [CCode (cheader_filename = "signal.h")]
950 public const int SIGPROF;
951 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.SYS")]
952 [CCode (cheader_filename = "signal.h")]
953 public const int SIGSYS;
954 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.TRAP")]
955 [CCode (cheader_filename = "signal.h")]
956 public const int SIGTRAP;
957 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.URG")]
958 [CCode (cheader_filename = "signal.h")]
959 public const int SIGURG;
960 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.VTALRM")]
961 [CCode (cheader_filename = "signal.h")]
962 public const int SIGVTALRM;
963 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.XCPU")]
964 [CCode (cheader_filename = "signal.h")]
965 public const int SIGXCPU;
966 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.XFSZ")]
967 [CCode (cheader_filename = "signal.h")]
968 public const int SIGXFSZ;
969 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.IOT")]
970 [CCode (cheader_filename = "signal.h")]
971 public const int SIGIOT;
972 [Version (deprecated = true, deprecated_since = "vala-0.40", replacement = "Posix.Signal.STKFLT")]
973 [CCode (cheader_filename = "signal.h")]
974 public const int SIGSTKFLT;
979 [CCode (cheader_filename = "signal.h", cprefix = "SIG", has_type_id = false)]
982 * Abort signal (ANSI)
986 * Alarm clock signal (POSIX)
990 * Access to an undefined portion of memory signal (4.2 BSD)
994 * Child process terminated, stopped or continued signal (POSIX)
998 * Old System V name for CHLD
1000 [Version (replacement = "Posix.Signal.CHLD")]
1003 * Continue executing, if stopped, signal (POSIX)
1011 * Floating-point exception signal (ANSI)
1015 * Hangup signal (POSIX)
1019 * Illegal instruction signal (ANSI)
1023 * Information request
1027 * Terminal interrupt signal (ANSI)
1031 * I/O now possible (4.2 BSD)
1035 * IOT trap signal (4.2 BSD)
1039 * Kill signal (cannot be caught or ignored) (POSIX)
1047 * Broken pipe signal (POSIX)
1051 * Pollable event occurred signal (System V)
1055 * Profiling timer expired signal (4.2 BSD)
1059 * Power failure restart (System V)
1063 * Terminal quit signal (POSIX)
1067 * Memory reference segmentation violation signal (ANSI)
1071 * Stack fault signal
1075 * Stop executing signal (cannot be caught or ignored) (POSIX)
1079 * Bad system call signal
1083 * Termination signal (ANSI)
1087 * Trace/breakpoint trap signal (POSIX)
1091 * Terminal stop signal (POSIX)
1095 * Background read from tty signal (POSIX)
1099 * Background write to tty signal (POSIX)
1103 * Urgent condition on socket signal (4.2 BSD)
1107 * User-defined signal 1 (POSIX)
1111 * User-defined signal 2 (POSIX)
1115 * Virtual timer expired signal (4.2 BSD)
1119 * Window size changed signal (4.3 BSD, Sun)
1123 * CPU time limit exceeded signal (4.2 BSD)
1127 * File size limit exceeded signal (4.2 BSD)
1132 [CCode (cheader_filename = "signal.h")]
1133 public const int SA_NOCLDSTOP;
1134 [CCode (cheader_filename = "signal.h")]
1135 public const int SA_NOCLDWAIT;
1136 [CCode (cheader_filename = "signal.h")]
1137 public const int SA_NODEFER;
1138 [CCode (cheader_filename = "signal.h")]
1139 public const int SA_ONSTACK;
1140 [CCode (cheader_filename = "signal.h")]
1141 public const int SA_RESETHAND;
1142 [CCode (cheader_filename = "signal.h")]
1143 public const int SA_RESTART;
1144 [CCode (cheader_filename = "signal.h")]
1145 public const int SA_SIGINFO;
1146 [CCode (cheader_filename = "signal.h")]
1147 public const int SI_USER;
1148 [CCode (cheader_filename = "signal.h")]
1149 public const int SI_KERNEL;
1150 [CCode (cheader_filename = "signal.h")]
1151 public const int SI_QUEUE;
1152 [CCode (cheader_filename = "signal.h")]
1153 public const int SI_TIMER;
1154 [CCode (cheader_filename = "signal.h")]
1155 public const int SI_MESGQ;
1156 [CCode (cheader_filename = "signal.h")]
1157 public const int SI_ASYNCIO;
1158 [CCode (cheader_filename = "signal.h")]
1159 public const int SI_SIGIO;
1160 [CCode (cheader_filename = "signal.h")]
1161 public const int SI_TKILL;
1162 [CCode (cheader_filename = "signal.h")]
1163 public const int ILL_ILLOPC;
1164 [CCode (cheader_filename = "signal.h")]
1165 public const int ILL_ILLOPN;
1166 [CCode (cheader_filename = "signal.h")]
1167 public const int ILL_ILLADR;
1168 [CCode (cheader_filename = "signal.h")]
1169 public const int ILL_ILLTRP;
1170 [CCode (cheader_filename = "signal.h")]
1171 public const int ILL_PRVOPC;
1172 [CCode (cheader_filename = "signal.h")]
1173 public const int ILL_PRVREG;
1174 [CCode (cheader_filename = "signal.h")]
1175 public const int ILL_COPROC;
1176 [CCode (cheader_filename = "signal.h")]
1177 public const int ILL_BADSTK;
1178 [CCode (cheader_filename = "signal.h")]
1179 public const int FPE_INTDIV;
1180 [CCode (cheader_filename = "signal.h")]
1181 public const int FPE_INTOVF;
1182 [CCode (cheader_filename = "signal.h")]
1183 public const int FPE_FLTDIV;
1184 [CCode (cheader_filename = "signal.h")]
1185 public const int FPE_FLTOVF;
1186 [CCode (cheader_filename = "signal.h")]
1187 public const int FPE_FLTUND;
1188 [CCode (cheader_filename = "signal.h")]
1189 public const int FPE_FLTRES;
1190 [CCode (cheader_filename = "signal.h")]
1191 public const int FPE_FLTINV;
1192 [CCode (cheader_filename = "signal.h")]
1193 public const int FPE_FLTSUB;
1194 [CCode (cheader_filename = "signal.h")]
1195 public const int SEGV_MAPERR;
1196 [CCode (cheader_filename = "signal.h")]
1197 public const int SEGV_ACCERR;
1198 [CCode (cheader_filename = "signal.h")]
1199 public const int BUS_ADRALN;
1200 [CCode (cheader_filename = "signal.h")]
1201 public const int BUS_ADRERR;
1202 [CCode (cheader_filename = "signal.h")]
1203 public const int BUS_OBJERR;
1204 [CCode (cheader_filename = "signal.h")]
1205 public const int BUS_MCEERR_AR;
1206 [CCode (cheader_filename = "signal.h")]
1207 public const int BUS_MCEERR_AO;
1208 [CCode (cheader_filename = "signal.h")]
1209 public const int TRAP_BRKPT;
1210 [CCode (cheader_filename = "signal.h")]
1211 public const int TRAP_TRACE;
1212 [CCode (cheader_filename = "signal.h")]
1213 public const int TRAP_BRANCH;
1214 [CCode (cheader_filename = "signal.h")]
1215 public const int TRAP_HWBKPT;
1216 [CCode (cheader_filename = "signal.h")]
1217 public const int CLD_EXITED;
1218 [CCode (cheader_filename = "signal.h")]
1219 public const int CLD_KILLED;
1220 [CCode (cheader_filename = "signal.h")]
1221 public const int CLD_DUMPED;
1222 [CCode (cheader_filename = "signal.h")]
1223 public const int CLD_TRAPPED;
1224 [CCode (cheader_filename = "signal.h")]
1225 public const int CLD_STOPPED;
1226 [CCode (cheader_filename = "signal.h")]
1227 public const int CLD_CONTINUED;
1228 [CCode (cheader_filename = "signal.h")]
1229 public const int POLL_IN;
1230 [CCode (cheader_filename = "signal.h")]
1231 public const int POLL_OUT;
1232 [CCode (cheader_filename = "signal.h")]
1233 public const int POLL_MSG;
1234 [CCode (cheader_filename = "signal.h")]
1235 public const int POLL_ERR;
1236 [CCode (cheader_filename = "signal.h")]
1237 public const int POLL_PRI;
1238 [CCode (cheader_filename = "signal.h")]
1239 public const int POLL_HUP;
1240 [CCode (cheader_filename = "signal.h")]
1241 public const int SIG_BLOCK;
1242 [CCode (cheader_filename = "signal.h")]
1243 public const int SIG_UNBLOCK;
1244 [CCode (cheader_filename = "signal.h")]
1245 public const int SIG_SETMASK;
1248 [IntegerType (rank = 6)]
1249 [CCode (cname = "pid_t", default_value = "0", cheader_filename = "sys/types.h", has_type_id = false)]
1250 public struct pid_t {
1253 [CCode (cname = "struct sigaction", cheader_filename = "signal.h", has_type_id = false)]
1254 public struct sigaction_t {
1255 sighandler_t sa_handler;
1256 siginfohandler_t sa_sigaction;
1261 [CCode (cname = "struct sigevent", cheader_filename = "signal.h", has_type_id = false)]
1262 public struct sigevent_t {
1263 sigval_t sigev_value;
1269 [CCode (cname = "sigval_t", cheader_filename = "signal.h", has_type_id = false)]
1270 public struct sigval_t {
1275 [CCode (cname = "siginfo_t", cheader_filename = "signal.h", has_type_id = false)]
1276 public struct siginfo_t {
1297 [CCode (cheader_filename = "signal.h")]
1298 public int kill (pid_t pid, int signum);
1299 [CCode (cheader_filename = "signal.h")]
1300 public int killpg (pid_t pgpr, int signum);
1301 [CCode (cheader_filename = "signal.h")]
1302 public int raise (int signum);
1303 [CCode (cheader_filename = "signal.h")]
1304 public void psignal (int signum, string message);
1305 [CCode (cheader_filename = "signal.h")]
1306 public int sigemptyset (out sigset_t sigset);
1307 [CCode (cheader_filename = "signal.h")]
1308 public int sigfillset (out sigset_t sigset);
1309 [CCode (cheader_filename = "signal.h")]
1310 public int sigaddset (ref sigset_t sigset, int signo);
1311 [CCode (cheader_filename = "signal.h")]
1312 public int sigdelset (ref sigset_t sigset, int __signo);
1313 [CCode (cheader_filename = "signal.h")]
1314 public int sigismember (sigset_t sigset, int __signo);
1315 [CCode (cheader_filename = "signal.h")]
1316 public int sigprocmask (int how, sigset_t sigset, out sigset_t oset);
1317 [CCode (cheader_filename = "signal.h")]
1318 public int sigqueue (pid_t pid, int signum, sigval_t val);
1319 [CCode (cheader_filename = "signal.h")]
1320 public int sigsuspend (sigset_t sigset);
1321 [CCode (cheader_filename = "signal.h")]
1322 public int sigpending (sigset_t sigset);
1323 [CCode (cheader_filename = "signal.h")]
1324 public int sigwait (sigset_t sigset, out int sig);
1325 [CCode (cheader_filename = "signal.h")]
1326 public int sigaction (int signum, sigaction_t? act, out sigaction_t? oldact);
1328 [CCode (has_target = false, cheader_filename = "signal.h", feature_test_macro = "_GNU_SOURCE")]
1329 public delegate void sighandler_t (int signal);
1331 [CCode (has_target = false, cheader_filename = "signal.h")]
1332 public delegate void siginfohandler_t (int signal, siginfo_t info, void* data);
1334 [CCode (cheader_filename = "signal.h")]
1335 public sighandler_t SIG_DFL;
1337 [CCode (cheader_filename = "signal.h")]
1338 public sighandler_t SIG_ERR;
1340 [CCode (cheader_filename = "signal.h")]
1341 public sighandler_t SIG_IGN;
1343 [CCode (cheader_filename = "signal.h")]
1344 public sighandler_t signal (int signum, sighandler_t? handler);
1346 [CCode (cheader_filename = "stdio.h")]
1348 public void printf (string format,...);
1350 [CCode (cheader_filename = "stdlib.h")]
1351 public void abort ();
1352 [CCode (cheader_filename = "stdlib.h")]
1353 public void exit (int status);
1355 [CCode (cheader_filename = "stdlib.h")]
1356 public void _exit (int status);
1358 [CCode (has_target = false)]
1359 public delegate void AtExitFunc ();
1361 [CCode (cheader_filename = "stdlib.h")]
1362 public void atexit (AtExitFunc func);
1364 [CCode (cheader_filename = "stdlib.h")]
1365 public int mkstemp (string template);
1367 [CCode (cheader_filename = "stdlib.h")]
1368 public int mkostemp (string template, int flags);
1370 [CCode (cheader_filename = "stdlib.h")]
1371 public string? realpath (string path, [CCode (array_length = false)] uint8[]? resolved_path = null);
1373 [CCode (cheader_filename = "stdlib.h")]
1374 public int posix_openpt (int flags);
1375 [CCode (cheader_filename = "stdlib.h")]
1376 public int grantpt (int fd);
1377 [CCode (cheader_filename = "stdlib.h")]
1378 public int unlockpt (int fd);
1379 [CCode (cheader_filename = "stdlib.h")]
1380 public unowned string? ptsname (int fd);
1382 [CCode (cheader_filename = "stdlib.h")]
1383 public int system (string command);
1385 [CCode (has_target = false, cheader_filename = "stdlib.h", cname = "__compar_fn_t")]
1386 public delegate int compar_fn_t (void* key1, void* key2);
1388 [CCode (cheader_filename = "stdlib.h")]
1389 public void* bsearch (void* key, void* base, size_t nmemb, size_t size, compar_fn_t func);
1391 [CCode (cheader_filename = "stdlib.h")]
1392 public void qsort (void* base, size_t nmemb, size_t size, compar_fn_t func);
1394 [CCode (cheader_filename = "stdlib.h")]
1395 public void qsort_r (void* base, size_t nmemb, size_t size, compar_fn_t func, void* arg);
1397 [CCode (cheader_filename = "stdlib.h")]
1398 public const int EXIT_FAILURE;
1399 [CCode (cheader_filename = "stdlib.h")]
1400 public const int EXIT_SUCCESS;
1402 [CCode (cheader_filename = "string.h")]
1403 public void* memccpy (void* s1, void* s2, int c, size_t n);
1404 [CCode (cheader_filename = "string.h")]
1405 public void* memchr (void* s, int c, size_t n);
1406 [CCode (cheader_filename = "string.h")]
1407 public int memcmp (void* s1, void* s2, size_t n);
1408 [CCode (cheader_filename = "string.h")]
1409 public void* memcpy (void* s1, void* s2, size_t n);
1410 [CCode (cheader_filename = "string.h")]
1411 public void* memmove (void* s1, void* s2, size_t n);
1412 [CCode (cheader_filename = "string.h")]
1413 public void* memset (void* s, int c, size_t n);
1414 [CCode (cheader_filename = "string.h")]
1415 public unowned string strcat (string s1, string s2);
1416 [CCode (cheader_filename = "string.h")]
1417 public unowned string? strchr (string s, int c);
1418 [CCode (cheader_filename = "string.h")]
1419 public int strcmp (string s1, string s2);
1420 [CCode (cheader_filename = "string.h")]
1421 public int strcoll (string s1, string s2);
1422 [CCode (cheader_filename = "string.h")]
1423 public unowned string strcpy (string s1, string s2);
1424 [CCode (cheader_filename = "string.h")]
1425 public size_t strcspn (string s1, string s2);
1426 [CCode (cheader_filename = "string.h")]
1427 public string strdup (string s1);
1428 [CCode (cheader_filename = "string.h")]
1429 public unowned string strerror (int errnum);
1430 [CCode (cheader_filename = "string.h")]
1431 public int* strerror_r (int errnum, string strerrbuf, size_t buflen);
1432 [CCode (cheader_filename = "string.h")]
1433 public size_t strlen (string s);
1434 [CCode (cheader_filename = "string.h")]
1435 public unowned string strncat (string s1, string s2, size_t n);
1436 [CCode (cheader_filename = "string.h")]
1437 public int strncmp (string s1, string s2, size_t n);
1438 [CCode (cheader_filename = "string.h")]
1439 public unowned string strncpy (string s1, string s2, size_t n);
1440 [CCode (cheader_filename = "string.h")]
1441 public unowned string? strpbrk (string s1, string s2);
1442 [CCode (cheader_filename = "string.h")]
1443 public unowned string? strrchr (string s, int c);
1444 [CCode (cheader_filename = "string.h")]
1445 public unowned string? strsignal (int signum);
1446 [CCode (cheader_filename = "string.h")]
1447 public size_t strspn (string s1, string s2);
1448 [CCode (cheader_filename = "string.h")]
1449 public unowned string? strstr (string s1, string s2);
1450 [CCode (cheader_filename = "string.h")]
1451 public unowned string? strtok (string s1, string s2);
1452 [CCode (cheader_filename = "string.h")]
1453 public unowned string? strtok_r (string? s, string sep, out unowned string lasts);
1454 [CCode (cheader_filename = "string.h")]
1455 public size_t strxfrm (string s1, string s2, size_t n);
1457 [CCode (cheader_filename = "strings.h")]
1458 public int ffs (int i);
1460 [CCode (cheader_filename = "stropts.h")]
1461 public const int I_PUSH;
1462 [CCode (cheader_filename = "stropts.h")]
1463 public const int I_POP;
1464 [CCode (cheader_filename = "stropts.h")]
1465 public const int I_LOOK;
1466 [CCode (cheader_filename = "stropts.h")]
1467 public const int I_FLUSH;
1468 [CCode (cheader_filename = "stropts.h")]
1469 public const int I_FLUSHBAND;
1470 [CCode (cheader_filename = "stropts.h")]
1471 public const int I_SETSIG;
1472 [CCode (cheader_filename = "stropts.h")]
1473 public const int I_GETSIG;
1474 [CCode (cheader_filename = "stropts.h")]
1475 public const int I_FIND;
1476 [CCode (cheader_filename = "stropts.h")]
1477 public const int I_PEEK;
1478 [CCode (cheader_filename = "stropts.h")]
1479 public const int I_SRDOPT;
1480 [CCode (cheader_filename = "stropts.h")]
1481 public const int I_GRDOPT;
1482 [CCode (cheader_filename = "stropts.h")]
1483 public const int I_NREAD;
1484 [CCode (cheader_filename = "stropts.h")]
1485 public const int I_FDINSERT;
1486 [CCode (cheader_filename = "stropts.h")]
1487 public const int I_STR;
1488 [CCode (cheader_filename = "stropts.h")]
1489 public const int I_SWROPT;
1490 [CCode (cheader_filename = "stropts.h")]
1491 public const int I_GWROPT;
1492 [CCode (cheader_filename = "stropts.h")]
1493 public const int I_SENDFD;
1494 [CCode (cheader_filename = "stropts.h")]
1495 public const int I_RECVFD;
1496 [CCode (cheader_filename = "stropts.h")]
1497 public const int I_LIST;
1498 [CCode (cheader_filename = "stropts.h")]
1499 public const int I_ATMARK;
1500 [CCode (cheader_filename = "stropts.h")]
1501 public const int I_CKBAND;
1502 [CCode (cheader_filename = "stropts.h")]
1503 public const int I_GETBAND;
1504 [CCode (cheader_filename = "stropts.h")]
1505 public const int I_CANPUT;
1506 [CCode (cheader_filename = "stropts.h")]
1507 public const int I_SETCLTIME;
1508 [CCode (cheader_filename = "stropts.h")]
1509 public const int I_GETCLTIME;
1510 [CCode (cheader_filename = "stropts.h")]
1511 public const int I_LINK;
1512 [CCode (cheader_filename = "stropts.h")]
1513 public const int I_UNLINK;
1514 [CCode (cheader_filename = "stropts.h")]
1515 public const int I_PLINK;
1516 [CCode (cheader_filename = "stropts.h")]
1517 public const int I_PUNLINK;
1518 [CCode (cheader_filename = "stropts.h")]
1519 public const int FLUSHR;
1520 [CCode (cheader_filename = "stropts.h")]
1521 public const int FLUSHW;
1522 [CCode (cheader_filename = "stropts.h")]
1523 public const int FLUSHRW;
1524 [CCode (cheader_filename = "stropts.h")]
1525 public const int S_RDNORM;
1526 [CCode (cheader_filename = "stropts.h")]
1527 public const int S_RDBAND;
1528 [CCode (cheader_filename = "stropts.h")]
1529 public const int S_INPUT;
1530 [CCode (cheader_filename = "stropts.h")]
1531 public const int S_HIPRI;
1532 [CCode (cheader_filename = "stropts.h")]
1533 public const int S_OUTPUT;
1534 [CCode (cheader_filename = "stropts.h")]
1535 public const int S_WRNORM;
1536 [CCode (cheader_filename = "stropts.h")]
1537 public const int S_WRBAND;
1538 [CCode (cheader_filename = "stropts.h")]
1539 public const int S_MSG;
1540 [CCode (cheader_filename = "stropts.h")]
1541 public const int S_ERROR;
1542 [CCode (cheader_filename = "stropts.h")]
1543 public const int S_HANGUP;
1544 [CCode (cheader_filename = "stropts.h")]
1545 public const int S_BANDURG;
1546 [CCode (cheader_filename = "stropts.h")]
1547 public const int RS_HIPRI;
1548 [CCode (cheader_filename = "stropts.h")]
1549 public const int RNORM;
1550 [CCode (cheader_filename = "stropts.h")]
1551 public const int RMSGD;
1552 [CCode (cheader_filename = "stropts.h")]
1553 public const int RMSGN;
1554 [CCode (cheader_filename = "stropts.h")]
1555 public const int RPROTNORN;
1556 [CCode (cheader_filename = "stropts.h")]
1557 public const int RPROTDAT;
1558 [CCode (cheader_filename = "stropts.h")]
1559 public const int RPROTDIS;
1560 [CCode (cheader_filename = "stropts.h")]
1561 public const int SNDZERO;
1562 [CCode (cheader_filename = "stropts.h")]
1563 public const int ANYMARK;
1564 [CCode (cheader_filename = "stropts.h")]
1565 public const int LASTMARK;
1566 [CCode (cheader_filename = "stropts.h")]
1567 public const int MUXID_ALL;
1568 [CCode (cheader_filename = "stropts.h")]
1569 public const int MSG_ANY;
1570 [CCode (cheader_filename = "stropts.h")]
1571 public const int MSG_BAND;
1572 [CCode (cheader_filename = "stropts.h")]
1573 public const int MSG_HIPRI;
1574 [CCode (cheader_filename = "stropts.h")]
1575 public const int MORECTL;
1576 [CCode (cheader_filename = "stropts.h")]
1577 public const int MOREDATA;
1578 [CCode (cheader_filename = "sys/ioctl.h", sentinel = "")]
1579 public int ioctl (int fildes, int request, ...);
1581 [CCode (cheader_filename = "sys/ipc.h")]
1582 public const int IPC_CREAT;
1583 [CCode (cheader_filename = "sys/ipc.h")]
1584 public const int IPC_EXCL;
1585 [CCode (cheader_filename = "sys/ipc.h")]
1586 public const int IPC_NOWAIT;
1587 [CCode (cheader_filename = "sys/ipc.h")]
1588 public const key_t IPC_PRIVATE;
1589 [CCode (cheader_filename = "sys/ipc.h")]
1590 public const int IPC_RMID;
1591 [CCode (cheader_filename = "sys/ipc.h")]
1592 public const int IPC_SET;
1593 [CCode (cheader_filename = "sys/ipc.h")]
1594 public const int IPC_STAT;
1595 [CCode (cheader_filename = "sys/ipc.h")]
1596 public const int IPC_R;
1597 [CCode (cheader_filename = "sys/ipc.h")]
1598 public const int IPC_W;
1599 [CCode (cheader_filename = "sys/ipc.h")]
1600 public const int IPC_M;
1601 [CCode (cheader_filename = "sys/ipc.h")]
1602 public key_t ftok (string pathname, int proj_id);
1604 [CCode (cheader_filename = "syslog.h")]
1605 public void openlog (string ident, int option, int facility );
1607 [CCode (cheader_filename = "syslog.h")]
1608 public int setlogmask (int mask);
1610 [CCode (cheader_filename = "syslog.h")]
1611 public int LOG_UPTO (int pri);
1613 [CCode (cheader_filename = "syslog.h"), PrintfFormat]
1614 public void syslog (int priority, string format, ... );
1616 [CCode (cheader_filename = "syslog.h")]
1617 public void closelog ();
1619 [CCode (cheader_filename = "syslog.h")]
1620 public const int LOG_PID;
1621 [CCode (cheader_filename = "syslog.h")]
1622 public const int LOG_CONS;
1623 [CCode (cheader_filename = "syslog.h")]
1624 public const int LOG_ODELAY;
1625 [CCode (cheader_filename = "syslog.h")]
1626 public const int LOG_NDELAY;
1627 [CCode (cheader_filename = "syslog.h")]
1628 public const int LOG_NOWAIT;
1629 [CCode (cheader_filename = "syslog.h")]
1630 public const int LOG_EMERG;
1631 [CCode (cheader_filename = "syslog.h")]
1632 public const int LOG_ALERT;
1633 [CCode (cheader_filename = "syslog.h")]
1634 public const int LOG_CRIT;
1635 [CCode (cheader_filename = "syslog.h")]
1636 public const int LOG_ERR;
1637 [CCode (cheader_filename = "syslog.h")]
1638 public const int LOG_WARNING;
1639 [CCode (cheader_filename = "syslog.h")]
1640 public const int LOG_NOTICE;
1641 [CCode (cheader_filename = "syslog.h")]
1642 public const int LOG_INFO;
1643 [CCode (cheader_filename = "syslog.h")]
1644 public const int LOG_DEBUG;
1645 [CCode (cheader_filename = "syslog.h")]
1646 public const int LOG_KERN;
1647 [CCode (cheader_filename = "syslog.h")]
1648 public const int LOG_USER;
1649 [CCode (cheader_filename = "syslog.h")]
1650 public const int LOG_MAIL;
1651 [CCode (cheader_filename = "syslog.h")]
1652 public const int LOG_DAEMON;
1653 [CCode (cheader_filename = "syslog.h")]
1654 public const int LOG_SYSLOG;
1655 [CCode (cheader_filename = "syslog.h")]
1656 public const int LOG_LPR;
1657 [CCode (cheader_filename = "syslog.h")]
1658 public const int LOG_NEWS;
1659 [CCode (cheader_filename = "syslog.h")]
1660 public const int LOG_UUCP;
1661 [CCode (cheader_filename = "syslog.h")]
1662 public const int LOG_CRON;
1663 [CCode (cheader_filename = "syslog.h")]
1664 public const int LOG_AUTHPRIV;
1665 [CCode (cheader_filename = "syslog.h")]
1666 public const int LOG_FTP;
1667 [CCode (cheader_filename = "syslog.h")]
1668 public const int LOG_LOCAL0;
1669 [CCode (cheader_filename = "syslog.h")]
1670 public const int LOG_LOCAL1;
1671 [CCode (cheader_filename = "syslog.h")]
1672 public const int LOG_LOCAL2;
1673 [CCode (cheader_filename = "syslog.h")]
1674 public const int LOG_LOCAL3;
1675 [CCode (cheader_filename = "syslog.h")]
1676 public const int LOG_LOCAL4;
1677 [CCode (cheader_filename = "syslog.h")]
1678 public const int LOG_LOCAL5;
1679 [CCode (cheader_filename = "syslog.h")]
1680 public const int LOG_LOCAL6;
1681 [CCode (cheader_filename = "syslog.h")]
1682 public const int LOG_LOCAL7;
1684 [CCode (cheader_filename = "sys/socket.h")]
1685 public const int SOCK_DGRAM;
1686 [CCode (cheader_filename = "sys/socket.h")]
1687 public const int SOCK_RAW;
1688 [CCode (cheader_filename = "sys/socket.h")]
1689 public const int SOCK_SEQPACKET;
1690 [CCode (cheader_filename = "sys/socket.h")]
1691 public const int SOCK_STREAM;
1692 [CCode (cheader_filename = "sys/socket.h")]
1693 public const int AF_UNSPEC;
1694 [CCode (cheader_filename = "sys/socket.h")]
1695 public const int AF_INET;
1696 [CCode (cheader_filename = "sys/socket.h")]
1697 public const int AF_INET6;
1698 [CCode (cheader_filename = "sys/socket.h")]
1699 public const int AF_UNIX;
1701 [CCode (cheader_filename = "sys/socket.h")]
1702 public const int SHUT_RD;
1703 [CCode (cheader_filename = "sys/socket.h")]
1704 public const int SHUT_WR;
1705 [CCode (cheader_filename = "sys/socket.h")]
1706 public const int SHUT_RDWR;
1708 [CCode (cheader_filename = "netdb.h")]
1709 public const int AI_PASSIVE;
1710 [CCode (cheader_filename = "netdb.h")]
1711 public const int AI_CANONNAME;
1712 [CCode (cheader_filename = "netdb.h")]
1713 public const int AI_NUMERICHOST;
1714 [CCode (cheader_filename = "netdb.h")]
1715 public const int AI_V4MAPPED;
1716 [CCode (cheader_filename = "netdb.h")]
1717 public const int AI_ALL;
1718 [CCode (cheader_filename = "netdb.h")]
1719 public const int AI_ADDRCONFIG;
1720 [CCode (cheader_filename = "netdb.h")]
1721 public const int AI_IDN;
1722 [CCode (cheader_filename = "netdb.h")]
1723 public const int AI_CANONIDN;
1724 [CCode (cheader_filename = "netdb.h")]
1725 public const int AI_IDN_ALLOW_UNASSIGNED;
1726 [CCode (cheader_filename = "netdb.h")]
1727 public const int AI_IDN_USE_STD3_ASCII_RULES;
1728 [CCode (cheader_filename = "netdb.h")]
1729 public const int AI_NUMERICSERV;
1731 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1732 public int accept (int sfd, ... );
1733 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1734 public int bind (int sockfd, ...);
1735 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1736 public int connect(int sfd, ... );
1737 [CCode (cheader_filename = "sys/socket.h")]
1738 public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
1739 [CCode (cheader_filename = "sys/socket.h")]
1740 public int listen (int sfd, int backlog);
1741 [CCode (cheader_filename = "sys/socket.h")]
1742 public ssize_t recv (int sockfd, void *buf, size_t len, int flags);
1743 [CCode (cheader_filename = "sys/socket.h")]
1744 public ssize_t send (int sockfd, void* buf, size_t len, int flags);
1745 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1746 public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
1747 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1748 public ssize_t sendmsg (int sockfd, ...);
1749 [CCode (cheader_filename = "sys/socket.h")]
1750 public int setsockopt (int sockfd, int level, int optname, void* optval, socklen_t optlen);
1751 [CCode (cheader_filename = "sys/socket.h")]
1752 public int shutdown (int sockfd, int how);
1753 [CCode (cheader_filename = "sys/socket.h")]
1754 public int socket (int domain, int type, int protocol);
1755 [CCode (cheader_filename = "sys/socket.h")]
1756 public int socketpair (int domain, int type, int protocol, [CCode (array_length = false)] int[] sv);
1757 [CCode (cheader_filename = "netdb.h")]
1758 public int getaddrinfo (string node, string service, AddrInfo hints, out AddrInfo *res);
1759 [CCode (cheader_filename = "netdb.h")]
1760 public void freeaddrinfo (AddrInfo *res);
1761 [CCode (cheader_filename = "netdb.h")]
1762 public unowned string gai_strerror (int errcode);
1763 [CCode (cheader_filename = "netdb.h")]
1764 public unowned HostEnt? gethostbyname (string name);
1766 [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0", has_type_id = false)]
1767 public struct socklen_t : int {
1771 [CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h,netinet/in.h", destroy_function = "", has_type_id = false)]
1772 public struct InAddr {
1773 public uint32 s_addr;
1776 [CCode (cname = "struct in6_addr", cheader_filename = "sys/socket.h,netinet/in.h", destroy_function = "", has_type_id = false)]
1777 public struct In6Addr {
1778 public uint8 s6_addr[16];
1781 [CCode (cname = "struct sockaddr", cheader_filename = "sys/socket.h", destroy_function = "", has_type_id = false)]
1782 public struct SockAddr {
1783 public int sa_family;
1784 [CCode (array_length = false)]
1785 public char[] sa_data;
1788 [CCode (cname = "struct sockaddr_in", cheader_filename = "netinet/in.h", destroy_function = "", has_type_id = false)]
1789 public struct SockAddrIn {
1790 public int sin_family;
1791 public uint16 sin_port;
1792 public InAddr sin_addr;
1795 [CCode (cname = "struct sockaddr_in6", cheader_filename = "netinet/in.h", destroy_function = "", has_type_id = false)]
1796 public struct SockAddrIn6 {
1797 public int sin6_family;
1798 public uint16 sin6_port;
1799 public uint32 sin6_flowinfo;
1800 public In6Addr sin6_addr;
1801 public uint32 sin6_scope_id;
1804 [CCode (cname = "struct addrinfo", cheader_filename = "netdb.h", destroy_function = "", has_type_id = false)]
1805 public struct AddrInfo {
1806 public int ai_flags;
1807 public int ai_family;
1808 public int ai_socktype;
1809 public int ai_protocol;
1810 public socklen_t ai_addrlen;
1811 public SockAddr *ai_addr;
1812 public string ai_canonname;
1813 public AddrInfo *ai_next;
1817 [CCode (cname = "struct hostent", cheader_filename = "netdb.h", destroy_function = "", has_type_id = false)]
1818 public class HostEnt {
1819 public string h_name;
1820 [CCode (array_length=false, array_null_terminated=true)]
1821 public string[] h_aliases;
1822 public int h_addrtype;
1823 public int h_length;
1824 [CCode (array_length=false, array_null_terminated=true)]
1825 public string[] h_addr_list;
1828 [CCode (cname = "struct msqid_ds", cheader_filename = "sys/msg.h", free_function = "", has_type_id = false)]
1829 public struct MsqIdDs {
1832 [CCode (cname = "short", cheader_filename = "sys/msg.h", cprefix = "MSG_", has_type_id = false)]
1833 public enum MsqCmd {
1838 [CCode (cheader_filename = "sys/msg.h")]
1839 public const int MSG_COPY;
1840 [CCode (cheader_filename = "sys/msg.h")]
1841 public const int MSG_EXCEPT;
1842 [CCode (cheader_filename = "sys/msg.h")]
1843 public const int MSG_NOERROR;
1844 [CCode (cheader_filename = "sys/msg.h")]
1845 public int msgctrl (int msqid, MsqCmd cmd, MsqIdDs buf);
1846 [CCode (cheader_filename = "sys/msg.h")]
1847 public int msgget (key_t key, int msgflg = 0);
1848 [CCode (cheader_filename = "sys/msg.h")]
1849 public ssize_t msgrcv (int msqid, uint8[] buf, long msgtyp = 0, int msgflg = 0);
1850 [CCode (cheader_filename = "sys/msg.h")]
1851 public int msgsnd (int msqid, uint8[] buf, int msgflg = 0);
1853 [CCode (cname = "struct sembuf", cheader_filename = "sys/sem.h", free_function = "", has_type_id = false)]
1854 public struct SemBuf {
1855 public ushort sem_num;
1856 public SemCmd sem_op;
1857 public short sem_flg;
1860 [CCode (cname = "short", cheader_filename = "sys/sem.h", cprefix = "", has_type_id = false)]
1861 public enum SemCmd {
1874 [CCode (cheader_filename = "sys/sem.h")]
1875 public const short SEM_UNDO;
1876 [CCode (cheader_filename = "sys/sem.h")]
1877 public int semctl (int semid, int semnum, int cmd, ...);
1878 [CCode (cheader_filename = "sys/sem.h")]
1879 public int semget (key_t key, int nsems, int semflg = 0);
1880 [CCode (cheader_filename = "sys/sem.h")]
1881 public int semop (int semid, SemBuf[] sops);
1883 [CCode (cheader_filename = "sys/shm.h")]
1884 public void* shmat (int shmid, void* shmaddr, int shmflg = 0);
1885 [CCode (cheader_filename = "sys/shm.h")]
1886 public int shmdt (void* shmaddr);
1887 [CCode (cheader_filename = "sys/shm.h")]
1888 public int shmget (key_t key, size_t size, int shmflg = 0);
1890 [CCode (cheader_filename = "sys/stat.h")]
1891 public int mkfifo (string filename, mode_t mode);
1893 [CCode (cheader_filename = "sys/stat.h")]
1894 public const mode_t S_IFMT;
1895 [CCode (cheader_filename = "sys/stat.h")]
1896 public const mode_t S_IFBLK;
1897 [CCode (cheader_filename = "sys/stat.h")]
1898 public const mode_t S_IFCHR;
1899 [CCode (cheader_filename = "sys/stat.h")]
1900 public const mode_t S_IFIFO;
1901 [CCode (cheader_filename = "sys/stat.h")]
1902 public const mode_t S_IFREG;
1903 [CCode (cheader_filename = "sys/stat.h")]
1904 public const mode_t S_IFDIR;
1905 [CCode (cheader_filename = "sys/stat.h")]
1906 public const mode_t S_IFLNK;
1907 [CCode (cheader_filename = "sys/stat.h")]
1908 public const mode_t S_IFSOCK;
1910 [CCode (cheader_filename = "sys/stat.h")]
1911 public const mode_t S_IRWXU;
1912 [CCode (cheader_filename = "sys/stat.h")]
1913 public const mode_t S_IRUSR;
1914 [CCode (cheader_filename = "sys/stat.h")]
1915 public const mode_t S_IWUSR;
1916 [CCode (cheader_filename = "sys/stat.h")]
1917 public const mode_t S_IXUSR;
1918 [CCode (cheader_filename = "sys/stat.h")]
1919 public const mode_t S_IRWXG;
1920 [CCode (cheader_filename = "sys/stat.h")]
1921 public const mode_t S_IRGRP;
1922 [CCode (cheader_filename = "sys/stat.h")]
1923 public const mode_t S_IWGRP;
1924 [CCode (cheader_filename = "sys/stat.h")]
1925 public const mode_t S_IXGRP;
1926 [CCode (cheader_filename = "sys/stat.h")]
1927 public const mode_t S_IRWXO;
1928 [CCode (cheader_filename = "sys/stat.h")]
1929 public const mode_t S_IROTH;
1930 [CCode (cheader_filename = "sys/stat.h")]
1931 public const mode_t S_IWOTH;
1932 [CCode (cheader_filename = "sys/stat.h")]
1933 public const mode_t S_IXOTH;
1934 [CCode (cheader_filename = "sys/stat.h")]
1935 public const mode_t S_ISUID;
1936 [CCode (cheader_filename = "sys/stat.h")]
1937 public const mode_t S_ISGID;
1938 [CCode (cheader_filename = "sys/stat.h")]
1939 public const mode_t S_ISVTX;
1941 [CCode (cheader_filename = "sys/stat.h")]
1942 public bool S_ISBLK (mode_t mode);
1943 [CCode (cheader_filename = "sys/stat.h")]
1944 public bool S_ISCHR (mode_t mode);
1945 [CCode (cheader_filename = "sys/stat.h")]
1946 public bool S_ISDIR (mode_t mode);
1947 [CCode (cheader_filename = "sys/stat.h")]
1948 public bool S_ISFIFO (mode_t mode);
1949 [CCode (cheader_filename = "sys/stat.h")]
1950 public bool S_ISREG (mode_t mode);
1951 [CCode (cheader_filename = "sys/stat.h")]
1952 public bool S_ISLNK (mode_t mode);
1953 [CCode (cheader_filename = "sys/stat.h")]
1954 public bool S_ISSOCK (mode_t mode);
1956 [CCode (cheader_filename = "sys/stat.h", cname = "struct stat", has_type_id = false)]
1957 public struct Stat {
1958 public dev_t st_dev;
1959 public ino_t st_ino;
1960 public mode_t st_mode;
1961 public nlink_t st_nlink;
1962 public uid_t st_uid;
1963 public gid_t st_gid;
1964 public dev_t st_rdev;
1965 public size_t st_size;
1966 public timespec st_atim;
1967 public time_t st_atime;
1968 public timespec st_mtim;
1969 public time_t st_mtime;
1970 public timespec st_ctim;
1971 public time_t st_ctime;
1972 public blksize_t st_blksize;
1973 public blkcnt_t st_blocks;
1975 [CCode (cheader_filename = "sys/stat.h")]
1976 int fstat( int fd, out Stat buf);
1977 [CCode (cheader_filename = "sys/stat.h")]
1978 int stat (string filename, out Stat buf);
1979 [CCode (cheader_filename = "sys/stat.h")]
1980 int lstat (string filename, out Stat buf);
1982 [CCode (cheader_filename = "sys/stat.h")]
1983 public int chmod (string filename, mode_t mode);
1984 [CCode (cheader_filename = "sys/stat.h")]
1985 public int fchmod (int fd, mode_t mode);
1986 [CCode (cheader_filename = "sys/stat.h")]
1987 public mode_t umask (mode_t mask);
1988 [CCode (cheader_filename = "sys/stat.h")]
1989 public int mkdir (string path, mode_t mode);
1990 [CCode (cheader_filename = "sys/types.h,sys/stat.h,fcntl.h,unistd.h")]
1991 public pid_t mknod (string pathname, mode_t mode, dev_t dev);
1993 [CCode (cheader_filename = "sys/stat.h")]
1994 public int utimensat (int dirfd, string pathname, [CCode (array_length = false)] timespec[] times, int flags = 0);
1995 [CCode (cheader_filename = "sys/stat.h")]
1996 public int futimens (int fd, [CCode (array_length = false)] timespec[] times);
1998 [CCode (cheader_filename = "sys/wait.h")]
1999 public pid_t wait (out int status);
2000 [CCode (cheader_filename = "sys/wait.h")]
2001 public pid_t waitpid (pid_t pid, out int status, int options);
2002 [CCode (cheader_filename = "sys/wait.h")]
2003 public const int WNOHANG;
2004 [CCode (cheader_filename = "sys/wait.h")]
2005 public const int WUNTRACED;
2006 [CCode (cheader_filename = "sys/wait.h")]
2007 public const int WCONTINUED;
2010 [IntegerType (rank = 9)]
2011 [CCode (cheader_filename = "sys/types.h", cname = "key_t", has_type_id = false)]
2012 public struct key_t {
2016 [IntegerType (rank = 9)]
2017 [CCode (cheader_filename = "sys/statvfs.h", has_type_id = false)]
2018 public struct fsblkcnt_t {
2022 [IntegerType (rank = 9)]
2023 [CCode (cheader_filename = "sys/statvfs.h", has_type_id = false)]
2024 public struct fsfilcnt_t {
2027 [CCode (cheader_filename = "sys/statvfs.h", cname = "struct statvfs", has_type_id = false)]
2028 public struct statvfs {
2029 public ulong f_bsize;
2030 public ulong f_frsize;
2031 public fsblkcnt_t f_blocks;
2032 public fsblkcnt_t f_bfree;
2033 public fsblkcnt_t f_bavail;
2034 public fsfilcnt_t f_files;
2035 public fsfilcnt_t f_ffree;
2036 public fsfilcnt_t f_favail;
2039 [CCode (cheader_filename = "sys/statvfs.h", cname = "statvfs")]
2040 public int statvfs_exec (string path, out statvfs buf);
2041 [CCode (cheader_filename = "sys/statvfs.h")]
2042 public int fstatvfs (int fs, out statvfs buf);
2045 [IntegerType (rank = 9)]
2046 [CCode (cname="off_t", cheader_filename = "sys/types.h", has_type_id = false)]
2047 public struct off_t {
2051 [IntegerType (rank = 9)]
2052 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2053 public struct uid_t {
2057 [IntegerType (rank = 9)]
2058 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2059 public struct gid_t {
2063 [IntegerType (rank = 9)]
2064 [CCode (cname = "mode_t", cheader_filename = "sys/types.h", has_type_id = false)]
2065 public struct mode_t {
2069 [IntegerType (rank = 9)]
2070 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2071 public struct dev_t {
2074 [CCode (cheader_filename = "sys/sysmacros.h")]
2075 uint major (dev_t dev);
2076 [CCode (cheader_filename = "sys/sysmacros.h")]
2077 uint minor (dev_t dev);
2078 [CCode (cheader_filename = "sys/sysmacros.h")]
2079 dev_t makedev (int maj, int min);
2082 [IntegerType (rank = 9)]
2083 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2084 public struct ino_t {
2088 [IntegerType (rank = 9)]
2089 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2090 public struct nlink_t {
2094 [IntegerType (rank = 9)]
2095 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2096 public struct blksize_t {
2100 [IntegerType (rank = 9)]
2101 [CCode (cheader_filename = "sys/types.h", has_type_id = false)]
2102 public struct blkcnt_t {
2105 [CCode (cheader_filename = "time.h", has_type_id = false)]
2106 [IntegerType (rank = 8)]
2107 public struct clock_t {
2108 [CCode (cname = "clock")]
2112 [CCode (cheader_filename = "time.h")]
2113 public unowned string? ctime (ref time_t clock);
2115 [CCode (cname = "struct tm", cheader_filename = "time.h", has_type_id = false)]
2125 public int tm_isdst;
2128 [CCode (cname = "struct timespec", cheader_filename = "time.h", has_type_id = false)]
2129 public struct timespec {
2130 public time_t tv_sec;
2131 public long tv_nsec;
2134 [CCode (array_length = false, cheader_filename = "time.h")]
2135 public string[] tzname;
2136 [CCode (cheader_filename = "time.h")]
2137 public const long timezone;
2138 [CCode (cheader_filename = "time.h")]
2139 public const int daylight;
2141 [CCode (cheader_filename = "time.h")]
2142 public void tzset ();
2146 [CCode (cheader_filename = "time.h", has_type_id = false)]
2147 public struct clockid_t {
2150 [CCode (cheader_filename = "time.h")]
2151 public const clockid_t CLOCK_REALTIME;
2152 [CCode (cheader_filename = "time.h")]
2153 public const clockid_t CLOCK_MONOTONIC;
2154 [CCode (cheader_filename = "time.h")]
2155 public const clockid_t CLOCK_PROCESS_CPUTIME_ID;
2156 [CCode (cheader_filename = "time.h")]
2157 public const clockid_t CLOCK_THREAD_CPUTIME_ID;
2158 [CCode (cheader_filename = "time.h")]
2159 public const clockid_t CLOCK_REALTIME_COARSE;
2160 [CCode (cheader_filename = "time.h")]
2161 public const clockid_t CLOCK_MONOTONIC_COARSE;
2163 [CCode (cheader_filename = "time.h")]
2164 int clock_gettime (clockid_t clk_id, out timespec tp);
2166 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
2167 public int getpriority (int which, int who);
2168 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
2169 public int setpriority (int which, int who, int prio);
2171 [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h", has_type_id = false)]
2172 public struct iovector {
2173 public void* iov_base;
2174 public size_t iov_len;
2177 [CCode (cheader_filename = "unistd.h")]
2178 public int close (int fd);
2179 [CCode (cheader_filename = "unistd.h")]
2180 public int execl (string path, params string[] arg);
2181 [CCode (cheader_filename = "unistd.h")]
2182 public int execlp (string path, params string[] arg);
2183 [CCode (cheader_filename = "unistd.h")]
2184 public int execv (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
2185 [CCode (cheader_filename = "unistd.h")]
2186 public int execvp (string path, [CCode (array_length = false, null_terminated = true)] string[] arg);
2187 [CCode (cheader_filename = "unistd.h")]
2188 public int pipe ([CCode (array_length = false, null_terminated = false)] int[] pipefd);
2189 [CCode (cheader_filename = "unistd.h")]
2190 public ssize_t read (int fd, void* buf, size_t count);
2191 [CCode (cheader_filename = "unistd.h")]
2192 public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
2193 [CCode (cheader_filename = "unistd.h")]
2194 public ssize_t readlink (string path, char[] buf);
2195 [CCode (cheader_filename = "sys/uio.h")]
2196 public ssize_t readv (int fd, iovector vector, int iovcnt = 1);
2197 [CCode (cname = "readv", cheader_filename = "sys/uio.h")]
2198 public ssize_t read_vectors (int fd, iovector[] vector);
2199 [CCode (cheader_filename = "unistd.h,sys/types.h")]
2200 public int setegid (gid_t egid);
2201 [CCode (cheader_filename = "unistd.h,sys/types.h")]
2202 public int seteuid (gid_t euid);
2203 [CCode (cheader_filename = "unistd.h,sys/types.h")]
2204 public int setgid (gid_t gid);
2205 [CCode (cheader_filename = "unistd.h,sys/types.h")]
2206 public int setuid (uid_t uid);
2207 [CCode (cheader_filename = "unistd.h")]
2208 public int unlink (string filename);
2209 [CCode (cheader_filename = "unistd.h")]
2210 public ssize_t write (int fd, void* buf, size_t count);
2211 [CCode (cheader_filename = "unistd.h")]
2212 public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
2213 [CCode (cheader_filename = "sys/uio.h")]
2214 public ssize_t writev (int fd, iovector vector, int iovcnt = 1);
2215 [CCode (cname = "writev", cheader_filename = "sys/uio.h")]
2216 public ssize_t write_vectors (int fd, iovector[] vector);
2217 [CCode (cheader_filename = "unistd.h")]
2218 public off_t lseek(int fildes, off_t offset, int whence);
2220 [CCode (cheader_filename = "unistd.h")]
2221 public const int SEEK_SET;
2222 [CCode (cheader_filename = "unistd.h")]
2223 public const int SEEK_CUR;
2224 [CCode (cheader_filename = "unistd.h")]
2225 public const int SEEK_END;
2227 [CCode (cheader_filename = "unistd.h")]
2228 public pid_t fork ();
2229 [CCode (cheader_filename = "unistd.h")]
2230 public pid_t vfork ();
2231 [CCode (cheader_filename = "unistd.h")]
2232 public unowned string ttyname (int fd);
2233 [CCode (cheader_filename = "unistd.h")]
2234 public int ttyname_r (int fd, char[] buf);
2235 [CCode (cheader_filename = "unistd.h")]
2236 public bool isatty (int fd);
2237 [CCode (cheader_filename = "unistd.h")]
2238 public int link (string from, string to);
2239 [CCode (cheader_filename = "unistd.h")]
2240 public int symlink (string from, string to);
2241 [CCode (cheader_filename = "unistd.h")]
2242 public long sysconf (int name);
2243 [CCode (cheader_filename = "unistd.h")]
2244 public int rmdir (string path);
2245 [CCode (cheader_filename = "unistd.h")]
2246 public pid_t tcgetpgrp (int fd);
2247 [CCode (cheader_filename = "unistd.h")]
2248 public int tcsetpgrp (int fd, pid_t pgrp_id);
2249 [CCode (cheader_filename = "unistd.h")]
2250 public unowned string getlogin ();
2251 [CCode (cheader_filename = "unistd.h")]
2252 public int vhangup ();
2253 [CCode (cheader_filename = "unistd.h")]
2254 public int revoke (string file);
2255 [CCode (cheader_filename = "unistd.h")]
2256 public int acct (string name);
2257 [CCode (cheader_filename = "unistd.h")]
2258 public unowned string getusershell ();
2259 [CCode (cheader_filename = "unistd.h")]
2260 public void endusershell ();
2261 [CCode (cheader_filename = "unistd.h")]
2262 public void setusershell ();
2263 [CCode (cheader_filename = "unistd.h")]
2264 public int chroot (string path);
2265 [Version (deprecated_since = "POSIX.2", replacement = "termios ECHO flag")]
2266 [CCode (cheader_filename = "unistd.h")]
2267 public unowned string? getpass (string prompt);
2268 [CCode (cheader_filename = "unistd.h", feature_test_macro = "_XOPEN_SOURCE")]
2269 public unowned string? crypt (string key, string salt);
2270 [CCode (cheader_filename = "unistd.h")]
2271 public int getpagesize ();
2272 [CCode (cheader_filename = "unistd.h")]
2273 public int getdtablesize ();
2275 [CCode (cheader_filename = "unistd.h")]
2276 public const int _SC_ARG_MAX;
2277 [CCode (cheader_filename = "unistd.h")]
2278 public const int _SC_CHILD_MAX;
2279 [CCode (cheader_filename = "unistd.h")]
2280 public const int _SC_HOST_NAME_MAX;
2281 [CCode (cheader_filename = "unistd.h")]
2282 public const int _SC_LOGIN_NAME_MAX;
2283 [CCode (cheader_filename = "unistd.h")]
2284 public const int _SC_CLK_TCK;
2285 [CCode (cheader_filename = "unistd.h")]
2286 public const int _SC_OPEN_MAX;
2287 [CCode (cheader_filename = "unistd.h")]
2288 public const int _SC_PAGESIZE;
2289 [CCode (cheader_filename = "unistd.h")]
2290 public const int _SC_RE_DUP_MAX;
2291 [CCode (cheader_filename = "unistd.h")]
2292 public const int _SC_STREAM_MAX;
2293 [CCode (cheader_filename = "unistd.h")]
2294 public const int _SC_SYMLOOP_MAX;
2295 [CCode (cheader_filename = "unistd.h")]
2296 public const int _SC_TTY_NAME_MAX;
2297 [CCode (cheader_filename = "unistd.h")]
2298 public const int _SC_TZNAME_MAX;
2299 [CCode (cheader_filename = "unistd.h")]
2300 public const int _SC_VERSION;
2301 [CCode (cheader_filename = "unistd.h")]
2302 public const int _SC_BASE_MAX;
2303 [CCode (cheader_filename = "unistd.h")]
2304 public const int _SC_BC_DIM_MAX;
2305 [CCode (cheader_filename = "unistd.h")]
2306 public const int _SC_BC_SCALE_MAX;
2307 [CCode (cheader_filename = "unistd.h")]
2308 public const int _SC_BC_STRING_MAX;
2309 [CCode (cheader_filename = "unistd.h")]
2310 public const int _SC_COLL_WEIGHTS_MAX;
2311 [CCode (cheader_filename = "unistd.h")]
2312 public const int _SC_EXRP_NEST_MAX;
2313 [CCode (cheader_filename = "unistd.h")]
2314 public const int _SC_LINE_MAX;
2315 [CCode (cheader_filename = "unistd.h")]
2316 public const int _SC_2_VERSION;
2317 [CCode (cheader_filename = "unistd.h")]
2318 public const int _SC_2_C_DEV;
2319 [CCode (cheader_filename = "unistd.h")]
2320 public const int _SC_2_FORT_DEV;
2321 [CCode (cheader_filename = "unistd.h")]
2322 public const int _SC_2_FORT_RUN;
2323 [CCode (cheader_filename = "unistd.h")]
2324 public const int _SC_2_LOCALEDEF;
2325 [CCode (cheader_filename = "unistd.h")]
2326 public const int _SC_2_SW_DEV;
2328 [CCode (cheader_filename = "unistd.h")]
2329 public const int STDIN_FILENO;
2330 [CCode (cheader_filename = "unistd.h")]
2331 public const int STDOUT_FILENO;
2332 [CCode (cheader_filename = "unistd.h")]
2333 public const int STDERR_FILENO;
2334 [CCode (cheader_filename = "unistd.h")]
2335 public const int R_OK;
2336 [CCode (cheader_filename = "unistd.h")]
2337 public const int W_OK;
2338 [CCode (cheader_filename = "unistd.h")]
2339 public const int X_OK;
2340 [CCode (cheader_filename = "unistd.h")]
2341 public const int F_OK;
2343 [CCode (cheader_filename = "unistd.h")]
2344 public int access (string patchname, int mode);
2345 [CCode (cheader_filename = "unistd.h")]
2346 public int euidaccess (string patchname, int mode);
2347 [CCode (cheader_filename = "unistd.h")]
2348 public int eaccess (string patchname, int mode);
2350 [CCode (cheader_filename = "unistd.h")]
2351 public uint alarm (uint seconds);
2352 [CCode (cheader_filename = "unistd.h")]
2353 public uint ualarm (uint useconds);
2354 [CCode (cheader_filename = "unistd.h")]
2355 public uint sleep (uint seconds);
2356 [CCode (cheader_filename = "unistd.h")]
2357 public uint usleep (uint useconds);
2358 [CCode (cheader_filename = "unistd.h")]
2359 public int pause ();
2360 [CCode (cheader_filename = "unistd.h")]
2361 public int chown (string filename, uid_t owner, gid_t group);
2362 [CCode (cheader_filename = "unistd.h")]
2363 public int fchown (int fd, uid_t owner, gid_t group);
2364 [CCode (cheader_filename = "unistd.h")]
2365 public int lchown (string filename, uid_t owner, gid_t group);
2366 [CCode (cheader_filename = "unistd.h")]
2367 public int chdir (string filepath);
2368 [CCode (cheader_filename = "unistd.h")]
2369 public int fchdir (int file);
2370 [CCode (cheader_filename = "unistd.h")]
2371 public int dup (int fd);
2372 [CCode (cheader_filename = "unistd.h")]
2373 public int dup2 (int fd1, int fd2);
2374 [CCode (cheader_filename = "unistd.h")]
2375 public int gethostname (char[] name);
2376 [CCode (cheader_filename = "unistd.h")]
2377 public pid_t getpid ();
2378 [CCode (cheader_filename = "unistd.h")]
2379 public pid_t getppid ();
2380 [CCode (cheader_filename = "unistd.h")]
2381 public pid_t getpgrp ();
2382 [CCode (cheader_filename = "unistd.h")]
2383 public pid_t getpgid (pid_t pid);
2384 [CCode (cheader_filename = "unistd.h")]
2385 public int setpgid (pid_t pid, pid_t pgid);
2386 [CCode (cheader_filename = "unistd.h")]
2387 public pid_t setpgrp ();
2388 [CCode (cheader_filename = "unistd.h")]
2389 public pid_t getsid (pid_t pid);
2390 [CCode (cheader_filename = "unistd.h")]
2391 public uid_t getuid ();
2392 [CCode (cheader_filename = "unistd.h")]
2393 public uid_t geteuid ();
2394 [CCode (cheader_filename = "unistd.h")]
2395 public gid_t getgid ();
2396 [CCode (cheader_filename = "unistd.h")]
2397 public gid_t getegid ();
2398 [CCode (cheader_filename = "unistd.h")]
2399 public int group_member (gid_t gid);
2400 [CCode (cheader_filename = "unistd.h")]
2401 public pid_t setsid ();
2402 [CCode (cheader_filename = "unistd.h")]
2403 public pid_t tcgetsid (int fd);
2405 [CCode (cheader_filename = "unistd.h")]
2406 public int fsync (int fd);
2407 [CCode (cheader_filename = "unistd.h")]
2408 public int fdatasync (int fd);
2409 [CCode (cheader_filename = "unistd.h")]
2412 [CCode (cheader_filename = "unistd.h")]
2413 public int ftruncate(int fd, off_t length);
2414 [CCode (cheader_filename = "unistd.h")]
2415 public int truncate(string path, off_t length);
2416 [CCode (cheader_filename = "unistd.h")]
2417 public int nice (int inc);
2420 [CCode (cname = "cc_t", cheader_filename = "termios.h", has_type_id = false)]
2421 [IntegerType (rank = 3, min = 0, max = 255)]
2422 public struct cc_t {
2426 [CCode (cname = "speed_t", cheader_filename = "termios.h", has_type_id = false)]
2427 [IntegerType (rank = 7)]
2428 public struct speed_t {
2432 [CCode (cname = "tcflag_t", cheader_filename = "termios.h", has_type_id = false)]
2433 [IntegerType (rank = 7)]
2434 public struct tcflag_t {
2437 [CCode (cname="struct termios", cheader_filename = "termios.h", has_type_id = false)]
2438 public struct termios
2440 public tcflag_t c_iflag;
2441 public tcflag_t c_oflag;
2442 public tcflag_t c_cflag;
2443 public tcflag_t c_lflag;
2445 public cc_t c_cc[32];
2446 public speed_t c_ispeed;
2447 public speed_t c_ospeed;
2450 [CCode (cheader_filename = "termios.h")]
2451 public int tcgetattr (int fd, out termios termios_p);
2452 [CCode (cheader_filename = "termios.h")]
2453 public int tcsetattr (int fd, int optional_actions, termios termios_p);
2454 [CCode (cheader_filename = "termios.h")]
2455 public int tcsendbreak (int fd, int duration);
2456 [CCode (cheader_filename = "termios.h")]
2457 public int tcdrain (int fd);
2458 [CCode (cheader_filename = "termios.h")]
2459 public int tcflush (int fd, int queue_selector);
2460 [CCode (cheader_filename = "termios.h")]
2461 public int tcflow (int fd, int action);
2462 [CCode (cheader_filename = "termios.h")]
2463 public void cfmakeraw (ref termios termios_p);
2464 [CCode (cheader_filename = "termios.h")]
2465 public speed_t cfgetispeed (termios termios_p);
2466 [CCode (cheader_filename = "termios.h")]
2467 public speed_t cfgetospeed (termios termios_p);
2468 [CCode (cheader_filename = "termios.h")]
2469 public int cfsetispeed (ref termios termios_p, speed_t speed);
2470 [CCode (cheader_filename = "termios.h")]
2471 public int cfsetospeed (ref termios termios_p, speed_t speed);
2472 [CCode (cheader_filename = "termios.h")]
2473 public int cfsetspeed (ref termios termios, speed_t speed);
2476 [CCode (cheader_filename = "termios.h")]
2477 public const tcflag_t IGNBRK;
2478 [CCode (cheader_filename = "termios.h")]
2479 public const tcflag_t BRKINT;
2480 [CCode (cheader_filename = "termios.h")]
2481 public const tcflag_t IGNPAR;
2482 [CCode (cheader_filename = "termios.h")]
2483 public const tcflag_t PARMRK;
2484 [CCode (cheader_filename = "termios.h")]
2485 public const tcflag_t INPCK;
2486 [CCode (cheader_filename = "termios.h")]
2487 public const tcflag_t ISTRIP;
2488 [CCode (cheader_filename = "termios.h")]
2489 public const tcflag_t INLCR;
2490 [CCode (cheader_filename = "termios.h")]
2491 public const tcflag_t IGNCR;
2492 [CCode (cheader_filename = "termios.h")]
2493 public const tcflag_t IXON;
2494 [CCode (cheader_filename = "termios.h")]
2495 public const tcflag_t IXANY;
2496 [CCode (cheader_filename = "termios.h")]
2497 public const tcflag_t IXOFF;
2498 [CCode (cheader_filename = "termios.h")]
2499 public const tcflag_t ICRNL;
2502 [CCode (cheader_filename = "termios.h")]
2503 public const tcflag_t OPOST;
2504 [CCode (cheader_filename = "termios.h")]
2505 public const tcflag_t ONLCR;
2506 [CCode (cheader_filename = "termios.h")]
2507 public const tcflag_t OCRNL;
2508 [CCode (cheader_filename = "termios.h")]
2509 public const tcflag_t ONOCR;
2510 [CCode (cheader_filename = "termios.h")]
2511 public const tcflag_t ONLRET;
2512 [CCode (cheader_filename = "termios.h")]
2513 public const tcflag_t OFILL;
2514 [CCode (cheader_filename = "termios.h")]
2515 public const tcflag_t NLDLY;
2516 [CCode (cheader_filename = "termios.h")]
2517 public const tcflag_t NL0;
2518 [CCode (cheader_filename = "termios.h")]
2519 public const tcflag_t NL1;
2520 [CCode (cheader_filename = "termios.h")]
2521 public const tcflag_t CRDLY;
2522 [CCode (cheader_filename = "termios.h")]
2523 public const tcflag_t CR0;
2524 [CCode (cheader_filename = "termios.h")]
2525 public const tcflag_t CR1;
2526 [CCode (cheader_filename = "termios.h")]
2527 public const tcflag_t CR2;
2528 [CCode (cheader_filename = "termios.h")]
2529 public const tcflag_t CR3;
2530 [CCode (cheader_filename = "termios.h")]
2531 public const tcflag_t TABDLY;
2532 [CCode (cheader_filename = "termios.h")]
2533 public const tcflag_t TAB0;
2534 [CCode (cheader_filename = "termios.h")]
2535 public const tcflag_t TAB1;
2536 [CCode (cheader_filename = "termios.h")]
2537 public const tcflag_t TAB2;
2538 [CCode (cheader_filename = "termios.h")]
2539 public const tcflag_t TAB3;
2540 [CCode (cheader_filename = "termios.h")]
2541 public const tcflag_t BSDLY;
2542 [CCode (cheader_filename = "termios.h")]
2543 public const tcflag_t BS0;
2544 [CCode (cheader_filename = "termios.h")]
2545 public const tcflag_t BS1;
2546 [CCode (cheader_filename = "termios.h")]
2547 public const tcflag_t VTDLY;
2548 [CCode (cheader_filename = "termios.h")]
2549 public const tcflag_t VT0;
2550 [CCode (cheader_filename = "termios.h")]
2551 public const tcflag_t VT1;
2552 [CCode (cheader_filename = "termios.h")]
2553 public const tcflag_t FFDLY;
2554 [CCode (cheader_filename = "termios.h")]
2555 public const tcflag_t FF0;
2556 [CCode (cheader_filename = "termios.h")]
2557 public const tcflag_t FF1;
2560 [CCode (cheader_filename = "termios.h")]
2561 public const tcflag_t CSIZE;
2562 [CCode (cheader_filename = "termios.h")]
2563 public const tcflag_t CS5;
2564 [CCode (cheader_filename = "termios.h")]
2565 public const tcflag_t CS6;
2566 [CCode (cheader_filename = "termios.h")]
2567 public const tcflag_t CS7;
2568 [CCode (cheader_filename = "termios.h")]
2569 public const tcflag_t CS8;
2570 [CCode (cheader_filename = "termios.h")]
2571 public const tcflag_t CSTOPB;
2572 [CCode (cheader_filename = "termios.h")]
2573 public const tcflag_t CREAD;
2574 [CCode (cheader_filename = "termios.h")]
2575 public const tcflag_t PARENB;
2576 [CCode (cheader_filename = "termios.h")]
2577 public const tcflag_t PARODD;
2578 [CCode (cheader_filename = "termios.h")]
2579 public const tcflag_t HUPCL;
2580 [CCode (cheader_filename = "termios.h")]
2581 public const tcflag_t CLOCAL;
2584 [CCode (cheader_filename = "termios.h")]
2585 public const tcflag_t ISIG;
2586 [CCode (cheader_filename = "termios.h")]
2587 public const tcflag_t ICANON;
2588 [CCode (cheader_filename = "termios.h")]
2589 public const tcflag_t ECHO;
2590 [CCode (cheader_filename = "termios.h")]
2591 public const tcflag_t ECHOE;
2592 [CCode (cheader_filename = "termios.h")]
2593 public const tcflag_t ECHOK;
2594 [CCode (cheader_filename = "termios.h")]
2595 public const tcflag_t ECHONL;
2596 [CCode (cheader_filename = "termios.h")]
2597 public const tcflag_t NOFLSH;
2598 [CCode (cheader_filename = "termios.h")]
2599 public const tcflag_t TOSTOP;
2600 [CCode (cheader_filename = "termios.h")]
2601 public const tcflag_t IEXTEN;
2604 [CCode (cheader_filename = "termios.h")]
2605 public const int VINTR;
2606 [CCode (cheader_filename = "termios.h")]
2607 public const int VQUIT;
2608 [CCode (cheader_filename = "termios.h")]
2609 public const int VERASE;
2610 [CCode (cheader_filename = "termios.h")]
2611 public const int VKILL;
2612 [CCode (cheader_filename = "termios.h")]
2613 public const int VEOF;
2614 [CCode (cheader_filename = "termios.h")]
2615 public const int VMIN;
2616 [CCode (cheader_filename = "termios.h")]
2617 public const int VEOL;
2618 [CCode (cheader_filename = "termios.h")]
2619 public const int VTIME;
2620 [CCode (cheader_filename = "termios.h")]
2621 public const int VSTART;
2622 [CCode (cheader_filename = "termios.h")]
2623 public const int VSTOP;
2624 [CCode (cheader_filename = "termios.h")]
2625 public const int VSUSP;
2628 [CCode (cheader_filename = "termios.h")]
2629 public const int TCSANOW;
2630 [CCode (cheader_filename = "termios.h")]
2631 public const int TCSADRAIN;
2632 [CCode (cheader_filename = "termios.h")]
2633 public const int TCSAFLUSH;
2636 [CCode (cheader_filename = "termios.h")]
2637 public const int TCIFLUSH;
2638 [CCode (cheader_filename = "termios.h")]
2639 public const int TCOFLUSH;
2640 [CCode (cheader_filename = "termios.h")]
2641 public const int TCIOFLUSH;
2644 [CCode (cheader_filename = "termios.h")]
2645 public const int TCOOFF;
2646 [CCode (cheader_filename = "termios.h")]
2647 public const int TCOON;
2648 [CCode (cheader_filename = "termios.h")]
2649 public const int TCIOFF;
2650 [CCode (cheader_filename = "termios.h")]
2651 public const int TCION;
2654 [CCode (cheader_filename = "termios.h")]
2655 public const speed_t B0;
2656 [CCode (cheader_filename = "termios.h")]
2657 public const speed_t B50;
2658 [CCode (cheader_filename = "termios.h")]
2659 public const speed_t B75;
2660 [CCode (cheader_filename = "termios.h")]
2661 public const speed_t B110;
2662 [CCode (cheader_filename = "termios.h")]
2663 public const speed_t B134;
2664 [CCode (cheader_filename = "termios.h")]
2665 public const speed_t B150;
2666 [CCode (cheader_filename = "termios.h")]
2667 public const speed_t B200;
2668 [CCode (cheader_filename = "termios.h")]
2669 public const speed_t B300;
2670 [CCode (cheader_filename = "termios.h")]
2671 public const speed_t B600;
2672 [CCode (cheader_filename = "termios.h")]
2673 public const speed_t B1200;
2674 [CCode (cheader_filename = "termios.h")]
2675 public const speed_t B1800;
2676 [CCode (cheader_filename = "termios.h")]
2677 public const speed_t B2400;
2678 [CCode (cheader_filename = "termios.h")]
2679 public const speed_t B4800;
2680 [CCode (cheader_filename = "termios.h")]
2681 public const speed_t B9600;
2682 [CCode (cheader_filename = "termios.h")]
2683 public const speed_t B19200;
2684 [CCode (cheader_filename = "termios.h")]
2685 public const speed_t B38400;
2686 [CCode (cheader_filename = "termios.h")]
2687 public const speed_t B57600;
2688 [CCode (cheader_filename = "termios.h")]
2689 public const speed_t B115200;
2690 [CCode (cheader_filename = "termios.h")]
2691 public const speed_t B230400;
2693 [CCode (cname = "fd_set", cheader_filename = "sys/select.h", has_type_id = false)]
2694 public struct fd_set {
2697 [CCode (cname = "struct timeval", cheader_filename = "sys/time.h", has_type_id = false)]
2698 public struct timeval {
2699 public time_t tv_sec;
2700 public long tv_usec;
2701 [CCode (cname = "gettimeofday")]
2702 public int get_time_of_day (void * timezone = null);
2703 [CCode (cname = "settimeofday")]
2704 public int set_time_of_day (void * timezone = null);
2707 [CCode (cname = "sigset_t", cheader_filename = "sys/select.h", has_type_id = false)]
2708 public struct sigset_t {
2711 [CCode (cheader_filename = "sys/select.h")]
2712 public int select (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval timeout);
2713 [CCode (cheader_filename = "sys/select.h")]
2714 public void FD_CLR (int fd, ref fd_set @set);
2715 [CCode (cheader_filename = "sys/select.h")]
2716 public int FD_ISSET (int fd, fd_set @set);
2717 [CCode (cheader_filename = "sys/select.h")]
2718 public void FD_SET (int fd, ref fd_set @set);
2719 [CCode (cheader_filename = "sys/select.h")]
2720 public void FD_ZERO (out fd_set @set);
2721 [CCode (cheader_filename = "sys/select.h")]
2722 public int pselect (int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timespec timeout, sigset_t sigmask);
2724 // sys/mman.h - Posix mmap(), munmap(), mprotect()
2725 [CCode (cheader_filename = "sys/mman.h")]
2726 public void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2727 [CCode (cheader_filename = "sys/mman.h")]
2728 public int munmap(void *addr, size_t length);
2729 [CCode (cheader_filename = "sys/mman.h")]
2730 public int mprotect(void *addr, size_t len, int prot);
2731 [CCode (cheader_filename = "sys/mman.h")]
2732 public const int PROT_READ;
2733 [CCode (cheader_filename = "sys/mman.h")]
2734 public const int PROT_WRITE;
2735 [CCode (cheader_filename = "sys/mman.h")]
2736 public const int PROT_EXEC;
2737 [CCode (cheader_filename = "sys/mman.h")]
2738 public const int MAP_SHARED;
2739 [CCode (cheader_filename = "sys/mman.h")]
2740 public const int MAP_PRIVATE;
2741 [CCode (cheader_filename = "sys/mman.h")]
2742 public const int MAP_FIXED;
2743 [CCode (cheader_filename = "sys/mman.h")]
2744 public void *MAP_FAILED;
2745 // sys/mman.h - [MLR] Range Memory Locking
2746 [CCode (cheader_filename = "sys/mman.h")]
2747 public int mlock(void *addr, size_t len);
2748 [CCode (cheader_filename = "sys/mman.h")]
2749 public int munlock(void *addr, size_t len);
2750 // sys/mman.h - [SHM] Shared Memory
2751 [CCode (cheader_filename = "sys/mman.h")]
2752 public int shm_open (string name, int oflag, mode_t mode = 0);
2753 [CCode (cheader_filename = "sys/mman.h")]
2754 public int shm_unlink (string name);
2755 // sys/mman.h - Process Memory Locking
2756 [CCode (cheader_filename = "sys/mman.h")]
2757 public const int MCL_CURRENT;
2758 [CCode (cheader_filename = "sys/mman.h")]
2759 public const int MCL_FUTURE;
2760 [CCode (cheader_filename = "sys/mman.h")]
2761 public int mlockall (int flags);
2762 [CCode (cheader_filename = "sys/mman.h")]
2763 public int munlockall ();
2764 // sys/mman.h - [XSI] X/Open System Interfaces
2765 [CCode (cheader_filename = "sys/mman.h")]
2766 public int msync(void *addr, size_t len, int flags);
2767 [CCode (cheader_filename = "sys/mman.h")]
2768 public const int MS_ASYNC;
2769 [CCode (cheader_filename = "sys/mman.h")]
2770 public const int MS_INVALIDATE;
2771 [CCode (cheader_filename = "sys/mman.h")]
2772 public const int MS_SYNC;
2774 [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h", has_type_id = false)]
2775 public struct utsname {
2776 public unowned string sysname;
2777 public unowned string nodename;
2778 public unowned string release;
2779 public unowned string version;
2780 public unowned string machine;
2781 [CCode (cname = "uname")]
2786 [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")]
2788 [CCode (cname = "EOF", cheader_filename = "stdio.h")]
2789 public const int EOF;
2790 [CCode (cname = "SEEK_SET", cheader_filename = "stdio.h")]
2791 public const int SEEK_SET;
2792 [CCode (cname = "SEEK_CUR", cheader_filename = "stdio.h")]
2793 public const int SEEK_CUR;
2794 [CCode (cname = "SEEK_END", cheader_filename = "stdio.h")]
2795 public const int SEEK_END;
2797 [CCode (cname = "fopen")]
2798 public static FILE? open (string path, string mode);
2799 [CCode (cname = "fdopen")]
2800 public static FILE? fdopen (int fildes, string mode);
2801 [CCode (cname = "popen")]
2802 public static FILE? popen (string command, string mode);
2804 [CCode (cname = "fprintf")]
2806 public int printf (string format, ...);
2807 [CCode (cname = "fputc", instance_pos = -1)]
2808 public int putc (char c);
2809 [CCode (cname = "fputs", instance_pos = -1)]
2810 public int puts (string s);
2811 [CCode (cname = "fwrite", instance_pos = -1)]
2812 public size_t write (void *ptr, size_t size, size_t nmemb);
2813 [CCode (cname = "fread", instance_pos = -1)]
2814 public size_t read (void *ptr, size_t size, size_t nmemb);
2815 [CCode (cname = "fgetc")]
2817 [CCode (cname = "fgets", instance_pos = -1)]
2818 public unowned string? gets (char[] s);
2819 [CCode (cname = "feof")]
2821 [CCode (cname = "fscanf"), ScanfFormat]
2822 public int scanf (string format, ...);
2823 [CCode (cname = "fflush")]
2824 public int flush ();
2825 [CCode (cname = "fseek")]
2826 public int seek (long offset, int whence);
2827 [CCode (cname = "ftell")]
2828 public long tell ();
2829 [CCode (cname = "rewind")]
2830 public void rewind ();
2831 [CCode (cname = "fileno")]
2832 public int fileno ();
2833 [CCode (cname = "ferror")]
2834 public int error ();
2835 [CCode (cname = "clearerr")]
2836 public void clearerr ();
2839 public static FILE stderr;
2840 public static FILE stdout;
2841 public static FILE stdin;
2843 [CCode (cheader_filename = "stdio.h")]
2844 public void perror (string s);
2846 [CCode(cheader_filename = "sched.h", cprefix = "sched_")]
2849 [CCode (cname = "struct sched_param", has_type_id = false)]
2850 public struct Param {
2851 public int sched_priority;
2854 public static int setparam(Posix.pid_t pid, ref Sched.Param param);
2855 public static int getparam(Posix.pid_t pid, out Sched.Param param);
2857 public static int setscheduler(Posix.pid_t pid, Algorithm policy, ref Sched.Param param);
2858 public static Algorithm getscheduler(Posix.pid_t pid);
2860 public static int @yield();
2862 public static int get_priority_max(int algorithm);
2863 public static int get_priority_min(int algorithm);
2865 public static int rr_get_interval(Posix.pid_t pid, out Posix.timespec? interval);
2867 [CCode (cprefix = "SCHED_", cname = "int", has_type_id = false)]
2868 public enum Algorithm {
2878 [CCode(cheader_filename = "sched.h", cname = "cpu_set_t", free_function = "CPU_FREE", copy_function="memcpy")]
2879 public class CpuSet {
2880 [CCode(cname = "CPU_ALLOC")]
2881 public CpuSet(int num = 1);
2883 [CCode(cname = "CPU_ALLOC_SIZE")]
2884 public static size_t alloc_size(int num = 1);
2886 [CCode(cname = "CPU_SETSIZE")]
2887 public static size_t size;
2889 [CCode(cname = "CPU_COUNT")]
2892 [CCode(cname = "CPU_COUNT_S", instance_pos = -1)]
2893 public int count_sized(size_t num);
2895 [CCode(cname = "CPU_ZERO")]
2898 [CCode(cname = "CPU_ZERO_S", instance_pos = -1)]
2899 public void zero_sized(size_t num);
2901 [CCode(cname = "CPU_SET", instance_pos = -1)]
2902 public void @set(int cpu);
2904 [CCode(cname = "CPU_SET_S", instance_pos = -1)]
2905 public void @set_sized(int cpu, size_t num);
2907 [CCode(cname = "CPU_CLR", instance_pos = -1)]
2908 public void clr(int cpu);
2910 [CCode(cname = "CPU_CLR_S", instance_pos = -1)]
2911 public void clr_sized(int cpu, size_t num);
2913 [CCode(cname = "CPU_ISSET", instance_pos = -1)]
2914 public bool is_set(int cpu);
2916 [CCode(cname = "CPU_ISSET_S", instance_pos = -1)]
2917 public bool is_set_sized(int cpu, size_t num);
2919 [CCode(cname = "CPU_EQUAL")]
2920 public static bool equal(CpuSet cs1, CpuSet cs2);
2922 public bool is_equal(CpuSet cs) {
2923 return CpuSet.equal(this, cs);
2926 [CCode(cname = "CPU_EQUAL_S", instance_pos = -1)]
2927 public static bool equal_sized(size_t num, CpuSet cs1, CpuSet cs2);
2929 public bool is_equal_sized(size_t num, CpuSet cs) {
2930 return CpuSet.equal_sized(num, this, cs);
2933 [CCode(cname = "CPU_AND", instance_pos = -1)]
2934 public void and(CpuSet destset, CpuSet srcset);
2936 [CCode(cname = "CPU_AND_S", instance_pos = -1)]
2937 public void and_sized(size_t num, CpuSet destset, CpuSet srcset);
2939 [CCode(cname = "CPU_OR", instance_pos = -1)]
2940 public void or(CpuSet destset, CpuSet srcset);
2942 [CCode(cname = "CPU_OR_S", instance_pos = -1)]
2943 public void or_sized(size_t num, CpuSet destset, CpuSet srcset);
2945 [CCode(cname = "CPU_XOR", instance_pos = -1)]
2946 public void xor(CpuSet destset, CpuSet srcset);
2948 [CCode(cname = "CPU_XOR_S", instance_pos = -1)]
2949 public void xor_sized(size_t num, CpuSet destset, CpuSet srcset);
2951 [CCode(cname = "sched_setaffinity", instance_pos = -1)]
2952 public int setaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2954 [CCode(cname = "sched_getaffinity", instance_pos = -1)]
2955 public int getaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2957 public static CpuSet init(int num = 1) {
2958 CpuSet cpus = new CpuSet(num);
2959 var size = CpuSet.alloc_size(num);
2960 cpus.zero_sized(size);
2965 [CCode (has_target = false)]
2966 public delegate int GlobErrorFunction (string filename, int errcode);
2968 [CCode (cheader_filename = "glob.h")]
2969 public const int GLOB_ERR;
2970 [CCode (cheader_filename = "glob.h")]
2971 public const int GLOB_MARK;
2972 [CCode (cheader_filename = "glob.h")]
2973 public const int GLOB_NOSORT;
2974 [CCode (cheader_filename = "glob.h")]
2975 public const int GLOB_DOOFFS;
2976 [CCode (cheader_filename = "glob.h")]
2977 public const int GLOB_NOCHECK;
2978 [CCode (cheader_filename = "glob.h")]
2979 public const int GLOB_APPEND;
2980 [CCode (cheader_filename = "glob.h")]
2981 public const int GLOB_NOESCAPE;
2982 [CCode (cheader_filename = "glob.h")]
2983 public const int GLOB_PERIOD;
2984 [CCode (cheader_filename = "glob.h")]
2985 public const int GLOB_MAGCHAR;
2986 [CCode (cheader_filename = "glob.h")]
2987 public const int GLOB_ALTDIRFUNC;
2988 [CCode (cheader_filename = "glob.h")]
2989 public const int GLOB_BRACE;
2990 [CCode (cheader_filename = "glob.h")]
2991 public const int GLOB_NOMAGIC;
2992 [CCode (cheader_filename = "glob.h")]
2993 public const int GLOB_TILDE;
2994 [CCode (cheader_filename = "glob.h")]
2995 public const int GLOB_ONLYDIR;
2996 [CCode (cheader_filename = "glob.h")]
2997 public const int GLOB_TILDE_CHECK;
2999 [CCode (cheader_filename = "glob.h")]
3000 public const int GLOB_NOSPACE;
3001 [CCode (cheader_filename = "glob.h")]
3002 public const int GLOB_ABORTED;
3003 [CCode (cheader_filename = "glob.h")]
3004 public const int GLOB_NOMATCH;
3006 [CCode (cheader_filename = "glob.h", cname = "glob_t", destroy_function = "globfree", has_type_id = false)]
3007 public struct Glob {
3008 [CCode (cname = "gl_pathc")]
3009 public size_t pathc;
3010 [CCode (cname = "gl_pathv", array_length = false, array_null_terminated = true)]
3011 public string[] pathv;
3012 [CCode (cname = "gl_offs")]
3015 [CCode (cname = "glob", instance_pos = -1)]
3016 public int glob (string pattern, int flags = 0, GlobErrorFunction? errfunc = null);
3019 [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "", has_type_id = false)]
3020 public enum NLItem {
3076 [CCode (cheader_filename = "langinfo.h", cname = "nl_langinfo")]
3077 public unowned string to_string ();
3080 [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "_NL_TIME_", has_type_id = false)]
3081 public enum NLTime {
3089 [CCode (cheader_filename = "langinfo.h", cname = "nl_langinfo")]
3090 public unowned string to_string ();
3093 [CCode (cheader_filename = "langinfo.h")]
3094 public unowned string nl_langinfo (NLItem item);
3096 [CCode (cheader_filename = "unistd.h")]
3097 public int getopt ([CCode (array_length_pos = 0)] string[] args, string optstring);
3098 [CCode (cheader_filename = "unistd.h")]
3099 public static string optarg;
3100 [CCode (cheader_filename = "unistd.h")]
3101 public static int optind;
3102 [CCode (cheader_filename = "unistd.h")]
3103 public static int opterr;
3104 [CCode (cheader_filename = "unistd.h")]
3105 public static int optopt;
3107 [CCode(cname = "wordexp_t", cheader_filename = "wordexp.h", destroy_function = "wordfree")]
3108 public struct Wordexp {
3109 [CCode(cname = "we_wordv", array_length_cname = "we_wordc", array_length_type = "size_t")]
3110 public string[] words;
3112 [CCode(cname = "wordexp", instance_pos = 1.1)]
3113 private int _wordexp (string s, int flags = 0);
3114 [CCode(cname = "wordfree")]
3115 private int _wordfree ();
3117 public int expand (string s, int flags = 0) {
3118 if (!(WRDE_APPEND in flags || WRDE_REUSE in flags)) {
3121 return _wordexp (s, flags);
3123 public int append(string s, int flags = 0) {
3124 return _wordexp (s, flags | WRDE_APPEND);
3128 [CCode(cheader_filename = "wordexp.h")]
3129 private const int WRDE_APPEND;
3130 [CCode(cheader_filename = "wordexp.h")]
3131 public const int WRDE_BADCHAR;
3132 [CCode(cheader_filename = "wordexp.h")]
3133 public const int WRDE_BADVAL;
3134 [CCode(cheader_filename = "wordexp.h")]
3135 public const int WRDE_CMDSUB;
3136 [CCode(cheader_filename = "wordexp.h")]
3137 public const int WRDE_NOCMD;
3138 [CCode(cheader_filename = "wordexp.h")]
3139 public const int WRDE_NOSPACE;
3140 [CCode(cheader_filename = "wordexp.h")]
3141 public const int WRDE_REUSE;
3142 [CCode(cheader_filename = "wordexp.h")]
3143 public const int WRDE_SHOWERR;
3144 [CCode(cheader_filename = "wordexp.h")]
3145 public const int WRDE_SYNTAX;
3146 [CCode(cheader_filename = "wordexp.h")]
3147 public const int WRDE_UNDEF;