3 * Copyright (C) 2008-2009 Jürg Billeter
4 * Copyright (C) 2010 Marco Trevisan (Treviño)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * Jürg Billeter <j@bitron.ch>
22 * Marco Trevisan (Treviño) <mail@3v1n0.net>
26 [CCode (cname = "bool", cheader_filename = "stdbool.h", default_value = "false")]
31 [CCode (cname = "char", default_value = "\'\\0\'")]
32 [IntegerType (rank = 2, min = 0, max = 127)]
36 [CCode (cname = "unsigned char", default_value = "\'\\0\'")]
37 [IntegerType (rank = 3, min = 0, max = 255)]
41 [CCode (cname = "int", default_value = "0")]
42 [IntegerType (rank = 6)]
46 [CCode (cname = "unsigned int", default_value = "0U")]
47 [IntegerType (rank = 7)]
51 [CCode (cname = "short", default_value = "0")]
52 [IntegerType (rank = 4, min = -32768, max = 32767)]
56 [CCode (cname = "unsigned short", default_value = "0U")]
57 [IntegerType (rank = 5, min = 0, max = 65535)]
58 public struct ushort {
61 [CCode (cname = "long", default_value = "0L")]
62 [IntegerType (rank = 8)]
66 [CCode (cname = "unsigned long", default_value = "0UL")]
67 [IntegerType (rank = 9)]
71 [CCode (cname = "size_t", cheader_filename = "sys/types.h", default_value = "0UL")]
72 [IntegerType (rank = 9)]
73 public struct size_t {
76 [CCode (cname = "ssize_t", cheader_filename = "sys/types.h", default_value = "0L")]
77 [IntegerType (rank = 8)]
78 public struct ssize_t {
81 [CCode (cname = "int8_t", cheader_filename = "stdint.h", default_value = "0")]
82 [IntegerType (rank = 1, min = -128, max = 127)]
86 [CCode (cname = "uint8_t", cheader_filename = "stdint.h", default_value = "0U")]
87 [IntegerType (rank = 3, min = 0, max = 255)]
91 [CCode (cname = "int16_t", cheader_filename = "stdint.h", default_value = "0")]
92 [IntegerType (rank = 4, min = -32768, max = 32767)]
96 [CCode (cname = "uint16_t", cheader_filename = "stdint.h", default_value = "0U")]
97 [IntegerType (rank = 5, min = 0, max = 65535)]
98 public struct uint16 {
101 [CCode (cname = "int32_t", cheader_filename = "stdint.h", default_value = "0")]
102 [IntegerType (rank = 6)]
103 public struct int32 {
106 [CCode (cname = "uint32_t", cheader_filename = "stdint.h", default_value = "0U")]
107 [IntegerType (rank = 7)]
108 public struct uint32 {
111 [CCode (cname = "int64_t", cheader_filename = "stdint.h", default_value = "0LL")]
112 [IntegerType (rank = 10)]
113 public struct int64 {
116 [CCode (cname = "uint64_t", cheader_filename = "stdint.h", default_value = "0ULL")]
117 [IntegerType (rank = 11)]
118 public struct uint64 {
121 [CCode (cname = "float", default_value = "0.0F")]
122 [FloatingType (rank = 1)]
123 public struct float {
126 [CCode (cname = "double", default_value = "0.0")]
127 [FloatingType (rank = 2)]
128 public struct double {
131 [CCode (cheader_filename = "time.h")]
132 [IntegerType (rank = 8)]
133 public struct time_t {
134 [CCode (cname = "time")]
140 [CCode (cname = "char", const_cname = "const char", copy_function = "strdup", free_function = "free", cheader_filename = "stdlib.h,string.h")]
141 public class string {
142 [CCode (cname="atoi")]
144 [CCode (cname="atol")]
145 public long to_long();
146 [CCode (cname="atoll")]
147 public int64 to_int64();
148 [CCode (cname="strlen")]
152 [CCode (cname="printf", cheader_filename = "stdio.h")]
154 public void print (string format,...);
158 [CCode (cprefix = "", lower_case_cprefix = "")]
160 [CCode (cheader_filename = "assert.h")]
161 public void assert (bool expression);
163 [CCode (cheader_filename = "ctype.h")]
164 public bool isalnum (int c);
165 [CCode (cheader_filename = "ctype.h")]
166 public bool isalpha (int c);
167 [CCode (cheader_filename = "ctype.h")]
168 public bool isascii (int c);
169 [CCode (cheader_filename = "ctype.h")]
170 public bool iscntrl (int c);
171 [CCode (cheader_filename = "ctype.h")]
172 public bool isdigit (int c);
173 [CCode (cheader_filename = "ctype.h")]
174 public bool isgraph (int c);
175 [CCode (cheader_filename = "ctype.h")]
176 public bool islower (int c);
177 [CCode (cheader_filename = "ctype.h")]
178 public bool isprint (int c);
179 [CCode (cheader_filename = "ctype.h")]
180 public bool ispunct (int c);
181 [CCode (cheader_filename = "ctype.h")]
182 public bool isspace (int c);
183 [CCode (cheader_filename = "ctype.h")]
184 public bool isupper (int c);
185 [CCode (cheader_filename = "ctype.h")]
186 public bool isxdigit (int c);
187 [CCode (cheader_filename = "ctype.h")]
188 public int toascii (int c);
189 [CCode (cheader_filename = "ctype.h")]
190 public int tolower (int c);
191 [CCode (cheader_filename = "ctype.h")]
192 public int toupper (int c);
195 [CCode (cname = "struct dirent", cheader_filename = "dirent.h")]
196 public class DirEnt {
199 public ushort d_reclen;
201 public char d_name[256];
205 [CCode (cname = "DIR", free_function = "closedir", cheader_filename = "dirent.h")]
209 [CCode (cheader_filename = "dirent.h")]
210 public int dirfd (Dir dir);
211 [CCode (cheader_filename = "dirent.h")]
212 public Dir? opendir (string filename);
213 [CCode (cheader_filename = "dirent.h")]
214 public Dir? fdopendir (int fd);
215 [CCode (cheader_filename = "dirent.h")]
216 public unowned DirEnt? readdir (Dir dir);
217 [CCode (cheader_filename = "dirent.h")]
218 public void rewinddir (Dir dir);
219 [CCode (cheader_filename = "dirent.h")]
220 public void seekdir (Dir dir, long pos);
221 [CCode (cheader_filename = "dirent.h")]
222 public long telldir (Dir dir);
224 [CCode (cheader_filename = "errno.h")]
226 [CCode (cheader_filename = "errno.h")]
227 public const int E2BIG;
228 [CCode (cheader_filename = "errno.h")]
229 public const int EACCES;
230 [CCode (cheader_filename = "errno.h")]
231 public const int EADDRINUSE;
232 [CCode (cheader_filename = "errno.h")]
233 public const int EADDRNOTAVAIL;
234 [CCode (cheader_filename = "errno.h")]
235 public const int EAFNOSUPPORT;
236 [CCode (cheader_filename = "errno.h")]
237 public const int EAGAIN;
238 [CCode (cheader_filename = "errno.h")]
239 public const int EALREADY;
240 [CCode (cheader_filename = "errno.h")]
241 public const int EBADF;
242 [CCode (cheader_filename = "errno.h")]
243 public const int EBADMSG;
244 [CCode (cheader_filename = "errno.h")]
245 public const int EBUSY;
246 [CCode (cheader_filename = "errno.h")]
247 public const int ECANCELED;
248 [CCode (cheader_filename = "errno.h")]
249 public const int ECHILD;
250 [CCode (cheader_filename = "errno.h")]
251 public const int ECONNABORTED;
252 [CCode (cheader_filename = "errno.h")]
253 public const int ECONNREFUSED;
254 [CCode (cheader_filename = "errno.h")]
255 public const int ECONNRESET;
256 [CCode (cheader_filename = "errno.h")]
257 public const int EDEADLK;
258 [CCode (cheader_filename = "errno.h")]
259 public const int EDESTADDRREQ;
260 [CCode (cheader_filename = "errno.h")]
261 public const int EDOM;
262 [CCode (cheader_filename = "errno.h")]
263 public const int EDQUOT;
264 [CCode (cheader_filename = "errno.h")]
265 public const int EEXIST;
266 [CCode (cheader_filename = "errno.h")]
267 public const int EFAULT;
268 [CCode (cheader_filename = "errno.h")]
269 public const int EFBIG;
270 [CCode (cheader_filename = "errno.h")]
271 public const int EHOSTUNREACH;
272 [CCode (cheader_filename = "errno.h")]
273 public const int EIDRM;
274 [CCode (cheader_filename = "errno.h")]
275 public const int EILSEQ;
276 [CCode (cheader_filename = "errno.h")]
277 public const int EINPROGRESS;
278 [CCode (cheader_filename = "errno.h")]
279 public const int EINTR;
280 [CCode (cheader_filename = "errno.h")]
281 public const int EINVAL;
282 [CCode (cheader_filename = "errno.h")]
283 public const int EIO;
284 [CCode (cheader_filename = "errno.h")]
285 public const int EISCONN;
286 [CCode (cheader_filename = "errno.h")]
287 public const int EISDIR;
288 [CCode (cheader_filename = "errno.h")]
289 public const int ELOOP;
290 [CCode (cheader_filename = "errno.h")]
291 public const int EMFILE;
292 [CCode (cheader_filename = "errno.h")]
293 public const int EMLINK;
294 [CCode (cheader_filename = "errno.h")]
295 public const int EMSGSIZE;
296 [CCode (cheader_filename = "errno.h")]
297 public const int EMULTIHOP;
298 [CCode (cheader_filename = "errno.h")]
299 public const int ENAMETOOLONG;
300 [CCode (cheader_filename = "errno.h")]
301 public const int ENETDOWN;
302 [CCode (cheader_filename = "errno.h")]
303 public const int ENETRESET;
304 [CCode (cheader_filename = "errno.h")]
305 public const int ENETUNREACH;
306 [CCode (cheader_filename = "errno.h")]
307 public const int ENFILE;
308 [CCode (cheader_filename = "errno.h")]
309 public const int ENOBUFS;
310 [CCode (cheader_filename = "errno.h")]
311 public const int ENODATA;
312 [CCode (cheader_filename = "errno.h")]
313 public const int ENODEV;
314 [CCode (cheader_filename = "errno.h")]
315 public const int ENOENT;
316 [CCode (cheader_filename = "errno.h")]
317 public const int ENOEXEC;
318 [CCode (cheader_filename = "errno.h")]
319 public const int ENOLCK;
320 [CCode (cheader_filename = "errno.h")]
321 public const int ENOLINK;
322 [CCode (cheader_filename = "errno.h")]
323 public const int ENOMEM;
324 [CCode (cheader_filename = "errno.h")]
325 public const int ENOMSG;
326 [CCode (cheader_filename = "errno.h")]
327 public const int ENOPROTOOPT;
328 [CCode (cheader_filename = "errno.h")]
329 public const int ENOSPC;
330 [CCode (cheader_filename = "errno.h")]
331 public const int ENOSR;
332 [CCode (cheader_filename = "errno.h")]
333 public const int ENOSTR;
334 [CCode (cheader_filename = "errno.h")]
335 public const int ENOSYS;
336 [CCode (cheader_filename = "errno.h")]
337 public const int ENOTCONN;
338 [CCode (cheader_filename = "errno.h")]
339 public const int ENOTDIR;
340 [CCode (cheader_filename = "errno.h")]
341 public const int ENOTEMPTY;
342 [CCode (cheader_filename = "errno.h")]
343 public const int ENOTSOCK;
344 [CCode (cheader_filename = "errno.h")]
345 public const int ENOTSUP;
346 [CCode (cheader_filename = "errno.h")]
347 public const int ENOTTY;
348 [CCode (cheader_filename = "errno.h")]
349 public const int ENXIO;
350 [CCode (cheader_filename = "errno.h")]
351 public const int EOPNOTSUPP;
352 [CCode (cheader_filename = "errno.h")]
353 public const int EOVERFLOW;
354 [CCode (cheader_filename = "errno.h")]
355 public const int EPERM;
356 [CCode (cheader_filename = "errno.h")]
357 public const int EPIPE;
358 [CCode (cheader_filename = "errno.h")]
359 public const int EPROTO;
360 [CCode (cheader_filename = "errno.h")]
361 public const int EPROTONOSUPPORT;
362 [CCode (cheader_filename = "errno.h")]
363 public const int EPROTOTYPE;
364 [CCode (cheader_filename = "errno.h")]
365 public const int ERANGE;
366 [CCode (cheader_filename = "errno.h")]
367 public const int EROFS;
368 [CCode (cheader_filename = "errno.h")]
369 public const int ESPIPE;
370 [CCode (cheader_filename = "errno.h")]
371 public const int ESRCH;
372 [CCode (cheader_filename = "errno.h")]
373 public const int ESTALE;
374 [CCode (cheader_filename = "errno.h")]
375 public const int ETIME;
376 [CCode (cheader_filename = "errno.h")]
377 public const int ETIMEDOUT;
378 [CCode (cheader_filename = "errno.h")]
379 public const int ETXTBSY;
380 [CCode (cheader_filename = "errno.h")]
381 public const int EWOULDBLOCK;
382 [CCode (cheader_filename = "errno.h")]
383 public const int EXDEV;
385 [CCode (cheader_filename = "fcntl.h")]
386 public const int F_DUPFD;
387 [CCode (cheader_filename = "fcntl.h")]
388 public const int F_GETFD;
389 [CCode (cheader_filename = "fcntl.h")]
390 public const int F_SETFD;
391 [CCode (cheader_filename = "fcntl.h")]
392 public const int F_GETFL;
393 [CCode (cheader_filename = "fcntl.h")]
394 public const int F_SETFL;
395 [CCode (cheader_filename = "fcntl.h")]
396 public const int F_GETLK;
397 [CCode (cheader_filename = "fcntl.h")]
398 public const int F_SETLK;
399 [CCode (cheader_filename = "fcntl.h")]
400 public const int F_SETLKW;
401 [CCode (cheader_filename = "fcntl.h")]
402 public const int F_GETOWN;
403 [CCode (cheader_filename = "fcntl.h")]
404 public const int F_SETOWN;
405 [CCode (cheader_filename = "fcntl.h")]
406 public const int FD_CLOEXEC;
407 [CCode (cheader_filename = "fcntl.h")]
408 public const int F_RDLCK;
409 [CCode (cheader_filename = "fcntl.h")]
410 public const int F_UNLCK;
411 [CCode (cheader_filename = "fcntl.h")]
412 public const int F_WRLCK;
413 [CCode (cheader_filename = "fcntl.h")]
414 public const int O_CREAT;
415 [CCode (cheader_filename = "fcntl.h")]
416 public const int O_EXCL;
417 [CCode (cheader_filename = "fcntl.h")]
418 public const int O_NOCTTY;
419 [CCode (cheader_filename = "fcntl.h")]
420 public const int O_TRUNC;
421 [CCode (cheader_filename = "fcntl.h")]
422 public const int O_APPEND;
423 [CCode (cheader_filename = "fcntl.h")]
424 public const int O_DSYNC;
425 [CCode (cheader_filename = "fcntl.h")]
426 public const int O_NONBLOCK;
427 [CCode (cheader_filename = "fcntl.h")]
428 public const int O_RSYNC;
429 [CCode (cheader_filename = "fcntl.h")]
430 public const int O_SYNC;
431 [CCode (cheader_filename = "fcntl.h")]
432 public const int O_ACCMODE;
433 [CCode (cheader_filename = "fcntl.h")]
434 public const int O_RDONLY;
435 [CCode (cheader_filename = "fcntl.h")]
436 public const int O_RDWR;
437 [CCode (cheader_filename = "fcntl.h")]
438 public const int O_WRONLY;
439 [CCode (cheader_filename = "fcntl.h")]
440 public const int POSIX_FADV_NORMAL;
441 [CCode (cheader_filename = "fcntl.h")]
442 public const int POSIX_FADV_SEQUENTIAL;
443 [CCode (cheader_filename = "fcntl.h")]
444 public const int POSIX_FADV_RANDOM;
445 [CCode (cheader_filename = "fcntl.h")]
446 public const int POSIX_FADV_WILLNEED;
447 [CCode (cheader_filename = "fcntl.h")]
448 public const int POSIX_FADV_DONTNEED;
449 [CCode (cheader_filename = "fcntl.h")]
450 public const int POSIX_FADV_NOREUSE;
451 [CCode (cheader_filename = "fcntl.h")]
452 public int creat (string path, mode_t mode);
453 [CCode (cheader_filename = "fcntl.h")]
454 public int fcntl (int fd, int cmd, ...);
455 [CCode (cheader_filename = "fcntl.h")]
456 public int open (string path, int oflag, mode_t mode=0);
457 [CCode (cheader_filename = "fcntl.h")]
458 public int posix_fadvise (int fd, long offset, long len, int advice);
459 [CCode (cheader_filename = "fcntl.h")]
460 public int posix_fallocate (int fd, long offset, long len);
463 [CCode (cname = "struct group", cheader_filename = "grp.h")]
465 public string gr_name;
466 public string gr_passwd;
468 public string[] gr_mem;
470 [CCode (cheader_filename = "grp.h")]
471 public void endgrent ();
472 public unowned Group? getgrent ();
473 public void setgrent ();
475 [CCode (cheader_filename = "arpa/inet.h")]
476 public uint32 inet_addr (string host);
477 [CCode (cheader_filename = "arpa/inet.h")]
478 public unowned string inet_ntoa (InAddr addr);
479 [CCode (cheader_filename = "arpa/inet.h")]
480 public uint32 htonl (uint32 hostlong);
481 [CCode (cheader_filename = "arpa/inet.h")]
482 public uint32 ntohl (uint32 netlong);
483 [CCode (cheader_filename = "arpa/inet.h")]
484 public uint16 htons (uint16 hostshort);
485 [CCode (cheader_filename = "arpa/inet.h")]
486 public uint16 ntohs (uint16 netshort);
488 [CCode (cheader_filename = "math.h")]
489 public double acos (double x);
490 [CCode (cheader_filename = "math.h")]
491 public float acosf (float x);
492 [CCode (cheader_filename = "math.h")]
493 public double asin (double x);
494 [CCode (cheader_filename = "math.h")]
495 public float asinf (float x);
496 [CCode (cheader_filename = "math.h")]
497 public double atan (double x);
498 [CCode (cheader_filename = "math.h")]
499 public float atanf (float x);
500 [CCode (cheader_filename = "math.h")]
501 public double atan2 (double y, double x);
502 [CCode (cheader_filename = "math.h")]
503 public float atan2f (float y, float x);
504 [CCode (cheader_filename = "math.h")]
505 public double cos (double x);
506 [CCode (cheader_filename = "math.h")]
507 public float cosf (float x);
508 [CCode (cheader_filename = "math.h")]
509 public double sin (double x);
510 [CCode (cheader_filename = "math.h")]
511 public float sinf (float x);
512 [CCode (cheader_filename = "math.h")]
513 public double tan (double x);
514 [CCode (cheader_filename = "math.h")]
515 public float tanf (float x);
516 [CCode (cheader_filename = "math.h")]
517 public double cosh (double x);
518 [CCode (cheader_filename = "math.h")]
519 public float coshf (float x);
520 [CCode (cheader_filename = "math.h")]
521 public double sinh (double x);
522 [CCode (cheader_filename = "math.h")]
523 public float sinhf (float x);
524 [CCode (cheader_filename = "math.h")]
525 public double tanh (double x);
526 [CCode (cheader_filename = "math.h")]
527 public float tanhf (float x);
528 [CCode (cheader_filename = "math.h")]
529 public void sincos (double x, out double sinx, out double cosx);
530 [CCode (cheader_filename = "math.h")]
531 public void sincosf (float x, out float sinx, out float cosx);
532 [CCode (cheader_filename = "math.h")]
533 public double acosh (double x);
534 [CCode (cheader_filename = "math.h")]
535 public float acoshf (float x);
536 [CCode (cheader_filename = "math.h")]
537 public double asinh (double x);
538 [CCode (cheader_filename = "math.h")]
539 public float asinhf (float x);
540 [CCode (cheader_filename = "math.h")]
541 public double atanh (double x);
542 [CCode (cheader_filename = "math.h")]
543 public float atanhf (float x);
544 [CCode (cheader_filename = "math.h")]
545 public double exp (double x);
546 [CCode (cheader_filename = "math.h")]
547 public float expf (float x);
548 [CCode (cheader_filename = "math.h")]
549 public double frexp (double x, out int exponent);
550 [CCode (cheader_filename = "math.h")]
551 public float frexpf (float x, out int exponent);
552 [CCode (cheader_filename = "math.h")]
553 public double ldexp (double x, int exponent);
554 [CCode (cheader_filename = "math.h")]
555 public float ldexpf (float x, int exponent);
556 [CCode (cheader_filename = "math.h")]
557 public double log (double x);
558 [CCode (cheader_filename = "math.h")]
559 public float logf (float x);
560 [CCode (cheader_filename = "math.h")]
561 public double log10 (double x);
562 [CCode (cheader_filename = "math.h")]
563 public float log10f (float x);
564 [CCode (cheader_filename = "math.h")]
565 public double modf (double x, out double iptr);
566 [CCode (cheader_filename = "math.h")]
567 public float modff (float x, out float iptr);
568 [CCode (cheader_filename = "math.h")]
569 public double exp10 (double x);
570 [CCode (cheader_filename = "math.h")]
571 public float exp10f (float x);
572 [CCode (cheader_filename = "math.h")]
573 public double pow10 (double x);
574 [CCode (cheader_filename = "math.h")]
575 public float pow10f (float x);
576 [CCode (cheader_filename = "math.h")]
577 public double expm1 (double x);
578 [CCode (cheader_filename = "math.h")]
579 public float expm1f (float x);
580 [CCode (cheader_filename = "math.h")]
581 public double log1p (double x);
582 [CCode (cheader_filename = "math.h")]
583 public float log1pf (float x);
584 [CCode (cheader_filename = "math.h")]
585 public double logb (double x);
586 [CCode (cheader_filename = "math.h")]
587 public float logbf (float x);
588 [CCode (cheader_filename = "math.h")]
589 public double exp2 (double x);
590 [CCode (cheader_filename = "math.h")]
591 public float exp2f (float x);
592 [CCode (cheader_filename = "math.h")]
593 public double log2 (double x);
594 [CCode (cheader_filename = "math.h")]
595 public float log2f (float x);
596 [CCode (cheader_filename = "math.h")]
597 public double pow (double x, double y);
598 [CCode (cheader_filename = "math.h")]
599 public float powf (float x, float y);
600 [CCode (cheader_filename = "math.h")]
601 public double sqrt (double x);
602 [CCode (cheader_filename = "math.h")]
603 public float sqrtf (float x);
604 [CCode (cheader_filename = "math.h")]
605 public double hypot (double x, double y);
606 [CCode (cheader_filename = "math.h")]
607 public float hypotf (float x, float y);
608 [CCode (cheader_filename = "math.h")]
609 public double cbrt (double x);
610 [CCode (cheader_filename = "math.h")]
611 public float cbrtf (float x);
612 [CCode (cheader_filename = "math.h")]
613 public double ceil (double x);
614 [CCode (cheader_filename = "math.h")]
615 public float ceilf (float x);
616 [CCode (cheader_filename = "math.h")]
617 public double fabs (double x);
618 [CCode (cheader_filename = "math.h")]
619 public float fabsf (float x);
620 [CCode (cheader_filename = "math.h")]
621 public double floor (double x);
622 [CCode (cheader_filename = "math.h")]
623 public float floorf (float x);
624 [CCode (cheader_filename = "math.h")]
625 public double fmod (double x, double y);
626 [CCode (cheader_filename = "math.h")]
627 public float fmodf (float x, float y);
628 [CCode (cheader_filename = "math.h")]
629 public int isinf (double value);
630 [CCode (cheader_filename = "math.h")]
631 public int isinff (float value);
632 [CCode (cheader_filename = "math.h")]
633 public int finite (double value);
634 [CCode (cheader_filename = "math.h")]
635 public int finitef (float value);
636 [CCode (cheader_filename = "math.h")]
637 public double drem (double x, double y);
638 [CCode (cheader_filename = "math.h")]
639 public float dremf (float x, float y);
640 [CCode (cheader_filename = "math.h")]
641 public double significand (double x);
642 [CCode (cheader_filename = "math.h")]
643 public float significandf (float x);
644 [CCode (cheader_filename = "math.h")]
645 public double copysign (double x, double y);
646 [CCode (cheader_filename = "math.h")]
647 public float copysignf (float x, float y);
648 [CCode (cheader_filename = "math.h")]
649 public double nan (string tagb);
650 [CCode (cheader_filename = "math.h")]
651 public float nanf (string tagb);
652 [CCode (cheader_filename = "math.h")]
653 public int isnan (double value);
654 [CCode (cheader_filename = "math.h")]
655 public int isnanf (float value);
656 [CCode (cheader_filename = "math.h")]
657 public double j0 (double x0);
658 [CCode (cheader_filename = "math.h")]
659 public float j0f (float x0);
660 [CCode (cheader_filename = "math.h")]
661 public double j1 (double x0);
662 [CCode (cheader_filename = "math.h")]
663 public float j1f (float x0);
664 [CCode (cheader_filename = "math.h")]
665 public double jn (int x0, double x1);
666 [CCode (cheader_filename = "math.h")]
667 public float jnf (int x0, float x1);
668 [CCode (cheader_filename = "math.h")]
669 public double y0 (double x0);
670 [CCode (cheader_filename = "math.h")]
671 public float y0f (float x0);
672 [CCode (cheader_filename = "math.h")]
673 public double y1 (double x0);
674 [CCode (cheader_filename = "math.h")]
675 public float y1f (float x0);
676 [CCode (cheader_filename = "math.h")]
677 public double yn (int x0, double x1);
678 [CCode (cheader_filename = "math.h")]
679 public float ynf (int x0, float x1);
680 [CCode (cheader_filename = "math.h")]
681 public double erf (double x0);
682 [CCode (cheader_filename = "math.h")]
683 public float erff (float x0);
684 [CCode (cheader_filename = "math.h")]
685 public double erfc (double x0);
686 [CCode (cheader_filename = "math.h")]
687 public float erfcf (float x0);
688 [CCode (cheader_filename = "math.h")]
689 public double lgamma (double x0);
690 [CCode (cheader_filename = "math.h")]
691 public float lgammaf (float x0);
692 [CCode (cheader_filename = "math.h")]
693 public double tgamma (double x0);
694 [CCode (cheader_filename = "math.h")]
695 public float tgammaf (float x0);
696 [CCode (cheader_filename = "math.h")]
697 public double gamma (double x0);
698 [CCode (cheader_filename = "math.h")]
699 public float gammaf (float x0);
700 [CCode (cheader_filename = "math.h")]
701 public double lgamma_r (double x0, out int signgamp);
702 [CCode (cheader_filename = "math.h")]
703 public float lgamma_rf (float x0, out int signgamp);
704 [CCode (cheader_filename = "math.h")]
705 public double rint (double x);
706 [CCode (cheader_filename = "math.h")]
707 public float rintf (float x);
708 [CCode (cheader_filename = "math.h")]
709 public double nextafter (double x, double y);
710 [CCode (cheader_filename = "math.h")]
711 public float nextafterf (float x, float y);
712 [CCode (cheader_filename = "math.h")]
713 public double nexttoward (double x, double y);
714 [CCode (cheader_filename = "math.h")]
715 public float nexttowardf (float x, double y);
716 [CCode (cheader_filename = "math.h")]
717 public double remainder (double x, double y);
718 [CCode (cheader_filename = "math.h")]
719 public float remainderf (float x, float y);
720 [CCode (cheader_filename = "math.h")]
721 public double scalbn (double x, int n);
722 [CCode (cheader_filename = "math.h")]
723 public float scalbnf (float x, int n);
724 [CCode (cheader_filename = "math.h")]
725 public int ilogb (double x);
726 [CCode (cheader_filename = "math.h")]
727 public int ilogbf (float x);
728 [CCode (cheader_filename = "math.h")]
729 public double scalbln (double x, long n);
730 [CCode (cheader_filename = "math.h")]
731 public float scalblnf (float x, long n);
732 [CCode (cheader_filename = "math.h")]
733 public double nearbyint (double x);
734 [CCode (cheader_filename = "math.h")]
735 public float nearbyintf (float x);
736 [CCode (cheader_filename = "math.h")]
737 public double round (double x);
738 [CCode (cheader_filename = "math.h")]
739 public float roundf (float x);
740 [CCode (cheader_filename = "math.h")]
741 public double trunc (double x);
742 [CCode (cheader_filename = "math.h")]
743 public float truncf (float x);
744 [CCode (cheader_filename = "math.h")]
745 public double remquo (double x, double y, out int quo);
746 [CCode (cheader_filename = "math.h")]
747 public float remquof (float x, float y, out int quo);
748 [CCode (cheader_filename = "math.h")]
749 public long lrint (double x);
750 [CCode (cheader_filename = "math.h")]
751 public long lrintf (float x);
752 [CCode (cheader_filename = "math.h")]
753 public int64 llrint (double x);
754 [CCode (cheader_filename = "math.h")]
755 public int64 llrintf (float x);
756 [CCode (cheader_filename = "math.h")]
757 public long lround (double x);
758 [CCode (cheader_filename = "math.h")]
759 public long lroundf (float x);
760 [CCode (cheader_filename = "math.h")]
761 public int64 llround (double x);
762 [CCode (cheader_filename = "math.h")]
763 public int64 llroundf (float x);
764 [CCode (cheader_filename = "math.h")]
765 public double fdim (double x, double y);
766 [CCode (cheader_filename = "math.h")]
767 public float fdimf (float x, float y);
768 [CCode (cheader_filename = "math.h")]
769 public double fmax (double x, double y);
770 [CCode (cheader_filename = "math.h")]
771 public float fmaxf (float x, float y);
772 [CCode (cheader_filename = "math.h")]
773 public double fmin (double x, double y);
774 [CCode (cheader_filename = "math.h")]
775 public float fminf (float x, float y);
776 [CCode (cheader_filename = "math.h")]
777 public double fma (double x, double y, double z);
778 [CCode (cheader_filename = "math.h")]
779 public float fmaf (float x, float y, float z);
780 [CCode (cheader_filename = "math.h")]
781 public double scalb (double x, double n);
782 [CCode (cheader_filename = "math.h")]
783 public float scalbf (float x, float n);
785 [CCode (cheader_filename = "poll.h", cname = "struct pollfd")]
786 public struct pollfd {
792 [CCode (cheader_filename = "poll.h")]
793 public const int POLLIN;
794 [CCode (cheader_filename = "poll.h")]
795 public const int POLLPRI;
796 [CCode (cheader_filename = "poll.h")]
797 public const int POLLOUT;
798 [CCode (cheader_filename = "poll.h")]
799 public const int POLLRDHUP;
800 [CCode (cheader_filename = "poll.h")]
801 public const int POLLERR;
802 [CCode (cheader_filename = "poll.h")]
803 public const int POLLHUP;
804 [CCode (cheader_filename = "poll.h")]
805 public const int POLLNVAL;
808 [IntegerType (rank = 9)]
809 [CCode (cheader_filename = "poll.h", cname = "nfds_t")]
810 public struct nfds_t {
813 [CCode (cheader_filename = "poll.h")]
814 public int poll (pollfd[] fds, int timeout);
815 [CCode (cheader_filename = "poll.h")]
816 public int ppoll (pollfd[] fds, timespec? timeout, sigset_t? sigmask);
819 [CCode (cname = "struct passwd", cheader_filename = "pwd.h")]
820 public class Passwd {
821 public string pw_name;
822 public string pw_passwd;
825 public string pw_gecos;
826 public string pw_dir;
827 public string pw_shell;
829 [CCode (cheader_filename = "pwd.h")]
830 public void endpwent ();
831 public unowned Passwd? getpwent ();
832 public void setpwent ();
833 [CCode (cheader_filename = "pwd.h")]
834 public unowned Passwd? getpwnam (string name);
836 [CCode (cheader_filename = "sys/resource.h")]
837 public const int PRIO_PROCESS;
838 [CCode (cheader_filename = "sys/resource.h")]
839 public const int PRIO_PGRP;
840 [CCode (cheader_filename = "sys/resource.h")]
841 public const int PRIO_USER;
843 [CCode (cheader_filename = "signal.h")]
844 public const int SIGABRT;
845 [CCode (cheader_filename = "signal.h")]
846 public const int SIGALRM;
847 [CCode (cheader_filename = "signal.h")]
848 public const int SIGBUS;
849 [CCode (cheader_filename = "signal.h")]
850 public const int SIGCHLD;
851 [CCode (cheader_filename = "signal.h")]
852 public const int SIGCONT;
853 [CCode (cheader_filename = "signal.h")]
854 public const int SIGFPE;
855 [CCode (cheader_filename = "signal.h")]
856 public const int SIGHUP;
857 [CCode (cheader_filename = "signal.h")]
858 public const int SIGILL;
859 [CCode (cheader_filename = "signal.h")]
860 public const int SIGINT;
861 [CCode (cheader_filename = "signal.h")]
862 public const int SIGKILL;
863 [CCode (cheader_filename = "signal.h")]
864 public const int SIGPIPE;
865 [CCode (cheader_filename = "signal.h")]
866 public const int SIGQUIT;
867 [CCode (cheader_filename = "signal.h")]
868 public const int SIGSEGV;
869 [CCode (cheader_filename = "signal.h")]
870 public const int SIGSTOP;
871 [CCode (cheader_filename = "signal.h")]
872 public const int SIGTERM;
873 [CCode (cheader_filename = "signal.h")]
874 public const int SIGTSTP;
875 [CCode (cheader_filename = "signal.h")]
876 public const int SIGTTIN;
877 [CCode (cheader_filename = "signal.h")]
878 public const int SIGTTOU;
879 [CCode (cheader_filename = "signal.h")]
880 public const int SIGUSR1;
881 [CCode (cheader_filename = "signal.h")]
882 public const int SIGUSR2;
883 [CCode (cheader_filename = "signal.h")]
884 public const int SIGPOLL;
885 [CCode (cheader_filename = "signal.h")]
886 public const int SIGPROF;
887 [CCode (cheader_filename = "signal.h")]
888 public const int SIGSYS;
889 [CCode (cheader_filename = "signal.h")]
890 public const int SIGTRAP;
891 [CCode (cheader_filename = "signal.h")]
892 public const int SIGURG;
893 [CCode (cheader_filename = "signal.h")]
894 public const int SIGVTALRM;
895 [CCode (cheader_filename = "signal.h")]
896 public const int SIGXCPU;
897 [CCode (cheader_filename = "signal.h")]
898 public const int SIGXFSZ;
899 [CCode (cheader_filename = "signal.h")]
900 public const int SIGIOT;
901 [CCode (cheader_filename = "signal.h")]
902 public const int SIGSTKFLT;
904 [CCode (cheader_filename = "signal.h")]
905 public const int SA_NOCLDSTOP;
906 [CCode (cheader_filename = "signal.h")]
907 public const int SA_NOCLDWAIT;
908 [CCode (cheader_filename = "signal.h")]
909 public const int SA_NODEFER;
910 [CCode (cheader_filename = "signal.h")]
911 public const int SA_ONSTACK;
912 [CCode (cheader_filename = "signal.h")]
913 public const int SA_RESETHAND;
914 [CCode (cheader_filename = "signal.h")]
915 public const int SA_RESTART;
916 [CCode (cheader_filename = "signal.h")]
917 public const int SA_SIGINFO;
918 [CCode (cheader_filename = "signal.h")]
919 public const int SI_USER;
920 [CCode (cheader_filename = "signal.h")]
921 public const int SI_KERNEL;
922 [CCode (cheader_filename = "signal.h")]
923 public const int SI_QUEUE;
924 [CCode (cheader_filename = "signal.h")]
925 public const int SI_TIMER;
926 [CCode (cheader_filename = "signal.h")]
927 public const int SI_MESGQ;
928 [CCode (cheader_filename = "signal.h")]
929 public const int SI_ASYNCIO;
930 [CCode (cheader_filename = "signal.h")]
931 public const int SI_SIGIO;
932 [CCode (cheader_filename = "signal.h")]
933 public const int SI_TKILL;
934 [CCode (cheader_filename = "signal.h")]
935 public const int ILL_ILLOPC;
936 [CCode (cheader_filename = "signal.h")]
937 public const int ILL_ILLOPN;
938 [CCode (cheader_filename = "signal.h")]
939 public const int ILL_ILLADR;
940 [CCode (cheader_filename = "signal.h")]
941 public const int ILL_ILLTRP;
942 [CCode (cheader_filename = "signal.h")]
943 public const int ILL_PRVOPC;
944 [CCode (cheader_filename = "signal.h")]
945 public const int ILL_PRVREG;
946 [CCode (cheader_filename = "signal.h")]
947 public const int ILL_COPROC;
948 [CCode (cheader_filename = "signal.h")]
949 public const int ILL_BADSTK;
950 [CCode (cheader_filename = "signal.h")]
951 public const int FPE_INTDIV;
952 [CCode (cheader_filename = "signal.h")]
953 public const int FPE_INTOVF;
954 [CCode (cheader_filename = "signal.h")]
955 public const int FPE_FLTDIV;
956 [CCode (cheader_filename = "signal.h")]
957 public const int FPE_FLTOVF;
958 [CCode (cheader_filename = "signal.h")]
959 public const int FPE_FLTUND;
960 [CCode (cheader_filename = "signal.h")]
961 public const int FPE_FLTRES;
962 [CCode (cheader_filename = "signal.h")]
963 public const int FPE_FLTINV;
964 [CCode (cheader_filename = "signal.h")]
965 public const int FPE_FLTSUB;
966 [CCode (cheader_filename = "signal.h")]
967 public const int SEGV_MAPERR;
968 [CCode (cheader_filename = "signal.h")]
969 public const int SEGV_ACCERR;
970 [CCode (cheader_filename = "signal.h")]
971 public const int BUS_ADRALN;
972 [CCode (cheader_filename = "signal.h")]
973 public const int BUS_ADRERR;
974 [CCode (cheader_filename = "signal.h")]
975 public const int BUS_OBJERR;
976 [CCode (cheader_filename = "signal.h")]
977 public const int BUS_MCEERR_AR;
978 [CCode (cheader_filename = "signal.h")]
979 public const int BUS_MCEERR_AO;
980 [CCode (cheader_filename = "signal.h")]
981 public const int TRAP_BRKPT;
982 [CCode (cheader_filename = "signal.h")]
983 public const int TRAP_TRACE;
984 [CCode (cheader_filename = "signal.h")]
985 public const int TRAP_BRANCH;
986 [CCode (cheader_filename = "signal.h")]
987 public const int TRAP_HWBKPT;
988 [CCode (cheader_filename = "signal.h")]
989 public const int CLD_EXITED;
990 [CCode (cheader_filename = "signal.h")]
991 public const int CLD_KILLED;
992 [CCode (cheader_filename = "signal.h")]
993 public const int CLD_DUMPED;
994 [CCode (cheader_filename = "signal.h")]
995 public const int CLD_TRAPPED;
996 [CCode (cheader_filename = "signal.h")]
997 public const int CLD_STOPPED;
998 [CCode (cheader_filename = "signal.h")]
999 public const int CLD_CONTINUED;
1000 [CCode (cheader_filename = "signal.h")]
1001 public const int POLL_IN;
1002 [CCode (cheader_filename = "signal.h")]
1003 public const int POLL_OUT;
1004 [CCode (cheader_filename = "signal.h")]
1005 public const int POLL_MSG;
1006 [CCode (cheader_filename = "signal.h")]
1007 public const int POLL_ERR;
1008 [CCode (cheader_filename = "signal.h")]
1009 public const int POLL_PRI;
1010 [CCode (cheader_filename = "signal.h")]
1011 public const int POLL_HUP;
1014 [IntegerType (rank = 6)]
1015 [CCode (cname = "pid_t", default_value = "0", cheader_filename = "sys/types.h")]
1016 public struct pid_t {
1019 [CCode (cname = "struct sigaction", cheader_filename = "signal.h")]
1020 public struct sigaction_t {
1021 sighandler_t sa_handler;
1022 siginfohandler_t sa_sigaction;
1027 [CCode (cname = "sigval_t", cheader_filename = "signal.h")]
1028 public struct sigval_t {
1033 [CCode (cname = "siginfo_t", cheader_filename = "signal.h")]
1034 public struct siginfo_t {
1055 [CCode (cheader_filename = "signal.h")]
1056 public int kill (pid_t pid, int signum);
1057 [CCode (cheader_filename = "signal.h")]
1058 public int killpg (pid_t pgpr, int signum);
1059 [CCode (cheader_filename = "signal.h")]
1060 public int raise (int signum);
1061 [CCode (cheader_filename = "signal.h")]
1062 public int sigemptyset (sigset_t sigset);
1063 [CCode (cheader_filename = "signal.h")]
1064 public int sigfillset (sigset_t sigset);
1065 [CCode (cheader_filename = "signal.h")]
1066 public int sigaddset (sigset_t sigset, int signo);
1067 [CCode (cheader_filename = "signal.h")]
1068 public int sigdelset (sigset_t sigset, int __signo);
1069 [CCode (cheader_filename = "signal.h")]
1070 public int sigismember (sigset_t sigset, int __signo);
1071 [CCode (cheader_filename = "signal.h")]
1072 public int sigprocmask (int how, sigset_t sigset, sigset_t oset);
1073 [CCode (cheader_filename = "signal.h")]
1074 public int sigsuspend (sigset_t sigset);
1075 [CCode (cheader_filename = "signal.h")]
1076 public int sigpending (sigset_t sigset);
1077 [CCode (cheader_filename = "signal.h")]
1078 public int sigwait (sigset_t sigset, out int sig);
1079 [CCode (cheader_filename = "signal.h")]
1080 public int sigaction (int signum, sigaction_t? act, out sigaction_t? oldact);
1082 [CCode (has_target = false, cheader_filename = "signal.h")]
1083 public delegate void sighandler_t (int signal);
1085 [CCode (has_target = false, cheader_filename = "signal.h")]
1086 public delegate void siginfohandler_t (int signal, siginfo_t info, void* data);
1088 [CCode (cheader_filename = "signal.h")]
1089 public sighandler_t SIG_DFL;
1091 [CCode (cheader_filename = "signal.h")]
1092 public sighandler_t SIG_ERR;
1094 [CCode (cheader_filename = "signal.h")]
1095 public sighandler_t SIG_IGN;
1097 [CCode (cheader_filename = "signal.h")]
1098 public sighandler_t signal (int signum, sighandler_t? handler);
1100 [CCode (cheader_filename = "stdio.h")]
1102 public void printf (string format,...);
1104 [CCode (cheader_filename = "stdlib.h")]
1105 public void abort ();
1106 [CCode (cheader_filename = "stdlib.h")]
1107 public void exit (int status);
1109 [CCode (cheader_filename = "stdlib.h")]
1110 public void _exit (int status);
1112 public delegate void AtExitFunc ();
1114 [CCode (cheader_filename = "stdlib.h")]
1115 public void atexit (AtExitFunc func);
1117 [CCode (cheader_filename = "stdlib.h")]
1118 public int mkstemp (string template);
1120 [CCode (cheader_filename = "stdlib.h")]
1121 public int mkostemp (string template, int flags);
1123 [CCode (cheader_filename = "stdlib.h")]
1124 public int posix_openpt (int flags);
1125 [CCode (cheader_filename = "stdlib.h")]
1126 public int grantpt (int fd);
1127 [CCode (cheader_filename = "stdlib.h")]
1128 public int unlockpt (int fd);
1130 [CCode (cheader_filename = "stdlib.h")]
1131 public int system (string command);
1133 [CCode (has_target = false, cheader_filename = "stdlib.h", cname = "__compar_fn_t")]
1134 public delegate int compar_fn_t (void* key1, void* key2);
1136 [CCode (cheader_filename = "stdlib.h")]
1137 public void* bsearch (void* key, void* base, size_t nmemb, size_t size, compar_fn_t func);
1139 [CCode (cheader_filename = "stdlib.h")]
1140 public void qsort (void* base, size_t nmemb, size_t size, compar_fn_t func);
1142 [CCode (cheader_filename = "stdlib.h")]
1143 public void qsort_r (void* base, size_t nmemb, size_t size, compar_fn_t func, void* arg);
1145 [CCode (cheader_filename = "stdlib.h")]
1146 public const int EXIT_FAILURE;
1147 [CCode (cheader_filename = "stdlib.h")]
1148 public const int EXIT_SUCCESS;
1150 [CCode (cheader_filename = "string.h")]
1151 public void* memccpy (void* s1, void* s2, int c, size_t n);
1152 [CCode (cheader_filename = "string.h")]
1153 public void* memchr (void* s, int c, size_t n);
1154 [CCode (cheader_filename = "string.h")]
1155 public int memcmp (void* s1, void* s2, size_t n);
1156 [CCode (cheader_filename = "string.h")]
1157 public void* memcpy (void* s1, void* s2, size_t n);
1158 [CCode (cheader_filename = "string.h")]
1159 public void* memmove (void* s1, void* s2, size_t n);
1160 [CCode (cheader_filename = "string.h")]
1161 public void* memset (void* s, int c, size_t n);
1162 [CCode (cheader_filename = "string.h")]
1163 public unowned string strcat (string s1, string s2);
1164 [CCode (cheader_filename = "string.h")]
1165 public unowned string strchr (string s, int c);
1166 [CCode (cheader_filename = "string.h")]
1167 public int strcmp (string s1, string s2);
1168 [CCode (cheader_filename = "string.h")]
1169 public int strcoll (string s1, string s2);
1170 [CCode (cheader_filename = "string.h")]
1171 public unowned string strcpy (string s1, string s2);
1172 [CCode (cheader_filename = "string.h")]
1173 public size_t strcspn (string s1, string s2);
1174 [CCode (cheader_filename = "string.h")]
1175 public unowned string strdup (string s1);
1176 [CCode (cheader_filename = "string.h")]
1177 public unowned string strerror (int errnum);
1178 [CCode (cheader_filename = "string.h")]
1179 public int* strerror_r (int errnum, string strerrbuf, size_t buflen);
1180 [CCode (cheader_filename = "string.h")]
1181 public size_t strlen (string s);
1182 [CCode (cheader_filename = "string.h")]
1183 public unowned string strncat (string s1, string s2, size_t n);
1184 [CCode (cheader_filename = "string.h")]
1185 public int strncmp (string s1, string s2, size_t n);
1186 [CCode (cheader_filename = "string.h")]
1187 public unowned string strncpy (string s1, string s2, size_t n);
1188 [CCode (cheader_filename = "string.h")]
1189 public unowned string strpbrk (string s1, string s2);
1190 [CCode (cheader_filename = "string.h")]
1191 public unowned string strrchr (string s, int c);
1192 [CCode (cheader_filename = "string.h")]
1193 public size_t strspn (string s1, string s2);
1194 [CCode (cheader_filename = "string.h")]
1195 public unowned string strstr (string s1, string s2);
1196 [CCode (cheader_filename = "string.h")]
1197 public unowned string strtok (string s1, string s2);
1198 [CCode (cheader_filename = "string.h")]
1199 public unowned string strtok_r (string s, string sep, out string lasts);
1200 [CCode (cheader_filename = "string.h")]
1201 public size_t strxfrm (string s1, string s2, size_t n);
1203 [CCode (cheader_filename = "stropts.h")]
1204 public const int I_PUSH;
1205 [CCode (cheader_filename = "stropts.h")]
1206 public const int I_POP;
1207 [CCode (cheader_filename = "stropts.h")]
1208 public const int I_LOOK;
1209 [CCode (cheader_filename = "stropts.h")]
1210 public const int I_FLUSH;
1211 [CCode (cheader_filename = "stropts.h")]
1212 public const int I_FLUSHBAND;
1213 [CCode (cheader_filename = "stropts.h")]
1214 public const int I_SETSIG;
1215 [CCode (cheader_filename = "stropts.h")]
1216 public const int I_GETSIG;
1217 [CCode (cheader_filename = "stropts.h")]
1218 public const int I_FIND;
1219 [CCode (cheader_filename = "stropts.h")]
1220 public const int I_PEEK;
1221 [CCode (cheader_filename = "stropts.h")]
1222 public const int I_SRDOPT;
1223 [CCode (cheader_filename = "stropts.h")]
1224 public const int I_GRDOPT;
1225 [CCode (cheader_filename = "stropts.h")]
1226 public const int I_NREAD;
1227 [CCode (cheader_filename = "stropts.h")]
1228 public const int I_FDINSERT;
1229 [CCode (cheader_filename = "stropts.h")]
1230 public const int I_STR;
1231 [CCode (cheader_filename = "stropts.h")]
1232 public const int I_SWROPT;
1233 [CCode (cheader_filename = "stropts.h")]
1234 public const int I_GWROPT;
1235 [CCode (cheader_filename = "stropts.h")]
1236 public const int I_SENDFD;
1237 [CCode (cheader_filename = "stropts.h")]
1238 public const int I_RECVFD;
1239 [CCode (cheader_filename = "stropts.h")]
1240 public const int I_LIST;
1241 [CCode (cheader_filename = "stropts.h")]
1242 public const int I_ATMARK;
1243 [CCode (cheader_filename = "stropts.h")]
1244 public const int I_CKBAND;
1245 [CCode (cheader_filename = "stropts.h")]
1246 public const int I_GETBAND;
1247 [CCode (cheader_filename = "stropts.h")]
1248 public const int I_CANPUT;
1249 [CCode (cheader_filename = "stropts.h")]
1250 public const int I_SETCLTIME;
1251 [CCode (cheader_filename = "stropts.h")]
1252 public const int I_GETCLTIME;
1253 [CCode (cheader_filename = "stropts.h")]
1254 public const int I_LINK;
1255 [CCode (cheader_filename = "stropts.h")]
1256 public const int I_UNLINK;
1257 [CCode (cheader_filename = "stropts.h")]
1258 public const int I_PLINK;
1259 [CCode (cheader_filename = "stropts.h")]
1260 public const int I_PUNLINK;
1261 [CCode (cheader_filename = "stropts.h")]
1262 public const int FLUSHR;
1263 [CCode (cheader_filename = "stropts.h")]
1264 public const int FLUSHW;
1265 [CCode (cheader_filename = "stropts.h")]
1266 public const int FLUSHRW;
1267 [CCode (cheader_filename = "stropts.h")]
1268 public const int S_RDNORM;
1269 [CCode (cheader_filename = "stropts.h")]
1270 public const int S_RDBAND;
1271 [CCode (cheader_filename = "stropts.h")]
1272 public const int S_INPUT;
1273 [CCode (cheader_filename = "stropts.h")]
1274 public const int S_HIPRI;
1275 [CCode (cheader_filename = "stropts.h")]
1276 public const int S_OUTPUT;
1277 [CCode (cheader_filename = "stropts.h")]
1278 public const int S_WRNORM;
1279 [CCode (cheader_filename = "stropts.h")]
1280 public const int S_WRBAND;
1281 [CCode (cheader_filename = "stropts.h")]
1282 public const int S_MSG;
1283 [CCode (cheader_filename = "stropts.h")]
1284 public const int S_ERROR;
1285 [CCode (cheader_filename = "stropts.h")]
1286 public const int S_HANGUP;
1287 [CCode (cheader_filename = "stropts.h")]
1288 public const int S_BANDURG;
1289 [CCode (cheader_filename = "stropts.h")]
1290 public const int RS_HIPRI;
1291 [CCode (cheader_filename = "stropts.h")]
1292 public const int RNORM;
1293 [CCode (cheader_filename = "stropts.h")]
1294 public const int RMSGD;
1295 [CCode (cheader_filename = "stropts.h")]
1296 public const int RMSGN;
1297 [CCode (cheader_filename = "stropts.h")]
1298 public const int RPROTNORN;
1299 [CCode (cheader_filename = "stropts.h")]
1300 public const int RPROTDAT;
1301 [CCode (cheader_filename = "stropts.h")]
1302 public const int RPROTDIS;
1303 [CCode (cheader_filename = "stropts.h")]
1304 public const int SNDZERO;
1305 [CCode (cheader_filename = "stropts.h")]
1306 public const int ANYMARK;
1307 [CCode (cheader_filename = "stropts.h")]
1308 public const int LASTMARK;
1309 [CCode (cheader_filename = "stropts.h")]
1310 public const int MUXID_ALL;
1311 [CCode (cheader_filename = "stropts.h")]
1312 public const int MSG_ANY;
1313 [CCode (cheader_filename = "stropts.h")]
1314 public const int MSG_BAND;
1315 [CCode (cheader_filename = "stropts.h")]
1316 public const int MSG_HIPRI;
1317 [CCode (cheader_filename = "stropts.h")]
1318 public const int MORECTL;
1319 [CCode (cheader_filename = "stropts.h")]
1320 public const int MOREDATA;
1321 [CCode (cheader_filename = "stropts.h", sentinel = "")]
1322 public int ioctl (int fildes, int request, ...);
1324 [CCode (cheader_filename = "syslog.h")]
1325 public void openlog (string ident, int option, int facility );
1327 [CCode (cheader_filename = "syslog.h")]
1328 public int setlogmask (int mask);
1330 [CCode (cheader_filename = "syslog.h")]
1331 public int LOG_UPTO (int pri);
1333 [CCode (cheader_filename = "syslog.h")]
1334 public void syslog (int priority, string format, ... );
1336 [CCode (cheader_filename = "syslog.h")]
1337 public void closelog ();
1339 [CCode (cheader_filename = "syslog.h")]
1340 public const int LOG_PID;
1341 [CCode (cheader_filename = "syslog.h")]
1342 public const int LOG_CONS;
1343 [CCode (cheader_filename = "syslog.h")]
1344 public const int LOG_ODELAY;
1345 [CCode (cheader_filename = "syslog.h")]
1346 public const int LOG_NDELAY;
1347 [CCode (cheader_filename = "syslog.h")]
1348 public const int LOG_NOWAIT;
1349 [CCode (cheader_filename = "syslog.h")]
1350 public const int LOG_EMERG;
1351 [CCode (cheader_filename = "syslog.h")]
1352 public const int LOG_ALERT;
1353 [CCode (cheader_filename = "syslog.h")]
1354 public const int LOG_CRIT;
1355 [CCode (cheader_filename = "syslog.h")]
1356 public const int LOG_ERR;
1357 [CCode (cheader_filename = "syslog.h")]
1358 public const int LOG_WARNING;
1359 [CCode (cheader_filename = "syslog.h")]
1360 public const int LOG_NOTICE;
1361 [CCode (cheader_filename = "syslog.h")]
1362 public const int LOG_INFO;
1363 [CCode (cheader_filename = "syslog.h")]
1364 public const int LOG_DEBUG;
1365 [CCode (cheader_filename = "syslog.h")]
1366 public const int LOG_KERN;
1367 [CCode (cheader_filename = "syslog.h")]
1368 public const int LOG_USER;
1369 [CCode (cheader_filename = "syslog.h")]
1370 public const int LOG_MAIL;
1371 [CCode (cheader_filename = "syslog.h")]
1372 public const int LOG_DAEMON;
1373 [CCode (cheader_filename = "syslog.h")]
1374 public const int LOG_SYSLOG;
1375 [CCode (cheader_filename = "syslog.h")]
1376 public const int LOG_LPR;
1377 [CCode (cheader_filename = "syslog.h")]
1378 public const int LOG_NEWS;
1379 [CCode (cheader_filename = "syslog.h")]
1380 public const int LOG_UUCP;
1381 [CCode (cheader_filename = "syslog.h")]
1382 public const int LOG_CRON;
1383 [CCode (cheader_filename = "syslog.h")]
1384 public const int LOG_AUTHPRIV;
1385 [CCode (cheader_filename = "syslog.h")]
1386 public const int LOG_FTP;
1387 [CCode (cheader_filename = "syslog.h")]
1388 public const int LOG_LOCAL0;
1389 [CCode (cheader_filename = "syslog.h")]
1390 public const int LOG_LOCAL1;
1391 [CCode (cheader_filename = "syslog.h")]
1392 public const int LOG_LOCAL2;
1393 [CCode (cheader_filename = "syslog.h")]
1394 public const int LOG_LOCAL3;
1395 [CCode (cheader_filename = "syslog.h")]
1396 public const int LOG_LOCAL4;
1397 [CCode (cheader_filename = "syslog.h")]
1398 public const int LOG_LOCAL5;
1399 [CCode (cheader_filename = "syslog.h")]
1400 public const int LOG_LOCAL6;
1401 [CCode (cheader_filename = "syslog.h")]
1402 public const int LOG_LOCAL7;
1404 [CCode (cheader_filename = "sys/socket.h")]
1405 public const int SOCK_DGRAM;
1406 [CCode (cheader_filename = "sys/socket.h")]
1407 public const int SOCK_RAW;
1408 [CCode (cheader_filename = "sys/socket.h")]
1409 public const int SOCK_SEQPACKET;
1410 [CCode (cheader_filename = "sys/socket.h")]
1411 public const int SOCK_STREAM;
1412 [CCode (cheader_filename = "sys/socket.h")]
1413 public const int AF_INET;
1414 [CCode (cheader_filename = "sys/socket.h")]
1415 public const int AF_INET6;
1416 [CCode (cheader_filename = "sys/socket.h")]
1417 public const int AF_UNIX;
1419 [CCode (cheader_filename = "sys/socket.h")]
1420 public const int SHUT_RD;
1421 [CCode (cheader_filename = "sys/socket.h")]
1422 public const int SHUT_WR;
1423 [CCode (cheader_filename = "sys/socket.h")]
1424 public const int SHUT_RDWR;
1426 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1427 public int accept (int sfd, ... );
1428 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1429 public int bind (int sockfd, ...);
1430 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1431 public int connect(int sfd, ... );
1432 [CCode (cheader_filename = "sys/socket.h")]
1433 public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
1434 [CCode (cheader_filename = "sys/socket.h")]
1435 public int listen (int sfd, int backlog);
1436 [CCode (cheader_filename = "sys/socket.h")]
1437 public ssize_t recv (int sockfd, void *buf, size_t len, int flags);
1438 [CCode (cheader_filename = "sys/socket.h")]
1439 public ssize_t send (int sockfd, void* buf, size_t len, int flags);
1440 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1441 public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
1442 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1443 public ssize_t sendmsg (int sockfd, ...);
1444 [CCode (cheader_filename = "sys/socket.h")]
1445 public int setsockopt (int sockfd, int level, int optname, void* optval, socklen_t optlen);
1446 [CCode (cheader_filename = "sys/socket.h")]
1447 public int shutdown (int sockfd, int how);
1448 [CCode (cheader_filename = "sys/socket.h")]
1449 public int socket (int domain, int type, int protocol);
1450 [CCode (cheader_filename = "sys/socket.h")]
1451 public int socketpair (int domain, int type, int protocol, int[] sv);
1455 [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0")]
1456 public struct socklen_t {
1460 [CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h", destroy_function = "")]
1461 public struct InAddr {
1462 public uint32 s_addr;
1465 [CCode (cname = "struct sockaddr", cheader_filename = "sys/socket.h", destroy_function = "")]
1466 public struct SockAddr {
1469 [CCode (cname = "struct sockaddr_in", cheader_filename = "netinet/in.h", destroy_function = "")]
1470 public struct SockAddrIn {
1471 public int sin_family;
1472 public uint16 sin_port;
1473 public InAddr sin_addr;
1476 [CCode (cheader_filename = "sys/stat.h")]
1477 public int mkfifo (string filename, mode_t mode);
1479 [CCode (cheader_filename = "sys/stat.h")]
1480 public const mode_t S_IFMT;
1481 [CCode (cheader_filename = "sys/stat.h")]
1482 public const mode_t S_IFBLK;
1483 [CCode (cheader_filename = "sys/stat.h")]
1484 public const mode_t S_IFCHR;
1485 [CCode (cheader_filename = "sys/stat.h")]
1486 public const mode_t S_IFIFO;
1487 [CCode (cheader_filename = "sys/stat.h")]
1488 public const mode_t S_IFREG;
1489 [CCode (cheader_filename = "sys/stat.h")]
1490 public const mode_t S_IFDIR;
1491 [CCode (cheader_filename = "sys/stat.h")]
1492 public const mode_t S_IFLNK;
1493 [CCode (cheader_filename = "sys/stat.h")]
1494 public const mode_t S_IFSOCK;
1496 [CCode (cheader_filename = "sys/stat.h")]
1497 public const mode_t S_IRWXU;
1498 [CCode (cheader_filename = "sys/stat.h")]
1499 public const mode_t S_IRUSR;
1500 [CCode (cheader_filename = "sys/stat.h")]
1501 public const mode_t S_IWUSR;
1502 [CCode (cheader_filename = "sys/stat.h")]
1503 public const mode_t S_IXUSR;
1504 [CCode (cheader_filename = "sys/stat.h")]
1505 public const mode_t S_IRWXG;
1506 [CCode (cheader_filename = "sys/stat.h")]
1507 public const mode_t S_IRGRP;
1508 [CCode (cheader_filename = "sys/stat.h")]
1509 public const mode_t S_IWGRP;
1510 [CCode (cheader_filename = "sys/stat.h")]
1511 public const mode_t S_IXGRP;
1512 [CCode (cheader_filename = "sys/stat.h")]
1513 public const mode_t S_IRWXO;
1514 [CCode (cheader_filename = "sys/stat.h")]
1515 public const mode_t S_IROTH;
1516 [CCode (cheader_filename = "sys/stat.h")]
1517 public const mode_t S_IWOTH;
1518 [CCode (cheader_filename = "sys/stat.h")]
1519 public const mode_t S_IXOTH;
1520 [CCode (cheader_filename = "sys/stat.h")]
1521 public const mode_t S_ISUID;
1522 [CCode (cheader_filename = "sys/stat.h")]
1523 public const mode_t S_ISGID;
1524 [CCode (cheader_filename = "sys/stat.h")]
1525 public const mode_t S_ISVTX;
1527 [CCode (cheader_filename = "sys/stat.h")]
1528 public bool S_ISBLK (mode_t mode);
1529 [CCode (cheader_filename = "sys/stat.h")]
1530 public bool S_ISCHR (mode_t mode);
1531 [CCode (cheader_filename = "sys/stat.h")]
1532 public bool S_ISDIR (mode_t mode);
1533 [CCode (cheader_filename = "sys/stat.h")]
1534 public bool S_ISFIFO (mode_t mode);
1535 [CCode (cheader_filename = "sys/stat.h")]
1536 public bool S_ISREG (mode_t mode);
1537 [CCode (cheader_filename = "sys/stat.h")]
1538 public bool S_ISLNK (mode_t mode);
1539 [CCode (cheader_filename = "sys/stat.h")]
1540 public bool S_ISSOCK (mode_t mode);
1542 [CCode (cheader_filename = "sys/stat.h", cname = "struct stat")]
1543 public struct Stat {
1544 public dev_t st_dev;
1545 public ino_t st_ino;
1546 public mode_t st_mode;
1547 public nlink_t st_nlink;
1548 public uid_t st_uid;
1549 public gid_t st_gid;
1550 public dev_t st_rdev;
1551 public size_t st_size;
1552 public time_t st_atime;
1553 public time_t st_mtime;
1554 public time_t st_ctime;
1555 public blksize_t st_blksize;
1556 public blkcnt_t st_blocks;
1558 [CCode (cheader_filename = "sys/stat.h")]
1559 int fstat( int fd, out Stat buf);
1560 [CCode (cheader_filename = "sys/stat.h")]
1561 int stat (string filename, out Stat buf);
1562 [CCode (cheader_filename = "sys/stat.h")]
1563 int lstat (string filename, out Stat buf);
1565 [CCode (cheader_filename = "sys/stat.h")]
1566 public int chmod (string filename, mode_t mode);
1567 [CCode (cheader_filename = "sys/stat.h")]
1568 public mode_t umask (mode_t mask);
1569 [CCode (cheader_filename = "sys/stat.h")]
1570 public int mkdir (string path, mode_t mode);
1571 [CCode (cheader_filename = "sys/types.h,sys/stat.h,fcntl.h,unistd.h")]
1572 public pid_t mknod (string pathname, mode_t mode, dev_t dev);
1574 [CCode (cheader_filename = "sys/wait.h")]
1575 public pid_t wait (out int status);
1576 [CCode (cheader_filename = "sys/wait.h")]
1577 public pid_t waitpid (pid_t pid, out int status, int options);
1578 [CCode (cheader_filename = "sys/wait.h")]
1579 public const int WNOHANG;
1580 [CCode (cheader_filename = "sys/wait.h")]
1581 public const int WUNTRACED;
1582 [CCode (cheader_filename = "sys/wait.h")]
1583 public const int WCONTINUED;
1586 [IntegerType (rank = 9)]
1587 [CCode (cheader_filename = "sys/types.h", cname = "key_t")]
1588 public struct key_t {
1592 [IntegerType (rank = 9)]
1593 [CCode (cheader_filename = "sys/statvfs.h")]
1594 public struct fsblkcnt_t {
1598 [IntegerType (rank = 9)]
1599 [CCode (cheader_filename = "sys/statvfs.h")]
1600 public struct fsfilcnt_t {
1603 [CCode (cheader_filename = "sys/statvfs.h", cname = "struct statvfs")]
1604 public struct statvfs {
1605 public ulong f_bsize;
1606 public ulong f_frsize;
1607 public fsblkcnt_t f_blocks;
1608 public fsblkcnt_t f_bfree;
1609 public fsblkcnt_t f_bavail;
1610 public fsfilcnt_t f_files;
1611 public fsfilcnt_t f_ffree;
1612 public fsfilcnt_t f_favail;
1616 [IntegerType (rank = 9)]
1617 [CCode (cname="off_t", cheader_filename = "sys/types.h")]
1618 public struct off_t {
1622 [IntegerType (rank = 9)]
1623 [CCode (cheader_filename = "sys/types.h")]
1624 public struct uid_t {
1628 [IntegerType (rank = 9)]
1629 [CCode (cheader_filename = "sys/types.h")]
1630 public struct gid_t {
1634 [IntegerType (rank = 9)]
1635 [CCode (cname = "mode_t", cheader_filename = "sys/types.h")]
1636 public struct mode_t {
1640 [IntegerType (rank = 9)]
1641 [CCode (cheader_filename = "sys/types.h")]
1642 public struct dev_t {
1646 [IntegerType (rank = 9)]
1647 [CCode (cheader_filename = "sys/types.h")]
1648 public struct ino_t {
1652 [IntegerType (rank = 9)]
1653 [CCode (cheader_filename = "sys/types.h")]
1654 public struct nlink_t {
1658 [IntegerType (rank = 9)]
1659 [CCode (cheader_filename = "sys/types.h")]
1660 public struct blksize_t {
1664 [IntegerType (rank = 9)]
1665 [CCode (cheader_filename = "sys/types.h")]
1666 public struct blkcnt_t {
1669 [CCode (cheader_filename = "time.h")]
1670 [IntegerType (rank = 8)]
1671 public struct clock_t {
1672 [CCode (cname = "clock")]
1676 [CCode (cheader_filename = "time.h")]
1686 public int tm_isdst;
1689 [CCode (cname = "struct timespec", cheader_filename = "time.h")]
1690 public struct timespec {
1691 public time_t tv_sec;
1692 public long tv_nsec;
1695 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1696 public int getpriority (int which, int who);
1697 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1698 public int setpriority (int which, int who, int prio);
1700 [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h")]
1701 public struct iovector {
1702 public void* iov_base;
1703 public size_t iov_len;
1706 [CCode (cheader_filename = "unistd.h")]
1707 public int close (int fd);
1708 [CCode (cheader_filename = "unistd.h")]
1709 public int execl (string path, params string[] arg);
1710 [CCode (cheader_filename = "unistd.h")]
1711 public int execlp (string path, params string[] arg);
1712 [CCode (cheader_filename = "unistd.h")]
1713 public int pipe ([CCode (array_length = false, null_terminated = false)] int[] pipefd);
1714 [CCode (cheader_filename = "unistd.h")]
1715 public ssize_t read (int fd, void* buf, size_t count);
1716 [CCode (cheader_filename = "unistd.h")]
1717 public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
1718 [CCode (cheader_filename = "unistd.h")]
1719 public ssize_t readlink (string path, char[] buf);
1720 [CCode (cheader_filename = "sys/uio.h")]
1721 public ssize_t readv (int fd, iovector vector, int iovcnt);
1722 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1723 public int setgid (gid_t gid);
1724 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1725 public int setuid (uid_t uid);
1726 [CCode (cheader_filename = "unistd.h")]
1727 public int unlink (string filename);
1728 [CCode (cheader_filename = "unistd.h")]
1729 public ssize_t write (int fd, void* buf, size_t count);
1730 [CCode (cheader_filename = "unistd.h")]
1731 public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
1732 [CCode (cheader_filename = "sys/uio.h")]
1733 public ssize_t writev (int fd, iovector vector, int iovcnt);
1734 [CCode (cheader_filename = "unistd.h")]
1735 public off_t lseek(int fildes, off_t offset, int whence);
1737 [CCode (cheader_filename = "unistd.h")]
1738 public const int SEEK_SET;
1739 [CCode (cheader_filename = "unistd.h")]
1740 public const int SEEK_CUR;
1741 [CCode (cheader_filename = "unistd.h")]
1742 public const int SEEK_END;
1744 [CCode (cheader_filename = "unistd.h")]
1745 public pid_t fork ();
1746 [CCode (cheader_filename = "unistd.h")]
1747 public pid_t vfork ();
1748 [CCode (cheader_filename = "unistd.h")]
1749 public unowned string ttyname (int fd);
1750 [CCode (cheader_filename = "unistd.h")]
1751 public int ttyname_r (int fd, char[] buf);
1752 [CCode (cheader_filename = "unistd.h")]
1753 public bool isatty (int fd);
1754 [CCode (cheader_filename = "unistd.h")]
1755 public int link (string from, string to);
1756 [CCode (cheader_filename = "unistd.h")]
1757 public int symlink (string from, string to);
1758 [CCode (cheader_filename = "unistd.h")]
1759 public long sysconf (int name);
1760 [CCode (cheader_filename = "unistd.h")]
1761 public int rmdir (string path);
1762 [CCode (cheader_filename = "unistd.h")]
1763 public pid_t tcgetpgrp (int fd);
1764 [CCode (cheader_filename = "unistd.h")]
1765 public int tcsetpgrp (int fd, pid_t pgrp_id);
1766 [CCode (cheader_filename = "unistd.h")]
1767 public unowned string getlogin ();
1768 [CCode (cheader_filename = "unistd.h")]
1769 public int vhangup ();
1770 [CCode (cheader_filename = "unistd.h")]
1771 public int revoke (string file);
1772 [CCode (cheader_filename = "unistd.h")]
1773 public int acct (string name);
1774 [CCode (cheader_filename = "unistd.h")]
1775 public unowned string getusershell ();
1776 [CCode (cheader_filename = "unistd.h")]
1777 public void endusershell ();
1778 [CCode (cheader_filename = "unistd.h")]
1779 public void setusershell ();
1780 [CCode (cheader_filename = "unistd.h")]
1781 public int chroot (string path);
1782 [CCode (cheader_filename = "unistd.h")]
1783 public unowned string getpass (string promt);
1784 [CCode (cheader_filename = "unistd.h")]
1785 public int getpagesize ();
1786 [CCode (cheader_filename = "unistd.h")]
1787 public int getdtablesize ();
1789 [CCode (cheader_filename = "unistd.h")]
1790 public const int _SC_ARG_MAX;
1791 [CCode (cheader_filename = "unistd.h")]
1792 public const int _SC_CHILD_MAX;
1793 [CCode (cheader_filename = "unistd.h")]
1794 public const int _SC_HOST_NAME_MAX;
1795 [CCode (cheader_filename = "unistd.h")]
1796 public const int _SC_LOGIN_NAME_MAX;
1797 [CCode (cheader_filename = "unistd.h")]
1798 public const int _SC_CLK_TCK;
1799 [CCode (cheader_filename = "unistd.h")]
1800 public const int _SC_OPEN_MAX;
1801 [CCode (cheader_filename = "unistd.h")]
1802 public const int _SC_PAGESIZE;
1803 [CCode (cheader_filename = "unistd.h")]
1804 public const int _SC_RE_DUP_MAX;
1805 [CCode (cheader_filename = "unistd.h")]
1806 public const int _SC_STREAM_MAX;
1807 [CCode (cheader_filename = "unistd.h")]
1808 public const int _SC_SYMLOOP_MAX;
1809 [CCode (cheader_filename = "unistd.h")]
1810 public const int _SC_TTY_NAME_MAX;
1811 [CCode (cheader_filename = "unistd.h")]
1812 public const int _SC_TZNAME_MAX;
1813 [CCode (cheader_filename = "unistd.h")]
1814 public const int _SC_VERSION;
1815 [CCode (cheader_filename = "unistd.h")]
1816 public const int _SC_BASE_MAX;
1817 [CCode (cheader_filename = "unistd.h")]
1818 public const int _SC_BC_DIM_MAX;
1819 [CCode (cheader_filename = "unistd.h")]
1820 public const int _SC_BC_SCALE_MAX;
1821 [CCode (cheader_filename = "unistd.h")]
1822 public const int _SC_BC_STRING_MAX;
1823 [CCode (cheader_filename = "unistd.h")]
1824 public const int _SC_COLL_WEIGHTS_MAX;
1825 [CCode (cheader_filename = "unistd.h")]
1826 public const int _SC_EXRP_NEST_MAX;
1827 [CCode (cheader_filename = "unistd.h")]
1828 public const int _SC_LINE_MAX;
1829 [CCode (cheader_filename = "unistd.h")]
1830 public const int _SC_2_VERSION;
1831 [CCode (cheader_filename = "unistd.h")]
1832 public const int _SC_2_C_DEV;
1833 [CCode (cheader_filename = "unistd.h")]
1834 public const int _SC_2_FORT_DEV;
1835 [CCode (cheader_filename = "unistd.h")]
1836 public const int _SC_2_FORT_RUN;
1837 [CCode (cheader_filename = "unistd.h")]
1838 public const int _SC_2_LOCALEDEF;
1839 [CCode (cheader_filename = "unistd.h")]
1840 public const int _SC_2_SW_DEV;
1842 [CCode (cheader_filename = "unistd.h")]
1843 public const int STDIN_FILENO;
1844 [CCode (cheader_filename = "unistd.h")]
1845 public const int STDOUT_FILENO;
1846 [CCode (cheader_filename = "unistd.h")]
1847 public const int STDERR_FILENO;
1848 [CCode (cheader_filename = "unistd.h")]
1849 public const int R_OK;
1850 [CCode (cheader_filename = "unistd.h")]
1851 public const int W_OK;
1852 [CCode (cheader_filename = "unistd.h")]
1853 public const int X_OK;
1854 [CCode (cheader_filename = "unistd.h")]
1855 public const int F_OK;
1857 [CCode (cheader_filename = "unistd.h")]
1858 public int access (string patchname, int mode);
1859 [CCode (cheader_filename = "unistd.h")]
1860 public int euidaccess (string patchname, int mode);
1861 [CCode (cheader_filename = "unistd.h")]
1862 public int eaccess (string patchname, int mode);
1864 [CCode (cheader_filename = "unistd.h")]
1865 public uint alarm (uint seconds);
1866 [CCode (cheader_filename = "unistd.h")]
1867 public uint ualarm (uint useconds);
1868 [CCode (cheader_filename = "unistd.h")]
1869 public uint sleep (uint seconds);
1870 [CCode (cheader_filename = "unistd.h")]
1871 public uint usleep (uint useconds);
1872 [CCode (cheader_filename = "unistd.h")]
1873 public int pause ();
1874 [CCode (cheader_filename = "unistd.h")]
1875 public int chown (string filename, uid_t owner, gid_t group);
1876 [CCode (cheader_filename = "unistd.h")]
1877 public int fchown (int fd, uid_t owner, gid_t group);
1878 [CCode (cheader_filename = "unistd.h")]
1879 public int lchown (string filename, uid_t owner, gid_t group);
1880 [CCode (cheader_filename = "unistd.h")]
1881 public int chdir (string filepath);
1882 [CCode (cheader_filename = "unistd.h")]
1883 public int fchdir (int file);
1884 [CCode (cheader_filename = "unistd.h")]
1885 public int dup (int fd);
1886 [CCode (cheader_filename = "unistd.h")]
1887 public int dup2 (int fd1, int fd2);
1888 [CCode (cheader_filename = "unistd.h")]
1889 public int gethostname (char[] name);
1890 [CCode (cheader_filename = "unistd.h")]
1891 public pid_t getpid ();
1892 [CCode (cheader_filename = "unistd.h")]
1893 public pid_t getppid ();
1894 [CCode (cheader_filename = "unistd.h")]
1895 public pid_t getpgrp ();
1896 [CCode (cheader_filename = "unistd.h")]
1897 public pid_t getpgid (pid_t pid);
1898 [CCode (cheader_filename = "unistd.h")]
1899 public int setpgid (pid_t pid, pid_t pgid);
1900 [CCode (cheader_filename = "unistd.h")]
1901 public pid_t setpgrp ();
1902 [CCode (cheader_filename = "unistd.h")]
1903 public pid_t getsid (pid_t pid);
1904 [CCode (cheader_filename = "unistd.h")]
1905 public uid_t getuid ();
1906 [CCode (cheader_filename = "unistd.h")]
1907 public uid_t geteuid ();
1908 [CCode (cheader_filename = "unistd.h")]
1909 public gid_t getgid ();
1910 [CCode (cheader_filename = "unistd.h")]
1911 public gid_t getegid ();
1912 [CCode (cheader_filename = "unistd.h")]
1913 public int group_member (gid_t gid);
1914 [CCode (cheader_filename = "unistd.h")]
1915 public pid_t setsid ();
1916 [CCode (cheader_filename = "unistd.h")]
1917 public pid_t tcgetsid (int fd);
1919 [CCode (cheader_filename = "unistd.h")]
1920 public int fsync (int fd);
1921 [CCode (cheader_filename = "unistd.h")]
1922 public int fdatasync (int fd);
1923 [CCode (cheader_filename = "unistd.h")]
1926 [CCode (cheader_filename = "unistd.h")]
1927 public int ftruncate(int fd, off_t length);
1928 [CCode (cheader_filename = "unistd.h")]
1929 public int truncate(string path, off_t length);
1930 [CCode (cheader_filename = "unistd.h")]
1931 public int nice (int inc);
1934 [CCode (cname = "cc_t", cheader_filename = "termios.h")]
1935 [IntegerType (rank = 3, min = 0, max = 255)]
1936 public struct cc_t {
1940 [CCode (cname = "speed_t", cheader_filename = "termios.h")]
1941 [IntegerType (rank = 7)]
1942 public struct speed_t {
1946 [CCode (cname = "tcflag_t", cheader_filename = "termios.h")]
1947 [IntegerType (rank = 7)]
1948 public struct tcflag_t {
1951 [CCode (cname="struct termios", cheader_filename = "termios.h")]
1952 public struct termios
1954 public tcflag_t c_iflag;
1955 public tcflag_t c_oflag;
1956 public tcflag_t c_cflag;
1957 public tcflag_t c_lflag;
1959 public unowned cc_t[] c_cc;
1960 public speed_t c_ispeed;
1961 public speed_t c_ospeed;
1964 [CCode (cheader_filename = "termios.h")]
1965 public int tcgetattr (int fd, termios termios_p);
1966 [CCode (cheader_filename = "termios.h")]
1967 public int tcsetattr (int fd, int optional_actions, termios termios_p);
1968 [CCode (cheader_filename = "termios.h")]
1969 public int tcsendbreak (int fd, int duration);
1970 [CCode (cheader_filename = "termios.h")]
1971 public int tcdrain (int fd);
1972 [CCode (cheader_filename = "termios.h")]
1973 public int tcflush (int fd, int queue_selector);
1974 [CCode (cheader_filename = "termios.h")]
1975 public int tcflow (int fd, int action);
1976 [CCode (cheader_filename = "termios.h")]
1977 public void cfmakeraw (termios termios_p);
1978 [CCode (cheader_filename = "termios.h")]
1979 public speed_t cfgetispeed (termios termios_p);
1980 [CCode (cheader_filename = "termios.h")]
1981 public speed_t cfgetospeed (termios termios_p);
1982 [CCode (cheader_filename = "termios.h")]
1983 public int cfsetispeed (termios termios_p, speed_t speed);
1984 [CCode (cheader_filename = "termios.h")]
1985 public int cfsetospeed (termios termios_p, speed_t speed);
1986 [CCode (cheader_filename = "termios.h")]
1987 public int cfsetspeed (termios termios, speed_t speed);
1990 [CCode (cheader_filename = "termios.h")]
1991 public const tcflag_t IGNBRK;
1992 [CCode (cheader_filename = "termios.h")]
1993 public const tcflag_t BRKINT;
1994 [CCode (cheader_filename = "termios.h")]
1995 public const tcflag_t IGNPAR;
1996 [CCode (cheader_filename = "termios.h")]
1997 public const tcflag_t PARMRK;
1998 [CCode (cheader_filename = "termios.h")]
1999 public const tcflag_t INPCK;
2000 [CCode (cheader_filename = "termios.h")]
2001 public const tcflag_t ISTRIP;
2002 [CCode (cheader_filename = "termios.h")]
2003 public const tcflag_t INLCR;
2004 [CCode (cheader_filename = "termios.h")]
2005 public const tcflag_t IGNCR;
2006 [CCode (cheader_filename = "termios.h")]
2007 public const tcflag_t IXON;
2008 [CCode (cheader_filename = "termios.h")]
2009 public const tcflag_t IXANY;
2010 [CCode (cheader_filename = "termios.h")]
2011 public const tcflag_t IXOFF;
2012 [CCode (cheader_filename = "termios.h")]
2013 public const tcflag_t ICRNL;
2016 [CCode (cheader_filename = "termios.h")]
2017 public const tcflag_t OPOST;
2018 [CCode (cheader_filename = "termios.h")]
2019 public const tcflag_t ONLCR;
2020 [CCode (cheader_filename = "termios.h")]
2021 public const tcflag_t OCRNL;
2022 [CCode (cheader_filename = "termios.h")]
2023 public const tcflag_t ONOCR;
2024 [CCode (cheader_filename = "termios.h")]
2025 public const tcflag_t ONLRET;
2026 [CCode (cheader_filename = "termios.h")]
2027 public const tcflag_t OFILL;
2028 [CCode (cheader_filename = "termios.h")]
2029 public const tcflag_t NLDLY;
2030 [CCode (cheader_filename = "termios.h")]
2031 public const tcflag_t NL0;
2032 [CCode (cheader_filename = "termios.h")]
2033 public const tcflag_t NL1;
2034 [CCode (cheader_filename = "termios.h")]
2035 public const tcflag_t CRDLY;
2036 [CCode (cheader_filename = "termios.h")]
2037 public const tcflag_t CR0;
2038 [CCode (cheader_filename = "termios.h")]
2039 public const tcflag_t CR1;
2040 [CCode (cheader_filename = "termios.h")]
2041 public const tcflag_t CR2;
2042 [CCode (cheader_filename = "termios.h")]
2043 public const tcflag_t CR3;
2044 [CCode (cheader_filename = "termios.h")]
2045 public const tcflag_t TABDLY;
2046 [CCode (cheader_filename = "termios.h")]
2047 public const tcflag_t TAB0;
2048 [CCode (cheader_filename = "termios.h")]
2049 public const tcflag_t TAB1;
2050 [CCode (cheader_filename = "termios.h")]
2051 public const tcflag_t TAB2;
2052 [CCode (cheader_filename = "termios.h")]
2053 public const tcflag_t TAB3;
2054 [CCode (cheader_filename = "termios.h")]
2055 public const tcflag_t BSDLY;
2056 [CCode (cheader_filename = "termios.h")]
2057 public const tcflag_t BS0;
2058 [CCode (cheader_filename = "termios.h")]
2059 public const tcflag_t BS1;
2060 [CCode (cheader_filename = "termios.h")]
2061 public const tcflag_t VTDLY;
2062 [CCode (cheader_filename = "termios.h")]
2063 public const tcflag_t VT0;
2064 [CCode (cheader_filename = "termios.h")]
2065 public const tcflag_t VT1;
2066 [CCode (cheader_filename = "termios.h")]
2067 public const tcflag_t FFDLY;
2068 [CCode (cheader_filename = "termios.h")]
2069 public const tcflag_t FF0;
2070 [CCode (cheader_filename = "termios.h")]
2071 public const tcflag_t FF1;
2074 [CCode (cheader_filename = "termios.h")]
2075 public const tcflag_t CSIZE;
2076 [CCode (cheader_filename = "termios.h")]
2077 public const tcflag_t CS5;
2078 [CCode (cheader_filename = "termios.h")]
2079 public const tcflag_t CS6;
2080 [CCode (cheader_filename = "termios.h")]
2081 public const tcflag_t CS7;
2082 [CCode (cheader_filename = "termios.h")]
2083 public const tcflag_t CS8;
2084 [CCode (cheader_filename = "termios.h")]
2085 public const tcflag_t CSTOPB;
2086 [CCode (cheader_filename = "termios.h")]
2087 public const tcflag_t CREAD;
2088 [CCode (cheader_filename = "termios.h")]
2089 public const tcflag_t PARENB;
2090 [CCode (cheader_filename = "termios.h")]
2091 public const tcflag_t PARODD;
2092 [CCode (cheader_filename = "termios.h")]
2093 public const tcflag_t HUPCL;
2094 [CCode (cheader_filename = "termios.h")]
2095 public const tcflag_t CLOCAL;
2098 [CCode (cheader_filename = "termios.h")]
2099 public const tcflag_t ISIG;
2100 [CCode (cheader_filename = "termios.h")]
2101 public const tcflag_t ICANON;
2102 [CCode (cheader_filename = "termios.h")]
2103 public const tcflag_t ECHO;
2104 [CCode (cheader_filename = "termios.h")]
2105 public const tcflag_t ECHOE;
2106 [CCode (cheader_filename = "termios.h")]
2107 public const tcflag_t ECHOK;
2108 [CCode (cheader_filename = "termios.h")]
2109 public const tcflag_t ECHONL;
2110 [CCode (cheader_filename = "termios.h")]
2111 public const tcflag_t NOFLSH;
2112 [CCode (cheader_filename = "termios.h")]
2113 public const tcflag_t TOSTOP;
2114 [CCode (cheader_filename = "termios.h")]
2115 public const tcflag_t IEXTEN;
2118 [CCode (cheader_filename = "termios.h")]
2119 public const int VINTR;
2120 [CCode (cheader_filename = "termios.h")]
2121 public const int VQUIT;
2122 [CCode (cheader_filename = "termios.h")]
2123 public const int VERASE;
2124 [CCode (cheader_filename = "termios.h")]
2125 public const int VKILL;
2126 [CCode (cheader_filename = "termios.h")]
2127 public const int VEOF;
2128 [CCode (cheader_filename = "termios.h")]
2129 public const int VMIN;
2130 [CCode (cheader_filename = "termios.h")]
2131 public const int VEOL;
2132 [CCode (cheader_filename = "termios.h")]
2133 public const int VTIME;
2134 [CCode (cheader_filename = "termios.h")]
2135 public const int VSTART;
2136 [CCode (cheader_filename = "termios.h")]
2137 public const int VSTOP;
2138 [CCode (cheader_filename = "termios.h")]
2139 public const int VSUSP;
2142 [CCode (cheader_filename = "termios.h")]
2143 public const int TCSANOW;
2144 [CCode (cheader_filename = "termios.h")]
2145 public const int TCSADRAIN;
2146 [CCode (cheader_filename = "termios.h")]
2147 public const int TCSAFLUSH;
2150 [CCode (cheader_filename = "termios.h")]
2151 public const int TCIFLUSH;
2152 [CCode (cheader_filename = "termios.h")]
2153 public const int TCOFLUSH;
2154 [CCode (cheader_filename = "termios.h")]
2155 public const int TCIOFLUSH;
2158 [CCode (cheader_filename = "termios.h")]
2159 public const int TCOOFF;
2160 [CCode (cheader_filename = "termios.h")]
2161 public const int TCOON;
2162 [CCode (cheader_filename = "termios.h")]
2163 public const int TCIOFF;
2164 [CCode (cheader_filename = "termios.h")]
2165 public const int TCION;
2168 [CCode (cheader_filename = "termios.h")]
2169 public const speed_t B0;
2170 [CCode (cheader_filename = "termios.h")]
2171 public const speed_t B50;
2172 [CCode (cheader_filename = "termios.h")]
2173 public const speed_t B75;
2174 [CCode (cheader_filename = "termios.h")]
2175 public const speed_t B110;
2176 [CCode (cheader_filename = "termios.h")]
2177 public const speed_t B134;
2178 [CCode (cheader_filename = "termios.h")]
2179 public const speed_t B150;
2180 [CCode (cheader_filename = "termios.h")]
2181 public const speed_t B200;
2182 [CCode (cheader_filename = "termios.h")]
2183 public const speed_t B300;
2184 [CCode (cheader_filename = "termios.h")]
2185 public const speed_t B600;
2186 [CCode (cheader_filename = "termios.h")]
2187 public const speed_t B1200;
2188 [CCode (cheader_filename = "termios.h")]
2189 public const speed_t B1800;
2190 [CCode (cheader_filename = "termios.h")]
2191 public const speed_t B2400;
2192 [CCode (cheader_filename = "termios.h")]
2193 public const speed_t B4800;
2194 [CCode (cheader_filename = "termios.h")]
2195 public const speed_t B9600;
2196 [CCode (cheader_filename = "termios.h")]
2197 public const speed_t B19200;
2198 [CCode (cheader_filename = "termios.h")]
2199 public const speed_t B38400;
2200 [CCode (cheader_filename = "termios.h")]
2201 public const speed_t B57600;
2202 [CCode (cheader_filename = "termios.h")]
2203 public const speed_t B115200;
2204 [CCode (cheader_filename = "termios.h")]
2205 public const speed_t B230400;
2207 [CCode (cname = "fd_set", cheader_filename = "sys/select.h")]
2208 public struct fd_set {
2211 [CCode (cname = "struct timeval", cheader_filename = "sys/time.h")]
2212 public struct timeval {
2213 public time_t tv_sec;
2214 public long tv_usec;
2215 [CCode (cname = "gettimeofday")]
2216 public int get_time_of_day (void * timezone = null);
2217 [CCode (cname = "settimeofday")]
2218 public int set_time_of_day (void * timezone = null);
2221 [CCode (cname = "sigset_t", cheader_filename = "sys/select.h")]
2222 public struct sigset_t {
2225 [CCode (cheader_filename = "sys/select.h")]
2226 public int select (int nfds, fd_set? readfds, fd_set? writefds, fd_set? exceptfds, timeval timeout);
2227 [CCode (cheader_filename = "sys/select.h")]
2228 public void FD_CLR (int fd, fd_set @set);
2229 [CCode (cheader_filename = "sys/select.h")]
2230 public int FD_ISSET (int fd, fd_set @set);
2231 [CCode (cheader_filename = "sys/select.h")]
2232 public void FD_SET (int fd, fd_set @set);
2233 [CCode (cheader_filename = "sys/select.h")]
2234 public void FD_ZERO (fd_set @set);
2235 [CCode (cheader_filename = "sys/select.h")]
2236 public int pselect (int nfds, fd_set? readfds, fd_set? writefds, fd_set? exceptfds, timespec timeout, sigset_t sigmask);
2238 // sys/mman.h - Posix mmap(), munmap(), mprotect()
2239 [CCode (cheader_filename = "sys/mman.h")]
2240 public void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2241 [CCode (cheader_filename = "sys/mman.h")]
2242 public int munmap(void *addr, size_t length);
2243 [CCode (cheader_filename = "sys/mman.h")]
2244 public int mprotect(void *addr, size_t len, int prot);
2245 [CCode (cheader_filename = "sys/mman.h")]
2246 public const int PROT_READ;
2247 [CCode (cheader_filename = "sys/mman.h")]
2248 public const int PROT_WRITE;
2249 [CCode (cheader_filename = "sys/mman.h")]
2250 public const int PROT_EXEC;
2251 [CCode (cheader_filename = "sys/mman.h")]
2252 public const int MAP_SHARED;
2253 [CCode (cheader_filename = "sys/mman.h")]
2254 public const int MAP_PRIVATE;
2255 [CCode (cheader_filename = "sys/mman.h")]
2256 public const int MAP_FIXED;
2257 [CCode (cheader_filename = "sys/mman.h")]
2258 public void *MAP_FAILED;
2259 // sys/mman.h - [MLR] Range Memory Locking
2260 [CCode (cheader_filename = "sys/mman.h")]
2261 public int mlock(void *addr, size_t len);
2262 [CCode (cheader_filename = "sys/mman.h")]
2263 public int munlock(void *addr, size_t len);
2264 // sys/mman.h - [XSI] X/Open System Interfaces
2265 [CCode (cheader_filename = "sys/mman.h")]
2266 public int msync(void *addr, size_t len, int flags);
2267 [CCode (cheader_filename = "sys/mman.h")]
2268 public const int MS_ASYNC;
2269 [CCode (cheader_filename = "sys/mman.h")]
2270 public const int MS_INVALIDATE;
2271 [CCode (cheader_filename = "sys/mman.h")]
2272 public const int MS_SYNC;
2274 [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h")]
2275 public struct utsname {
2276 public unowned string sysname;
2277 public unowned string nodename;
2278 public unowned string release;
2279 public unowned string version;
2280 public unowned string machine;
2281 [CCode (cname = "uname")]
2286 [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")]
2288 [CCode (cname = "EOF", cheader_filename = "stdio.h")]
2289 public const int EOF;
2290 [CCode (cname = "SEEK_SET", cheader_filename = "stdio.h")]
2291 public const int SEEK_SET;
2292 [CCode (cname = "SEEK_CUR", cheader_filename = "stdio.h")]
2293 public const int SEEK_CUR;
2294 [CCode (cname = "SEEK_END", cheader_filename = "stdio.h")]
2295 public const int SEEK_END;
2297 [CCode (cname = "fopen")]
2298 public static FILE? open (string path, string mode);
2299 [CCode (cname = "fdopen")]
2300 public static FILE? fdopen (int fildes, string mode);
2301 [CCode (cname = "popen")]
2302 public static FILE? popen (string command, string mode);
2304 [CCode (cname = "fprintf")]
2306 public void printf (string format, ...);
2307 [CCode (cname = "fputc", instance_pos = -1)]
2308 public void putc (char c);
2309 [CCode (cname = "fputs", instance_pos = -1)]
2310 public void puts (string s);
2311 [CCode (cname = "fgetc")]
2313 [CCode (cname = "fgets", instance_pos = -1)]
2314 public unowned string gets (char[] s);
2315 [CCode (cname = "feof")]
2317 [CCode (cname = "fscanf"), ScanfFormat]
2318 public int scanf (string format, ...);
2319 [CCode (cname = "fflush")]
2320 public int flush ();
2321 [CCode (cname = "fseek")]
2322 public int seek (long offset, int whence);
2323 [CCode (cname = "ftell")]
2324 public long tell ();
2325 [CCode (cname = "rewind")]
2326 public void rewind ();
2327 [CCode (cname = "fileno")]
2328 public int fileno ();
2329 [CCode (cname = "ferror")]
2330 public int error ();
2331 [CCode (cname = "clearerr")]
2332 public void clearerr ();
2335 public static FILE stderr;
2336 public static FILE stdout;
2337 public static FILE stdin;
2339 [CCode(cheader_filename = "sched.h", cprefix = "sched_")]
2342 [CCode (cname = "struct sched_param")]
2343 public struct Param {
2344 public int sched_priority;
2347 public static int setparam(Posix.pid_t pid, ref Sched.Param param);
2348 public static int getparam(Posix.pid_t pid, out Sched.Param param);
2350 public static int setscheduler(Posix.pid_t pid, Algorithm policy, ref Sched.Param param);
2351 public static Algorithm getscheduler(Posix.pid_t pid);
2353 public static int @yield();
2355 public static int get_priority_max(int algorithm);
2356 public static int get_priority_min(int algorithm);
2358 public static int rr_get_interval(Posix.pid_t pid, out Posix.timespec? interval);
2360 [CCode (cprefix = "SCHED_", cname = "int")]
2361 public enum Algorithm {
2371 [CCode(cheader_filename = "sched.h", cname = "cpu_set_t", free_function = "CPU_FREE", copy_function="memcpy")]
2372 public class CpuSet {
2373 [CCode(cname = "CPU_ALLOC")]
2374 public CpuSet(int num = 1);
2376 [CCode(cname = "CPU_ALLOC_SIZE")]
2377 public static size_t alloc_size(int num = 1);
2379 [CCode(cname = "CPU_SETSIZE")]
2380 public static size_t size;
2382 [CCode(cname = "CPU_COUNT")]
2385 [CCode(cname = "CPU_COUNT_S", instance_pos = -1)]
2386 public int count_sized(size_t num);
2388 [CCode(cname = "CPU_ZERO")]
2391 [CCode(cname = "CPU_ZERO_S", instance_pos = -1)]
2392 public void zero_sized(size_t num);
2394 [CCode(cname = "CPU_SET", instance_pos = -1)]
2395 public void @set(int cpu);
2397 [CCode(cname = "CPU_SET_S", instance_pos = -1)]
2398 public void @set_sized(int cpu, size_t num);
2400 [CCode(cname = "CPU_CLR", instance_pos = -1)]
2401 public void clr(int cpu);
2403 [CCode(cname = "CPU_CLR_S", instance_pos = -1)]
2404 public void clr_sized(int cpu, size_t num);
2406 [CCode(cname = "CPU_ISSET", instance_pos = -1)]
2407 public bool is_set(int cpu);
2409 [CCode(cname = "CPU_ISSET_S", instance_pos = -1)]
2410 public bool is_set_sized(int cpu, size_t num);
2412 [CCode(cname = "CPU_EQUAL")]
2413 public static bool equal(CpuSet cs1, CpuSet cs2);
2415 public bool is_equal(CpuSet cs) {
2416 return CpuSet.equal(this, cs);
2419 [CCode(cname = "CPU_EQUAL_S", instance_pos = -1)]
2420 public static bool equal_sized(size_t num, CpuSet cs1, CpuSet cs2);
2422 public bool is_equal_sized(size_t num, CpuSet cs) {
2423 return CpuSet.equal_sized(num, this, cs);
2426 [CCode(cname = "CPU_AND", instance_pos = -1)]
2427 public void and(CpuSet destset, CpuSet srcset);
2429 [CCode(cname = "CPU_AND_S", instance_pos = -1)]
2430 public void and_sized(size_t num, CpuSet destset, CpuSet srcset);
2432 [CCode(cname = "CPU_OR", instance_pos = -1)]
2433 public void or(CpuSet destset, CpuSet srcset);
2435 [CCode(cname = "CPU_OR_S", instance_pos = -1)]
2436 public void or_sized(size_t num, CpuSet destset, CpuSet srcset);
2438 [CCode(cname = "CPU_XOR", instance_pos = -1)]
2439 public void xor(CpuSet destset, CpuSet srcset);
2441 [CCode(cname = "CPU_XOR_S", instance_pos = -1)]
2442 public void xor_sized(size_t num, CpuSet destset, CpuSet srcset);
2444 [CCode(cname = "sched_setaffinity", instance_pos = -1)]
2445 public int setaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2447 [CCode(cname = "sched_getaffinity", instance_pos = -1)]
2448 public int getaffinity(size_t num, [CCode(pos = 0)]Posix.pid_t pid = 0);
2450 public static CpuSet init(int num = 1) {
2451 CpuSet cpus = new CpuSet(num);
2452 var size = cpus.alloc_size(num);
2453 cpus.zero_sized(size);