3 * Copyright (C) 2008-2009 Jürg Billeter
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Jürg Billeter <j@bitron.ch>
24 [CCode (cname = "bool", cheader_filename = "stdbool.h", default_value = "false")]
29 [CCode (cname = "char", default_value = "\'\\0\'")]
30 [IntegerType (rank = 2, min = 0, max = 127)]
34 [CCode (cname = "unsigned char", default_value = "\'\\0\'")]
35 [IntegerType (rank = 3, min = 0, max = 255)]
39 [CCode (cname = "int", default_value = "0")]
40 [IntegerType (rank = 6)]
44 [CCode (cname = "unsigned int", default_value = "0U")]
45 [IntegerType (rank = 7)]
49 [CCode (cname = "short", default_value = "0")]
50 [IntegerType (rank = 4, min = -32768, max = 32767)]
54 [CCode (cname = "unsigned short", default_value = "0U")]
55 [IntegerType (rank = 5, min = 0, max = 65535)]
56 public struct ushort {
59 [CCode (cname = "long", default_value = "0L")]
60 [IntegerType (rank = 8)]
64 [CCode (cname = "unsigned long", default_value = "0UL")]
65 [IntegerType (rank = 9)]
69 [CCode (cname = "size_t", cheader_filename = "sys/types.h", default_value = "0UL")]
70 [IntegerType (rank = 9)]
71 public struct size_t {
74 [CCode (cname = "ssize_t", cheader_filename = "sys/types.h", default_value = "0L")]
75 [IntegerType (rank = 8)]
76 public struct ssize_t {
79 [CCode (cname = "int8_t", cheader_filename = "stdint.h", default_value = "0")]
80 [IntegerType (rank = 1, min = -128, max = 127)]
84 [CCode (cname = "uint8_t", cheader_filename = "stdint.h", default_value = "0U")]
85 [IntegerType (rank = 3, min = 0, max = 255)]
89 [CCode (cname = "int16_t", cheader_filename = "stdint.h", default_value = "0")]
90 [IntegerType (rank = 4, min = -32768, max = 32767)]
94 [CCode (cname = "uint16_t", cheader_filename = "stdint.h", default_value = "0U")]
95 [IntegerType (rank = 5, min = 0, max = 65535)]
96 public struct uint16 {
99 [CCode (cname = "int32_t", cheader_filename = "stdint.h", default_value = "0")]
100 [IntegerType (rank = 6)]
101 public struct int32 {
104 [CCode (cname = "uint32_t", cheader_filename = "stdint.h", default_value = "0U")]
105 [IntegerType (rank = 7)]
106 public struct uint32 {
109 [CCode (cname = "int64_t", cheader_filename = "stdint.h", default_value = "0LL")]
110 [IntegerType (rank = 10)]
111 public struct int64 {
114 [CCode (cname = "uint64_t", cheader_filename = "stdint.h", default_value = "0ULL")]
115 [IntegerType (rank = 11)]
116 public struct uint64 {
119 [CCode (cname = "float", default_value = "0.0F")]
120 [FloatingType (rank = 1)]
121 public struct float {
124 [CCode (cname = "double", default_value = "0.0")]
125 [FloatingType (rank = 2)]
126 public struct double {
129 [CCode (cheader_filename = "time.h")]
130 [IntegerType (rank = 8)]
131 public struct time_t {
132 [CCode (cname = "time")]
138 [CCode (cname = "char", const_cname = "const char", copy_function = "strdup", free_function = "free", cheader_filename = "stdlib.h,string.h")]
139 public class string {
140 [CCode (cname="atoi")]
142 [CCode (cname="atol")]
143 public long to_long();
144 [CCode (cname="atoll")]
145 public int64 to_int64();
146 [CCode (cname="strlen")]
150 [CCode (cname="printf", cheader_filename = "stdio.h")]
152 public void print (string format,...);
156 [CCode (cprefix = "", lower_case_cprefix = "")]
158 [CCode (cheader_filename = "assert.h")]
159 public void assert (bool expression);
161 [CCode (cheader_filename = "ctype.h")]
162 public bool isalnum (int c);
163 [CCode (cheader_filename = "ctype.h")]
164 public bool isalpha (int c);
165 [CCode (cheader_filename = "ctype.h")]
166 public bool isascii (int c);
167 [CCode (cheader_filename = "ctype.h")]
168 public bool iscntrl (int c);
169 [CCode (cheader_filename = "ctype.h")]
170 public bool isdigit (int c);
171 [CCode (cheader_filename = "ctype.h")]
172 public bool isgraph (int c);
173 [CCode (cheader_filename = "ctype.h")]
174 public bool islower (int c);
175 [CCode (cheader_filename = "ctype.h")]
176 public bool isprint (int c);
177 [CCode (cheader_filename = "ctype.h")]
178 public bool ispunct (int c);
179 [CCode (cheader_filename = "ctype.h")]
180 public bool isspace (int c);
181 [CCode (cheader_filename = "ctype.h")]
182 public bool isupper (int c);
183 [CCode (cheader_filename = "ctype.h")]
184 public bool isxdigit (int c);
185 [CCode (cheader_filename = "ctype.h")]
186 public int toascii (int c);
187 [CCode (cheader_filename = "ctype.h")]
188 public int tolower (int c);
189 [CCode (cheader_filename = "ctype.h")]
190 public int toupper (int c);
193 [CCode (cname = "struct dirent", cheader_filename = "dirent.h")]
194 public class DirEnt {
197 public ushort d_reclen;
199 public char d_name[256];
203 [CCode (cname = "DIR", free_function = "closedir", cheader_filename = "dirent.h")]
207 [CCode (cheader_filename = "dirent.h")]
208 public int dirfd (Dir dir);
209 [CCode (cheader_filename = "dirent.h")]
210 public Dir? opendir (string filename);
211 [CCode (cheader_filename = "dirent.h")]
212 public Dir? fdopendir (int fd);
213 [CCode (cheader_filename = "dirent.h")]
214 public unowned DirEnt? readdir (Dir dir);
215 [CCode (cheader_filename = "dirent.h")]
216 public void rewinddir (Dir dir);
217 [CCode (cheader_filename = "dirent.h")]
218 public void seekdir (Dir dir, long pos);
219 [CCode (cheader_filename = "dirent.h")]
220 public long telldir (Dir dir);
222 [CCode (cheader_filename = "errno.h")]
224 [CCode (cheader_filename = "errno.h")]
225 public const int E2BIG;
226 [CCode (cheader_filename = "errno.h")]
227 public const int EACCES;
228 [CCode (cheader_filename = "errno.h")]
229 public const int EADDRINUSE;
230 [CCode (cheader_filename = "errno.h")]
231 public const int EADDRNOTAVAIL;
232 [CCode (cheader_filename = "errno.h")]
233 public const int EAFNOSUPPORT;
234 [CCode (cheader_filename = "errno.h")]
235 public const int EAGAIN;
236 [CCode (cheader_filename = "errno.h")]
237 public const int EALREADY;
238 [CCode (cheader_filename = "errno.h")]
239 public const int EBADF;
240 [CCode (cheader_filename = "errno.h")]
241 public const int EBADMSG;
242 [CCode (cheader_filename = "errno.h")]
243 public const int EBUSY;
244 [CCode (cheader_filename = "errno.h")]
245 public const int ECANCELED;
246 [CCode (cheader_filename = "errno.h")]
247 public const int ECHILD;
248 [CCode (cheader_filename = "errno.h")]
249 public const int ECONNABORTED;
250 [CCode (cheader_filename = "errno.h")]
251 public const int ECONNREFUSED;
252 [CCode (cheader_filename = "errno.h")]
253 public const int ECONNRESET;
254 [CCode (cheader_filename = "errno.h")]
255 public const int EDEADLK;
256 [CCode (cheader_filename = "errno.h")]
257 public const int EDESTADDRREQ;
258 [CCode (cheader_filename = "errno.h")]
259 public const int EDOM;
260 [CCode (cheader_filename = "errno.h")]
261 public const int EDQUOT;
262 [CCode (cheader_filename = "errno.h")]
263 public const int EEXIST;
264 [CCode (cheader_filename = "errno.h")]
265 public const int EFAULT;
266 [CCode (cheader_filename = "errno.h")]
267 public const int EFBIG;
268 [CCode (cheader_filename = "errno.h")]
269 public const int EHOSTUNREACH;
270 [CCode (cheader_filename = "errno.h")]
271 public const int EIDRM;
272 [CCode (cheader_filename = "errno.h")]
273 public const int EILSEQ;
274 [CCode (cheader_filename = "errno.h")]
275 public const int EINPROGRESS;
276 [CCode (cheader_filename = "errno.h")]
277 public const int EINTR;
278 [CCode (cheader_filename = "errno.h")]
279 public const int EINVAL;
280 [CCode (cheader_filename = "errno.h")]
281 public const int EIO;
282 [CCode (cheader_filename = "errno.h")]
283 public const int EISCONN;
284 [CCode (cheader_filename = "errno.h")]
285 public const int EISDIR;
286 [CCode (cheader_filename = "errno.h")]
287 public const int ELOOP;
288 [CCode (cheader_filename = "errno.h")]
289 public const int EMFILE;
290 [CCode (cheader_filename = "errno.h")]
291 public const int EMLINK;
292 [CCode (cheader_filename = "errno.h")]
293 public const int EMSGSIZE;
294 [CCode (cheader_filename = "errno.h")]
295 public const int EMULTIHOP;
296 [CCode (cheader_filename = "errno.h")]
297 public const int ENAMETOOLONG;
298 [CCode (cheader_filename = "errno.h")]
299 public const int ENETDOWN;
300 [CCode (cheader_filename = "errno.h")]
301 public const int ENETRESET;
302 [CCode (cheader_filename = "errno.h")]
303 public const int ENETUNREACH;
304 [CCode (cheader_filename = "errno.h")]
305 public const int ENFILE;
306 [CCode (cheader_filename = "errno.h")]
307 public const int ENOBUFS;
308 [CCode (cheader_filename = "errno.h")]
309 public const int ENODATA;
310 [CCode (cheader_filename = "errno.h")]
311 public const int ENODEV;
312 [CCode (cheader_filename = "errno.h")]
313 public const int ENOENT;
314 [CCode (cheader_filename = "errno.h")]
315 public const int ENOEXEC;
316 [CCode (cheader_filename = "errno.h")]
317 public const int ENOLCK;
318 [CCode (cheader_filename = "errno.h")]
319 public const int ENOLINK;
320 [CCode (cheader_filename = "errno.h")]
321 public const int ENOMEM;
322 [CCode (cheader_filename = "errno.h")]
323 public const int ENOMSG;
324 [CCode (cheader_filename = "errno.h")]
325 public const int ENOPROTOOPT;
326 [CCode (cheader_filename = "errno.h")]
327 public const int ENOSPC;
328 [CCode (cheader_filename = "errno.h")]
329 public const int ENOSR;
330 [CCode (cheader_filename = "errno.h")]
331 public const int ENOSTR;
332 [CCode (cheader_filename = "errno.h")]
333 public const int ENOSYS;
334 [CCode (cheader_filename = "errno.h")]
335 public const int ENOTCONN;
336 [CCode (cheader_filename = "errno.h")]
337 public const int ENOTDIR;
338 [CCode (cheader_filename = "errno.h")]
339 public const int ENOTEMPTY;
340 [CCode (cheader_filename = "errno.h")]
341 public const int ENOTSOCK;
342 [CCode (cheader_filename = "errno.h")]
343 public const int ENOTSUP;
344 [CCode (cheader_filename = "errno.h")]
345 public const int ENOTTY;
346 [CCode (cheader_filename = "errno.h")]
347 public const int ENXIO;
348 [CCode (cheader_filename = "errno.h")]
349 public const int EOPNOTSUPP;
350 [CCode (cheader_filename = "errno.h")]
351 public const int EOVERFLOW;
352 [CCode (cheader_filename = "errno.h")]
353 public const int EPERM;
354 [CCode (cheader_filename = "errno.h")]
355 public const int EPIPE;
356 [CCode (cheader_filename = "errno.h")]
357 public const int EPROTO;
358 [CCode (cheader_filename = "errno.h")]
359 public const int EPROTONOSUPPORT;
360 [CCode (cheader_filename = "errno.h")]
361 public const int EPROTOTYPE;
362 [CCode (cheader_filename = "errno.h")]
363 public const int ERANGE;
364 [CCode (cheader_filename = "errno.h")]
365 public const int EROFS;
366 [CCode (cheader_filename = "errno.h")]
367 public const int ESPIPE;
368 [CCode (cheader_filename = "errno.h")]
369 public const int ESRCH;
370 [CCode (cheader_filename = "errno.h")]
371 public const int ESTALE;
372 [CCode (cheader_filename = "errno.h")]
373 public const int ETIME;
374 [CCode (cheader_filename = "errno.h")]
375 public const int ETIMEDOUT;
376 [CCode (cheader_filename = "errno.h")]
377 public const int ETXTBSY;
378 [CCode (cheader_filename = "errno.h")]
379 public const int EWOULDBLOCK;
380 [CCode (cheader_filename = "errno.h")]
381 public const int EXDEV;
383 [CCode (cheader_filename = "fcntl.h")]
384 public const int F_DUPFD;
385 [CCode (cheader_filename = "fcntl.h")]
386 public const int F_GETFD;
387 [CCode (cheader_filename = "fcntl.h")]
388 public const int F_SETFD;
389 [CCode (cheader_filename = "fcntl.h")]
390 public const int F_GETFL;
391 [CCode (cheader_filename = "fcntl.h")]
392 public const int F_SETFL;
393 [CCode (cheader_filename = "fcntl.h")]
394 public const int F_GETLK;
395 [CCode (cheader_filename = "fcntl.h")]
396 public const int F_SETLK;
397 [CCode (cheader_filename = "fcntl.h")]
398 public const int F_SETLKW;
399 [CCode (cheader_filename = "fcntl.h")]
400 public const int F_GETOWN;
401 [CCode (cheader_filename = "fcntl.h")]
402 public const int F_SETOWN;
403 [CCode (cheader_filename = "fcntl.h")]
404 public const int FD_CLOEXEC;
405 [CCode (cheader_filename = "fcntl.h")]
406 public const int F_RDLCK;
407 [CCode (cheader_filename = "fcntl.h")]
408 public const int F_UNLCK;
409 [CCode (cheader_filename = "fcntl.h")]
410 public const int F_WRLCK;
411 [CCode (cheader_filename = "fcntl.h")]
412 public const int O_CREAT;
413 [CCode (cheader_filename = "fcntl.h")]
414 public const int O_EXCL;
415 [CCode (cheader_filename = "fcntl.h")]
416 public const int O_NOCTTY;
417 [CCode (cheader_filename = "fcntl.h")]
418 public const int O_TRUNC;
419 [CCode (cheader_filename = "fcntl.h")]
420 public const int O_APPEND;
421 [CCode (cheader_filename = "fcntl.h")]
422 public const int O_DSYNC;
423 [CCode (cheader_filename = "fcntl.h")]
424 public const int O_NONBLOCK;
425 [CCode (cheader_filename = "fcntl.h")]
426 public const int O_RSYNC;
427 [CCode (cheader_filename = "fcntl.h")]
428 public const int O_SYNC;
429 [CCode (cheader_filename = "fcntl.h")]
430 public const int O_ACCMODE;
431 [CCode (cheader_filename = "fcntl.h")]
432 public const int O_RDONLY;
433 [CCode (cheader_filename = "fcntl.h")]
434 public const int O_RDWR;
435 [CCode (cheader_filename = "fcntl.h")]
436 public const int O_WRONLY;
437 [CCode (cheader_filename = "fcntl.h")]
438 public const int POSIX_FADV_NORMAL;
439 [CCode (cheader_filename = "fcntl.h")]
440 public const int POSIX_FADV_SEQUENTIAL;
441 [CCode (cheader_filename = "fcntl.h")]
442 public const int POSIX_FADV_RANDOM;
443 [CCode (cheader_filename = "fcntl.h")]
444 public const int POSIX_FADV_WILLNEED;
445 [CCode (cheader_filename = "fcntl.h")]
446 public const int POSIX_FADV_DONTNEED;
447 [CCode (cheader_filename = "fcntl.h")]
448 public const int POSIX_FADV_NOREUSE;
449 [CCode (cheader_filename = "fcntl.h")]
450 public int creat (string path, mode_t mode);
451 [CCode (cheader_filename = "fcntl.h")]
452 public int fcntl (int fd, int cmd, ...);
453 [CCode (cheader_filename = "fcntl.h")]
454 public int open (string path, int oflag, mode_t mode=0);
455 [CCode (cheader_filename = "fcntl.h")]
456 public int posix_fadvise (int fd, long offset, long len, int advice);
457 [CCode (cheader_filename = "fcntl.h")]
458 public int posix_fallocate (int fd, long offset, long len);
461 [CCode (cname = "struct group", cheader_filename = "grp.h")]
463 public string gr_name;
464 public string gr_passwd;
466 public string[] gr_mem;
468 [CCode (cheader_filename = "grp.h")]
469 public void endgrent ();
470 public unowned Group? getgrent ();
471 public void setgrent ();
473 [CCode (cheader_filename = "arpa/inet.h")]
474 public uint32 inet_addr (string host);
475 [CCode (cheader_filename = "arpa/inet.h")]
476 public unowned string inet_ntoa (InAddr addr);
477 [CCode (cheader_filename = "arpa/inet.h")]
478 public uint32 htonl (uint32 hostlong);
479 [CCode (cheader_filename = "arpa/inet.h")]
480 public uint32 ntohl (uint32 netlong);
481 [CCode (cheader_filename = "arpa/inet.h")]
482 public uint16 htons (uint16 hostshort);
483 [CCode (cheader_filename = "arpa/inet.h")]
484 public uint16 ntohs (uint16 netshort);
486 [CCode (cheader_filename = "math.h")]
487 public double acos (double x);
488 [CCode (cheader_filename = "math.h")]
489 public float acosf (float x);
490 [CCode (cheader_filename = "math.h")]
491 public double asin (double x);
492 [CCode (cheader_filename = "math.h")]
493 public float asinf (float x);
494 [CCode (cheader_filename = "math.h")]
495 public double atan (double x);
496 [CCode (cheader_filename = "math.h")]
497 public float atanf (float x);
498 [CCode (cheader_filename = "math.h")]
499 public double atan2 (double y, double x);
500 [CCode (cheader_filename = "math.h")]
501 public float atan2f (float y, float x);
502 [CCode (cheader_filename = "math.h")]
503 public double cos (double x);
504 [CCode (cheader_filename = "math.h")]
505 public float cosf (float x);
506 [CCode (cheader_filename = "math.h")]
507 public double sin (double x);
508 [CCode (cheader_filename = "math.h")]
509 public float sinf (float x);
510 [CCode (cheader_filename = "math.h")]
511 public double tan (double x);
512 [CCode (cheader_filename = "math.h")]
513 public float tanf (float x);
514 [CCode (cheader_filename = "math.h")]
515 public double cosh (double x);
516 [CCode (cheader_filename = "math.h")]
517 public float coshf (float x);
518 [CCode (cheader_filename = "math.h")]
519 public double sinh (double x);
520 [CCode (cheader_filename = "math.h")]
521 public float sinhf (float x);
522 [CCode (cheader_filename = "math.h")]
523 public double tanh (double x);
524 [CCode (cheader_filename = "math.h")]
525 public float tanhf (float x);
526 [CCode (cheader_filename = "math.h")]
527 public void sincos (double x, out double sinx, out double cosx);
528 [CCode (cheader_filename = "math.h")]
529 public void sincosf (float x, out float sinx, out float cosx);
530 [CCode (cheader_filename = "math.h")]
531 public double acosh (double x);
532 [CCode (cheader_filename = "math.h")]
533 public float acoshf (float x);
534 [CCode (cheader_filename = "math.h")]
535 public double asinh (double x);
536 [CCode (cheader_filename = "math.h")]
537 public float asinhf (float x);
538 [CCode (cheader_filename = "math.h")]
539 public double atanh (double x);
540 [CCode (cheader_filename = "math.h")]
541 public float atanhf (float x);
542 [CCode (cheader_filename = "math.h")]
543 public double exp (double x);
544 [CCode (cheader_filename = "math.h")]
545 public float expf (float x);
546 [CCode (cheader_filename = "math.h")]
547 public double frexp (double x, out int exponent);
548 [CCode (cheader_filename = "math.h")]
549 public float frexpf (float x, out int exponent);
550 [CCode (cheader_filename = "math.h")]
551 public double ldexp (double x, int exponent);
552 [CCode (cheader_filename = "math.h")]
553 public float ldexpf (float x, int exponent);
554 [CCode (cheader_filename = "math.h")]
555 public double log (double x);
556 [CCode (cheader_filename = "math.h")]
557 public float logf (float x);
558 [CCode (cheader_filename = "math.h")]
559 public double log10 (double x);
560 [CCode (cheader_filename = "math.h")]
561 public float log10f (float x);
562 [CCode (cheader_filename = "math.h")]
563 public double modf (double x, out double iptr);
564 [CCode (cheader_filename = "math.h")]
565 public float modff (float x, out float iptr);
566 [CCode (cheader_filename = "math.h")]
567 public double exp10 (double x);
568 [CCode (cheader_filename = "math.h")]
569 public float exp10f (float x);
570 [CCode (cheader_filename = "math.h")]
571 public double pow10 (double x);
572 [CCode (cheader_filename = "math.h")]
573 public float pow10f (float x);
574 [CCode (cheader_filename = "math.h")]
575 public double expm1 (double x);
576 [CCode (cheader_filename = "math.h")]
577 public float expm1f (float x);
578 [CCode (cheader_filename = "math.h")]
579 public double log1p (double x);
580 [CCode (cheader_filename = "math.h")]
581 public float log1pf (float x);
582 [CCode (cheader_filename = "math.h")]
583 public double logb (double x);
584 [CCode (cheader_filename = "math.h")]
585 public float logbf (float x);
586 [CCode (cheader_filename = "math.h")]
587 public double exp2 (double x);
588 [CCode (cheader_filename = "math.h")]
589 public float exp2f (float x);
590 [CCode (cheader_filename = "math.h")]
591 public double log2 (double x);
592 [CCode (cheader_filename = "math.h")]
593 public float log2f (float x);
594 [CCode (cheader_filename = "math.h")]
595 public double pow (double x, double y);
596 [CCode (cheader_filename = "math.h")]
597 public float powf (float x, float y);
598 [CCode (cheader_filename = "math.h")]
599 public double sqrt (double x);
600 [CCode (cheader_filename = "math.h")]
601 public float sqrtf (float x);
602 [CCode (cheader_filename = "math.h")]
603 public double hypot (double x, double y);
604 [CCode (cheader_filename = "math.h")]
605 public float hypotf (float x, float y);
606 [CCode (cheader_filename = "math.h")]
607 public double cbrt (double x);
608 [CCode (cheader_filename = "math.h")]
609 public float cbrtf (float x);
610 [CCode (cheader_filename = "math.h")]
611 public double ceil (double x);
612 [CCode (cheader_filename = "math.h")]
613 public float ceilf (float x);
614 [CCode (cheader_filename = "math.h")]
615 public double fabs (double x);
616 [CCode (cheader_filename = "math.h")]
617 public float fabsf (float x);
618 [CCode (cheader_filename = "math.h")]
619 public double floor (double x);
620 [CCode (cheader_filename = "math.h")]
621 public float floorf (float x);
622 [CCode (cheader_filename = "math.h")]
623 public double fmod (double x, double y);
624 [CCode (cheader_filename = "math.h")]
625 public float fmodf (float x, float y);
626 [CCode (cheader_filename = "math.h")]
627 public int isinf (double value);
628 [CCode (cheader_filename = "math.h")]
629 public int isinff (float value);
630 [CCode (cheader_filename = "math.h")]
631 public int finite (double value);
632 [CCode (cheader_filename = "math.h")]
633 public int finitef (float value);
634 [CCode (cheader_filename = "math.h")]
635 public double drem (double x, double y);
636 [CCode (cheader_filename = "math.h")]
637 public float dremf (float x, float y);
638 [CCode (cheader_filename = "math.h")]
639 public double significand (double x);
640 [CCode (cheader_filename = "math.h")]
641 public float significandf (float x);
642 [CCode (cheader_filename = "math.h")]
643 public double copysign (double x, double y);
644 [CCode (cheader_filename = "math.h")]
645 public float copysignf (float x, float y);
646 [CCode (cheader_filename = "math.h")]
647 public double nan (string tagb);
648 [CCode (cheader_filename = "math.h")]
649 public float nanf (string tagb);
650 [CCode (cheader_filename = "math.h")]
651 public int isnan (double value);
652 [CCode (cheader_filename = "math.h")]
653 public int isnanf (float value);
654 [CCode (cheader_filename = "math.h")]
655 public double j0 (double x0);
656 [CCode (cheader_filename = "math.h")]
657 public float j0f (float x0);
658 [CCode (cheader_filename = "math.h")]
659 public double j1 (double x0);
660 [CCode (cheader_filename = "math.h")]
661 public float j1f (float x0);
662 [CCode (cheader_filename = "math.h")]
663 public double jn (int x0, double x1);
664 [CCode (cheader_filename = "math.h")]
665 public float jnf (int x0, float x1);
666 [CCode (cheader_filename = "math.h")]
667 public double y0 (double x0);
668 [CCode (cheader_filename = "math.h")]
669 public float y0f (float x0);
670 [CCode (cheader_filename = "math.h")]
671 public double y1 (double x0);
672 [CCode (cheader_filename = "math.h")]
673 public float y1f (float x0);
674 [CCode (cheader_filename = "math.h")]
675 public double yn (int x0, double x1);
676 [CCode (cheader_filename = "math.h")]
677 public float ynf (int x0, float x1);
678 [CCode (cheader_filename = "math.h")]
679 public double erf (double x0);
680 [CCode (cheader_filename = "math.h")]
681 public float erff (float x0);
682 [CCode (cheader_filename = "math.h")]
683 public double erfc (double x0);
684 [CCode (cheader_filename = "math.h")]
685 public float erfcf (float x0);
686 [CCode (cheader_filename = "math.h")]
687 public double lgamma (double x0);
688 [CCode (cheader_filename = "math.h")]
689 public float lgammaf (float x0);
690 [CCode (cheader_filename = "math.h")]
691 public double tgamma (double x0);
692 [CCode (cheader_filename = "math.h")]
693 public float tgammaf (float x0);
694 [CCode (cheader_filename = "math.h")]
695 public double gamma (double x0);
696 [CCode (cheader_filename = "math.h")]
697 public float gammaf (float x0);
698 [CCode (cheader_filename = "math.h")]
699 public double lgamma_r (double x0, out int signgamp);
700 [CCode (cheader_filename = "math.h")]
701 public float lgamma_rf (float x0, out int signgamp);
702 [CCode (cheader_filename = "math.h")]
703 public double rint (double x);
704 [CCode (cheader_filename = "math.h")]
705 public float rintf (float x);
706 [CCode (cheader_filename = "math.h")]
707 public double nextafter (double x, double y);
708 [CCode (cheader_filename = "math.h")]
709 public float nextafterf (float x, float y);
710 [CCode (cheader_filename = "math.h")]
711 public double nexttoward (double x, double y);
712 [CCode (cheader_filename = "math.h")]
713 public float nexttowardf (float x, double y);
714 [CCode (cheader_filename = "math.h")]
715 public double remainder (double x, double y);
716 [CCode (cheader_filename = "math.h")]
717 public float remainderf (float x, float y);
718 [CCode (cheader_filename = "math.h")]
719 public double scalbn (double x, int n);
720 [CCode (cheader_filename = "math.h")]
721 public float scalbnf (float x, int n);
722 [CCode (cheader_filename = "math.h")]
723 public int ilogb (double x);
724 [CCode (cheader_filename = "math.h")]
725 public int ilogbf (float x);
726 [CCode (cheader_filename = "math.h")]
727 public double scalbln (double x, long n);
728 [CCode (cheader_filename = "math.h")]
729 public float scalblnf (float x, long n);
730 [CCode (cheader_filename = "math.h")]
731 public double nearbyint (double x);
732 [CCode (cheader_filename = "math.h")]
733 public float nearbyintf (float x);
734 [CCode (cheader_filename = "math.h")]
735 public double round (double x);
736 [CCode (cheader_filename = "math.h")]
737 public float roundf (float x);
738 [CCode (cheader_filename = "math.h")]
739 public double trunc (double x);
740 [CCode (cheader_filename = "math.h")]
741 public float truncf (float x);
742 [CCode (cheader_filename = "math.h")]
743 public double remquo (double x, double y, out int quo);
744 [CCode (cheader_filename = "math.h")]
745 public float remquof (float x, float y, out int quo);
746 [CCode (cheader_filename = "math.h")]
747 public long lrint (double x);
748 [CCode (cheader_filename = "math.h")]
749 public long lrintf (float x);
750 [CCode (cheader_filename = "math.h")]
751 public int64 llrint (double x);
752 [CCode (cheader_filename = "math.h")]
753 public int64 llrintf (float x);
754 [CCode (cheader_filename = "math.h")]
755 public long lround (double x);
756 [CCode (cheader_filename = "math.h")]
757 public long lroundf (float x);
758 [CCode (cheader_filename = "math.h")]
759 public int64 llround (double x);
760 [CCode (cheader_filename = "math.h")]
761 public int64 llroundf (float x);
762 [CCode (cheader_filename = "math.h")]
763 public double fdim (double x, double y);
764 [CCode (cheader_filename = "math.h")]
765 public float fdimf (float x, float y);
766 [CCode (cheader_filename = "math.h")]
767 public double fmax (double x, double y);
768 [CCode (cheader_filename = "math.h")]
769 public float fmaxf (float x, float y);
770 [CCode (cheader_filename = "math.h")]
771 public double fmin (double x, double y);
772 [CCode (cheader_filename = "math.h")]
773 public float fminf (float x, float y);
774 [CCode (cheader_filename = "math.h")]
775 public double fma (double x, double y, double z);
776 [CCode (cheader_filename = "math.h")]
777 public float fmaf (float x, float y, float z);
778 [CCode (cheader_filename = "math.h")]
779 public double scalb (double x, double n);
780 [CCode (cheader_filename = "math.h")]
781 public float scalbf (float x, float n);
783 [CCode (cheader_filename = "poll.h", cname = "struct pollfd")]
784 public struct pollfd {
790 [CCode (cheader_filename = "poll.h")]
791 public const int POLLIN;
792 [CCode (cheader_filename = "poll.h")]
793 public const int POLLPRI;
794 [CCode (cheader_filename = "poll.h")]
795 public const int POLLOUT;
796 [CCode (cheader_filename = "poll.h")]
797 public const int POLLRDHUP;
798 [CCode (cheader_filename = "poll.h")]
799 public const int POLLERR;
800 [CCode (cheader_filename = "poll.h")]
801 public const int POLLHUP;
802 [CCode (cheader_filename = "poll.h")]
803 public const int POLLNVAL;
806 [IntegerType (rank = 9)]
807 [CCode (cheader_filename = "poll.h", cname = "nfds_t")]
808 public struct nfds_t {
811 [CCode (cheader_filename = "poll.h")]
812 public int poll (pollfd fds, nfds_t nfds, int timeout);
813 [CCode (cheader_filename = "poll.h")]
814 public int ppoll (pollfd fds, nfds_t nfds, timespec? timeout, sigset_t? sigmask);
817 [CCode (cname = "struct passwd", cheader_filename = "pwd.h")]
818 public class Passwd {
819 public string pw_name;
820 public string pw_passwd;
823 public string pw_gecos;
824 public string pw_dir;
825 public string pw_shell;
827 [CCode (cheader_filename = "pwd.h")]
828 public void endpwent ();
829 public unowned Passwd? getpwent ();
830 public void setpwent ();
831 [CCode (cheader_filename = "pwd.h")]
832 public unowned Passwd? getpwnam (string name);
834 [CCode (cheader_filename = "sys/resource.h")]
835 public const int PRIO_PROCESS;
836 [CCode (cheader_filename = "sys/resource.h")]
837 public const int PRIO_PGRP;
838 [CCode (cheader_filename = "sys/resource.h")]
839 public const int PRIO_USER;
841 [CCode (cheader_filename = "signal.h")]
842 public const int SIGABRT;
843 [CCode (cheader_filename = "signal.h")]
844 public const int SIGALRM;
845 [CCode (cheader_filename = "signal.h")]
846 public const int SIGBUS;
847 [CCode (cheader_filename = "signal.h")]
848 public const int SIGCHLD;
849 [CCode (cheader_filename = "signal.h")]
850 public const int SIGCONT;
851 [CCode (cheader_filename = "signal.h")]
852 public const int SIGFPE;
853 [CCode (cheader_filename = "signal.h")]
854 public const int SIGHUP;
855 [CCode (cheader_filename = "signal.h")]
856 public const int SIGILL;
857 [CCode (cheader_filename = "signal.h")]
858 public const int SIGINT;
859 [CCode (cheader_filename = "signal.h")]
860 public const int SIGKILL;
861 [CCode (cheader_filename = "signal.h")]
862 public const int SIGPIPE;
863 [CCode (cheader_filename = "signal.h")]
864 public const int SIGQUIT;
865 [CCode (cheader_filename = "signal.h")]
866 public const int SIGSEGV;
867 [CCode (cheader_filename = "signal.h")]
868 public const int SIGSTOP;
869 [CCode (cheader_filename = "signal.h")]
870 public const int SIGTERM;
871 [CCode (cheader_filename = "signal.h")]
872 public const int SIGTSTP;
873 [CCode (cheader_filename = "signal.h")]
874 public const int SIGTTIN;
875 [CCode (cheader_filename = "signal.h")]
876 public const int SIGTTOU;
877 [CCode (cheader_filename = "signal.h")]
878 public const int SIGUSR1;
879 [CCode (cheader_filename = "signal.h")]
880 public const int SIGUSR2;
881 [CCode (cheader_filename = "signal.h")]
882 public const int SIGPOLL;
883 [CCode (cheader_filename = "signal.h")]
884 public const int SIGPROF;
885 [CCode (cheader_filename = "signal.h")]
886 public const int SIGSYS;
887 [CCode (cheader_filename = "signal.h")]
888 public const int SIGTRAP;
889 [CCode (cheader_filename = "signal.h")]
890 public const int SIGURG;
891 [CCode (cheader_filename = "signal.h")]
892 public const int SIGVTALRM;
893 [CCode (cheader_filename = "signal.h")]
894 public const int SIGXCPU;
895 [CCode (cheader_filename = "signal.h")]
896 public const int SIGXFSZ;
897 [CCode (cheader_filename = "signal.h")]
898 public const int SIGIOT;
899 [CCode (cheader_filename = "signal.h")]
900 public const int SIGSTKFLT;
903 [IntegerType (rank = 6)]
904 [CCode (cname = "pid_t", default_value = "0", cheader_filename = "sys/types.h")]
905 public struct pid_t {
908 [CCode (cname = "struct sigaction", cheader_filename = "signal.h")]
909 public struct sigaction_t {
910 sighandler_t sa_handler;
915 [CCode (cheader_filename = "signal.h")]
916 public int kill (pid_t pid, int signum);
917 [CCode (cheader_filename = "signal.h")]
918 public int killpg (pid_t pgpr, int signum);
919 [CCode (cheader_filename = "signal.h")]
920 public int raise (int signum);
921 [CCode (cheader_filename = "signal.h")]
922 public int sigemptyset (sigset_t sigset);
923 [CCode (cheader_filename = "signal.h")]
924 public int sigfillset (sigset_t sigset);
925 [CCode (cheader_filename = "signal.h")]
926 public int sigaddset (sigset_t sigset, int signo);
927 [CCode (cheader_filename = "signal.h")]
928 public int sigdelset (sigset_t sigset, int __signo);
929 [CCode (cheader_filename = "signal.h")]
930 public int sigismember (sigset_t sigset, int __signo);
931 [CCode (cheader_filename = "signal.h")]
932 public int sigprocmask (int how, sigset_t sigset, sigset_t oset);
933 [CCode (cheader_filename = "signal.h")]
934 public int sigsuspend (sigset_t sigset);
935 [CCode (cheader_filename = "signal.h")]
936 public int sigpending (sigset_t sigset);
937 [CCode (cheader_filename = "signal.h")]
938 public int sigwait (sigset_t sigset, out int sig);
939 [CCode (cheader_filename = "signal.h")]
940 public int sigaction (int signum, sigaction_t? act, out sigaction_t? oldact);
942 [CCode (has_target = false, cheader_filename = "signal.h")]
943 public delegate void sighandler_t (int signal);
945 [CCode (cheader_filename = "signal.h")]
946 public sighandler_t SIG_DFL;
948 [CCode (cheader_filename = "signal.h")]
949 public sighandler_t SIG_ERR;
951 [CCode (cheader_filename = "signal.h")]
952 public sighandler_t SIG_IGN;
954 [CCode (cheader_filename = "signal.h")]
955 public sighandler_t signal (int signum, sighandler_t? handler);
957 [CCode (cheader_filename = "stdio.h")]
959 public void printf (string format,...);
961 [CCode (cheader_filename = "stdlib.h")]
962 public void abort ();
963 [CCode (cheader_filename = "stdlib.h")]
964 public void exit (int status);
966 [CCode (cheader_filename = "stdlib.h")]
967 public void _exit (int status);
969 public delegate void AtExitFunc ();
971 [CCode (cheader_filename = "stdlib.h")]
972 public void atexit (AtExitFunc func);
974 [CCode (cheader_filename = "stdlib.h")]
975 public int mkstemp (string template);
977 [CCode (cheader_filename = "stdlib.h")]
978 public int mkostemp (string template, int flags);
980 [CCode (cheader_filename = "stdlib.h")]
981 public int posix_openpt (int flags);
982 [CCode (cheader_filename = "stdlib.h")]
983 public int grantpt (int fd);
984 [CCode (cheader_filename = "stdlib.h")]
985 public int unlockpt (int fd);
987 [CCode (cheader_filename = "stdlib.h")]
988 public int system (string command);
990 [CCode (has_target = false, cheader_filename = "stdlib.h", cname = "__compar_fn_t")]
991 public delegate int compar_fn_t (void* key1, void* key2);
993 [CCode (cheader_filename = "stdlib.h")]
994 public void* bsearch (void* key, void* base, size_t nmemb, size_t size, compar_fn_t func);
996 [CCode (cheader_filename = "stdlib.h")]
997 public void qsort (void* base, size_t nmemb, size_t size, compar_fn_t func);
999 [CCode (cheader_filename = "stdlib.h")]
1000 public void qsort_r (void* base, size_t nmemb, size_t size, compar_fn_t func, void* arg);
1002 [CCode (cheader_filename = "stdlib.h")]
1003 public const int EXIT_FAILURE;
1004 [CCode (cheader_filename = "stdlib.h")]
1005 public const int EXIT_SUCCESS;
1007 [CCode (cheader_filename = "string.h")]
1008 public void* memccpy (void* s1, void* s2, int c, size_t n);
1009 [CCode (cheader_filename = "string.h")]
1010 public void* memchr (void* s, int c, size_t n);
1011 [CCode (cheader_filename = "string.h")]
1012 public int memcmp (void* s1, void* s2, size_t n);
1013 [CCode (cheader_filename = "string.h")]
1014 public void* memcpy (void* s1, void* s2, size_t n);
1015 [CCode (cheader_filename = "string.h")]
1016 public void* memmove (void* s1, void* s2, size_t n);
1017 [CCode (cheader_filename = "string.h")]
1018 public void* memset (void* s, int c, size_t n);
1019 [CCode (cheader_filename = "string.h")]
1020 public unowned string strcat (string s1, string s2);
1021 [CCode (cheader_filename = "string.h")]
1022 public unowned string strchr (string s, int c);
1023 [CCode (cheader_filename = "string.h")]
1024 public int strcmp (string s1, string s2);
1025 [CCode (cheader_filename = "string.h")]
1026 public int strcoll (string s1, string s2);
1027 [CCode (cheader_filename = "string.h")]
1028 public unowned string strcpy (string s1, string s2);
1029 [CCode (cheader_filename = "string.h")]
1030 public size_t strcspn (string s1, string s2);
1031 [CCode (cheader_filename = "string.h")]
1032 public unowned string strdup (string s1);
1033 [CCode (cheader_filename = "string.h")]
1034 public unowned string strerror (int errnum);
1035 [CCode (cheader_filename = "string.h")]
1036 public int* strerror_r (int errnum, string strerrbuf, size_t buflen);
1037 [CCode (cheader_filename = "string.h")]
1038 public size_t strlen (string s);
1039 [CCode (cheader_filename = "string.h")]
1040 public unowned string strncat (string s1, string s2, size_t n);
1041 [CCode (cheader_filename = "string.h")]
1042 public int strncmp (string s1, string s2, size_t n);
1043 [CCode (cheader_filename = "string.h")]
1044 public unowned string strncpy (string s1, string s2, size_t n);
1045 [CCode (cheader_filename = "string.h")]
1046 public unowned string strpbrk (string s1, string s2);
1047 [CCode (cheader_filename = "string.h")]
1048 public unowned string strrchr (string s, int c);
1049 [CCode (cheader_filename = "string.h")]
1050 public size_t strspn (string s1, string s2);
1051 [CCode (cheader_filename = "string.h")]
1052 public unowned string strstr (string s1, string s2);
1053 [CCode (cheader_filename = "string.h")]
1054 public unowned string strtok (string s1, string s2);
1055 [CCode (cheader_filename = "string.h")]
1056 public unowned string strtok_r (string s, string sep, out string lasts);
1057 [CCode (cheader_filename = "string.h")]
1058 public size_t strxfrm (string s1, string s2, size_t n);
1060 [CCode (cheader_filename = "stropts.h")]
1061 public const int I_PUSH;
1062 [CCode (cheader_filename = "stropts.h")]
1063 public const int I_POP;
1064 [CCode (cheader_filename = "stropts.h")]
1065 public const int I_LOOK;
1066 [CCode (cheader_filename = "stropts.h")]
1067 public const int I_FLUSH;
1068 [CCode (cheader_filename = "stropts.h")]
1069 public const int I_FLUSHBAND;
1070 [CCode (cheader_filename = "stropts.h")]
1071 public const int I_SETSIG;
1072 [CCode (cheader_filename = "stropts.h")]
1073 public const int I_GETSIG;
1074 [CCode (cheader_filename = "stropts.h")]
1075 public const int I_FIND;
1076 [CCode (cheader_filename = "stropts.h")]
1077 public const int I_PEEK;
1078 [CCode (cheader_filename = "stropts.h")]
1079 public const int I_SRDOPT;
1080 [CCode (cheader_filename = "stropts.h")]
1081 public const int I_GRDOPT;
1082 [CCode (cheader_filename = "stropts.h")]
1083 public const int I_NREAD;
1084 [CCode (cheader_filename = "stropts.h")]
1085 public const int I_FDINSERT;
1086 [CCode (cheader_filename = "stropts.h")]
1087 public const int I_STR;
1088 [CCode (cheader_filename = "stropts.h")]
1089 public const int I_SWROPT;
1090 [CCode (cheader_filename = "stropts.h")]
1091 public const int I_GWROPT;
1092 [CCode (cheader_filename = "stropts.h")]
1093 public const int I_SENDFD;
1094 [CCode (cheader_filename = "stropts.h")]
1095 public const int I_RECVFD;
1096 [CCode (cheader_filename = "stropts.h")]
1097 public const int I_LIST;
1098 [CCode (cheader_filename = "stropts.h")]
1099 public const int I_ATMARK;
1100 [CCode (cheader_filename = "stropts.h")]
1101 public const int I_CKBAND;
1102 [CCode (cheader_filename = "stropts.h")]
1103 public const int I_GETBAND;
1104 [CCode (cheader_filename = "stropts.h")]
1105 public const int I_CANPUT;
1106 [CCode (cheader_filename = "stropts.h")]
1107 public const int I_SETCLTIME;
1108 [CCode (cheader_filename = "stropts.h")]
1109 public const int I_GETCLTIME;
1110 [CCode (cheader_filename = "stropts.h")]
1111 public const int I_LINK;
1112 [CCode (cheader_filename = "stropts.h")]
1113 public const int I_UNLINK;
1114 [CCode (cheader_filename = "stropts.h")]
1115 public const int I_PLINK;
1116 [CCode (cheader_filename = "stropts.h")]
1117 public const int I_PUNLINK;
1118 [CCode (cheader_filename = "stropts.h")]
1119 public const int FLUSHR;
1120 [CCode (cheader_filename = "stropts.h")]
1121 public const int FLUSHW;
1122 [CCode (cheader_filename = "stropts.h")]
1123 public const int FLUSHRW;
1124 [CCode (cheader_filename = "stropts.h")]
1125 public const int S_RDNORM;
1126 [CCode (cheader_filename = "stropts.h")]
1127 public const int S_RDBAND;
1128 [CCode (cheader_filename = "stropts.h")]
1129 public const int S_INPUT;
1130 [CCode (cheader_filename = "stropts.h")]
1131 public const int S_HIPRI;
1132 [CCode (cheader_filename = "stropts.h")]
1133 public const int S_OUTPUT;
1134 [CCode (cheader_filename = "stropts.h")]
1135 public const int S_WRNORM;
1136 [CCode (cheader_filename = "stropts.h")]
1137 public const int S_WRBAND;
1138 [CCode (cheader_filename = "stropts.h")]
1139 public const int S_MSG;
1140 [CCode (cheader_filename = "stropts.h")]
1141 public const int S_ERROR;
1142 [CCode (cheader_filename = "stropts.h")]
1143 public const int S_HANGUP;
1144 [CCode (cheader_filename = "stropts.h")]
1145 public const int S_BANDURG;
1146 [CCode (cheader_filename = "stropts.h")]
1147 public const int RS_HIPRI;
1148 [CCode (cheader_filename = "stropts.h")]
1149 public const int RNORM;
1150 [CCode (cheader_filename = "stropts.h")]
1151 public const int RMSGD;
1152 [CCode (cheader_filename = "stropts.h")]
1153 public const int RMSGN;
1154 [CCode (cheader_filename = "stropts.h")]
1155 public const int RPROTNORN;
1156 [CCode (cheader_filename = "stropts.h")]
1157 public const int RPROTDAT;
1158 [CCode (cheader_filename = "stropts.h")]
1159 public const int RPROTDIS;
1160 [CCode (cheader_filename = "stropts.h")]
1161 public const int SNDZERO;
1162 [CCode (cheader_filename = "stropts.h")]
1163 public const int ANYMARK;
1164 [CCode (cheader_filename = "stropts.h")]
1165 public const int LASTMARK;
1166 [CCode (cheader_filename = "stropts.h")]
1167 public const int MUXID_ALL;
1168 [CCode (cheader_filename = "stropts.h")]
1169 public const int MSG_ANY;
1170 [CCode (cheader_filename = "stropts.h")]
1171 public const int MSG_BAND;
1172 [CCode (cheader_filename = "stropts.h")]
1173 public const int MSG_HIPRI;
1174 [CCode (cheader_filename = "stropts.h")]
1175 public const int MORECTL;
1176 [CCode (cheader_filename = "stropts.h")]
1177 public const int MOREDATA;
1178 [CCode (cheader_filename = "stropts.h", sentinel = "")]
1179 public int ioctl (int fildes, int request, ...);
1181 [CCode (cheader_filename = "syslog.h")]
1182 public void openlog (string ident, int option, int facility );
1184 [CCode (cheader_filename = "syslog.h")]
1185 public void syslog (int priority, string format, ... );
1187 [CCode (cheader_filename = "syslog.h")]
1188 public void closelog ();
1190 [CCode (cheader_filename = "syslog.h")]
1191 public const int LOG_PID;
1192 [CCode (cheader_filename = "syslog.h")]
1193 public const int LOG_CONS;
1194 [CCode (cheader_filename = "syslog.h")]
1195 public const int LOG_ODELAY;
1196 [CCode (cheader_filename = "syslog.h")]
1197 public const int LOG_NDELAY;
1198 [CCode (cheader_filename = "syslog.h")]
1199 public const int LOG_NOWAIT;
1200 [CCode (cheader_filename = "syslog.h")]
1201 public const int LOG_EMERG;
1202 [CCode (cheader_filename = "syslog.h")]
1203 public const int LOG_ALERT;
1204 [CCode (cheader_filename = "syslog.h")]
1205 public const int LOG_CRIT;
1206 [CCode (cheader_filename = "syslog.h")]
1207 public const int LOG_ERR;
1208 [CCode (cheader_filename = "syslog.h")]
1209 public const int LOG_WARNING;
1210 [CCode (cheader_filename = "syslog.h")]
1211 public const int LOG_NOTICE;
1212 [CCode (cheader_filename = "syslog.h")]
1213 public const int LOG_INFO;
1214 [CCode (cheader_filename = "syslog.h")]
1215 public const int LOG_DEBUG;
1216 [CCode (cheader_filename = "syslog.h")]
1217 public const int LOG_KERN;
1218 [CCode (cheader_filename = "syslog.h")]
1219 public const int LOG_USER;
1220 [CCode (cheader_filename = "syslog.h")]
1221 public const int LOG_MAIL;
1222 [CCode (cheader_filename = "syslog.h")]
1223 public const int LOG_DAEMON;
1224 [CCode (cheader_filename = "syslog.h")]
1225 public const int LOG_SYSLOG;
1226 [CCode (cheader_filename = "syslog.h")]
1227 public const int LOG_LPR;
1228 [CCode (cheader_filename = "syslog.h")]
1229 public const int LOG_NEWS;
1230 [CCode (cheader_filename = "syslog.h")]
1231 public const int LOG_UUCP;
1232 [CCode (cheader_filename = "syslog.h")]
1233 public const int LOG_CRON;
1234 [CCode (cheader_filename = "syslog.h")]
1235 public const int LOG_AUTHPRIV;
1236 [CCode (cheader_filename = "syslog.h")]
1237 public const int LOG_FTP;
1238 [CCode (cheader_filename = "syslog.h")]
1239 public const int LOG_LOCAL0;
1240 [CCode (cheader_filename = "syslog.h")]
1241 public const int LOG_LOCAL1;
1242 [CCode (cheader_filename = "syslog.h")]
1243 public const int LOG_LOCAL2;
1244 [CCode (cheader_filename = "syslog.h")]
1245 public const int LOG_LOCAL3;
1246 [CCode (cheader_filename = "syslog.h")]
1247 public const int LOG_LOCAL4;
1248 [CCode (cheader_filename = "syslog.h")]
1249 public const int LOG_LOCAL5;
1250 [CCode (cheader_filename = "syslog.h")]
1251 public const int LOG_LOCAL6;
1252 [CCode (cheader_filename = "syslog.h")]
1253 public const int LOG_LOCAL7;
1255 [CCode (cheader_filename = "sys/socket.h")]
1256 public const int SOCK_DGRAM;
1257 [CCode (cheader_filename = "sys/socket.h")]
1258 public const int SOCK_RAW;
1259 [CCode (cheader_filename = "sys/socket.h")]
1260 public const int SOCK_SEQPACKET;
1261 [CCode (cheader_filename = "sys/socket.h")]
1262 public const int SOCK_STREAM;
1263 [CCode (cheader_filename = "sys/socket.h")]
1264 public const int AF_INET;
1265 [CCode (cheader_filename = "sys/socket.h")]
1266 public const int AF_INET6;
1267 [CCode (cheader_filename = "sys/socket.h")]
1268 public const int AF_UNIX;
1270 [CCode (cheader_filename = "sys/socket.h")]
1271 public const int SHUT_RD;
1272 [CCode (cheader_filename = "sys/socket.h")]
1273 public const int SHUT_WR;
1274 [CCode (cheader_filename = "sys/socket.h")]
1275 public const int SHUT_RDWR;
1277 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1278 public int accept (int sfd, ... );
1279 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1280 public int bind (int sockfd, ...);
1281 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1282 public int connect(int sfd, ... );
1283 [CCode (cheader_filename = "sys/socket.h")]
1284 public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
1285 [CCode (cheader_filename = "sys/socket.h")]
1286 public int listen (int sfd, int backlog);
1287 [CCode (cheader_filename = "sys/socket.h")]
1288 public ssize_t send (int sockfd, void* buf, size_t len, int flags);
1289 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1290 public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
1291 [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
1292 public ssize_t sendmsg (int sockfd, ...);
1293 [CCode (cheader_filename = "sys/socket.h")]
1294 public int setsockopt (int sockfd, int level, int optname, void* optval, socklen_t optlen);
1295 [CCode (cheader_filename = "sys/socket.h")]
1296 public int shutdown (int sockfd, int how);
1297 [CCode (cheader_filename = "sys/socket.h")]
1298 public int socket (int domain, int type, int protocol);
1299 [CCode (cheader_filename = "sys/socket.h")]
1300 public int socketpair (int domain, int type, int protocol, int[] sv);
1304 [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0")]
1305 public struct socklen_t {
1309 [CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h", destroy_function = "")]
1310 public struct InAddr {
1311 public uint32 s_addr;
1314 [CCode (cname = "struct sockaddr", cheader_filename = "sys/socket.h", destroy_function = "")]
1315 public struct SockAddr {
1318 [CCode (cname = "struct sockaddr_in", cheader_filename = "netinet/in.h", destroy_function = "")]
1319 public struct SockAddrIn {
1320 public int sin_family;
1321 public uint16 sin_port;
1322 public InAddr sin_addr;
1325 [CCode (cheader_filename = "sys/stat.h")]
1326 public int mkfifo (string filename, mode_t mode);
1328 [CCode (cheader_filename = "sys/stat.h")]
1329 public const mode_t S_IFMT;
1330 [CCode (cheader_filename = "sys/stat.h")]
1331 public const mode_t S_IFBLK;
1332 [CCode (cheader_filename = "sys/stat.h")]
1333 public const mode_t S_IFCHR;
1334 [CCode (cheader_filename = "sys/stat.h")]
1335 public const mode_t S_IFIFO;
1336 [CCode (cheader_filename = "sys/stat.h")]
1337 public const mode_t S_IFREG;
1338 [CCode (cheader_filename = "sys/stat.h")]
1339 public const mode_t S_IFDIR;
1340 [CCode (cheader_filename = "sys/stat.h")]
1341 public const mode_t S_IFLNK;
1342 [CCode (cheader_filename = "sys/stat.h")]
1343 public const mode_t S_IFSOCK;
1345 [CCode (cheader_filename = "sys/stat.h")]
1346 public const mode_t S_IRWXU;
1347 [CCode (cheader_filename = "sys/stat.h")]
1348 public const mode_t S_IRUSR;
1349 [CCode (cheader_filename = "sys/stat.h")]
1350 public const mode_t S_IWUSR;
1351 [CCode (cheader_filename = "sys/stat.h")]
1352 public const mode_t S_IXUSR;
1353 [CCode (cheader_filename = "sys/stat.h")]
1354 public const mode_t S_IRWXG;
1355 [CCode (cheader_filename = "sys/stat.h")]
1356 public const mode_t S_IRGRP;
1357 [CCode (cheader_filename = "sys/stat.h")]
1358 public const mode_t S_IWGRP;
1359 [CCode (cheader_filename = "sys/stat.h")]
1360 public const mode_t S_IXGRP;
1361 [CCode (cheader_filename = "sys/stat.h")]
1362 public const mode_t S_IRWXO;
1363 [CCode (cheader_filename = "sys/stat.h")]
1364 public const mode_t S_IROTH;
1365 [CCode (cheader_filename = "sys/stat.h")]
1366 public const mode_t S_IWOTH;
1367 [CCode (cheader_filename = "sys/stat.h")]
1368 public const mode_t S_IXOTH;
1369 [CCode (cheader_filename = "sys/stat.h")]
1370 public const mode_t S_ISUID;
1371 [CCode (cheader_filename = "sys/stat.h")]
1372 public const mode_t S_ISGID;
1373 [CCode (cheader_filename = "sys/stat.h")]
1374 public const mode_t S_ISVTX;
1376 [CCode (cheader_filename = "sys/stat.h")]
1377 public bool S_ISBLK (mode_t mode);
1378 [CCode (cheader_filename = "sys/stat.h")]
1379 public bool S_ISCHR (mode_t mode);
1380 [CCode (cheader_filename = "sys/stat.h")]
1381 public bool S_ISDIR (mode_t mode);
1382 [CCode (cheader_filename = "sys/stat.h")]
1383 public bool S_ISFIFO (mode_t mode);
1384 [CCode (cheader_filename = "sys/stat.h")]
1385 public bool S_ISREG (mode_t mode);
1386 [CCode (cheader_filename = "sys/stat.h")]
1387 public bool S_ISLNK (mode_t mode);
1388 [CCode (cheader_filename = "sys/stat.h")]
1389 public bool S_ISSOCK (mode_t mode);
1391 [CCode (cheader_filename = "sys/stat.h", cname = "struct stat")]
1392 public struct Stat {
1393 public dev_t st_dev;
1394 public ino_t st_ino;
1395 public mode_t st_mode;
1396 public nlink_t st_nlink;
1397 public uid_t st_uid;
1398 public gid_t st_gid;
1399 public dev_t st_rdev;
1400 public size_t st_size;
1401 public time_t st_atime;
1402 public time_t st_mtime;
1403 public time_t st_ctime;
1404 public blksize_t st_blksize;
1405 public blkcnt_t st_blocks;
1407 [CCode (cheader_filename = "sys/stat.h")]
1408 int fstat( int fd, out Stat buf);
1409 [CCode (cheader_filename = "sys/stat.h")]
1410 int stat (string filename, out Stat buf);
1411 [CCode (cheader_filename = "sys/stat.h")]
1412 int lstat (string filename, out Stat buf);
1414 [CCode (cheader_filename = "sys/stat.h")]
1415 public int chmod (string filename, mode_t mode);
1416 [CCode (cheader_filename = "sys/stat.h")]
1417 public mode_t umask (mode_t mask);
1418 [CCode (cheader_filename = "sys/stat.h")]
1419 public int mkdir (string path, mode_t mode);
1420 [CCode (cheader_filename = "sys/types.h,sys/stat.h,fcntl.h,unistd.h")]
1421 public pid_t mknod (string pathname, mode_t mode, dev_t dev);
1423 [CCode (cheader_filename = "sys/wait.h")]
1424 public pid_t wait (out int status);
1425 [CCode (cheader_filename = "sys/wait.h")]
1426 public pid_t waitpid (pid_t pid, out int status, int options);
1427 [CCode (cheader_filename = "sys/wait.h")]
1428 public const int WNOHANG;
1429 [CCode (cheader_filename = "sys/wait.h")]
1430 public const int WUNTRACED;
1431 [CCode (cheader_filename = "sys/wait.h")]
1432 public const int WCONTINUED;
1435 [IntegerType (rank = 9)]
1436 [CCode (cheader_filename = "sys/types.h", cname = "key_t")]
1437 public struct key_t {
1441 [IntegerType (rank = 9)]
1442 [CCode (cheader_filename = "sys/statvfs.h")]
1443 public struct fsblkcnt_t {
1447 [IntegerType (rank = 9)]
1448 [CCode (cheader_filename = "sys/statvfs.h")]
1449 public struct fsfilcnt_t {
1452 [CCode (cheader_filename = "sys/statvfs.h", cname = "struct statvfs")]
1453 public struct statvfs {
1454 public ulong f_bsize;
1455 public ulong f_frsize;
1456 public fsblkcnt_t f_blocks;
1457 public fsblkcnt_t f_bfree;
1458 public fsblkcnt_t f_bavail;
1459 public fsfilcnt_t f_files;
1460 public fsfilcnt_t f_ffree;
1461 public fsfilcnt_t f_favail;
1465 [IntegerType (rank = 9)]
1466 [CCode (cname="off_t", cheader_filename = "sys/types.h")]
1467 public struct off_t {
1471 [IntegerType (rank = 9)]
1472 [CCode (cheader_filename = "sys/types.h")]
1473 public struct uid_t {
1477 [IntegerType (rank = 9)]
1478 [CCode (cheader_filename = "sys/types.h")]
1479 public struct gid_t {
1483 [IntegerType (rank = 9)]
1484 [CCode (cname = "mode_t", cheader_filename = "sys/types.h")]
1485 public struct mode_t {
1489 [IntegerType (rank = 9)]
1490 [CCode (cheader_filename = "sys/types.h")]
1491 public struct dev_t {
1495 [IntegerType (rank = 9)]
1496 [CCode (cheader_filename = "sys/types.h")]
1497 public struct ino_t {
1501 [IntegerType (rank = 9)]
1502 [CCode (cheader_filename = "sys/types.h")]
1503 public struct nlink_t {
1507 [IntegerType (rank = 9)]
1508 [CCode (cheader_filename = "sys/types.h")]
1509 public struct blksize_t {
1513 [IntegerType (rank = 9)]
1514 [CCode (cheader_filename = "sys/types.h")]
1515 public struct blkcnt_t {
1518 [CCode (cheader_filename = "time.h")]
1528 public int tm_isdst;
1531 [CCode (cname = "struct timespec", cheader_filename = "time.h")]
1532 public struct timespec {
1533 public time_t tv_sec;
1534 public long tv_nsec;
1537 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1538 public int getpriority (int which, int who);
1539 [CCode (cheader_filename = "sys/time.h,sys/resource.h")]
1540 public int setpriority (int which, int who, int prio);
1542 [CCode (cname = "struct iovec", cheader_filename = "sys/uio.h")]
1543 public struct iovector {
1544 public void* iov_base;
1545 public size_t iov_len;
1548 [CCode (cheader_filename = "unistd.h")]
1549 public int close (int fd);
1550 [CCode (cheader_filename = "unistd.h")]
1551 public int execl (string path, params string[] arg);
1552 [CCode (cheader_filename = "unistd.h")]
1553 public int execlp (string path, params string[] arg);
1554 [CCode (cheader_filename = "unistd.h")]
1555 public int pipe ([CCode (array_length = false, null_terminated = false)] int[] pipefd);
1556 [CCode (cheader_filename = "unistd.h")]
1557 public ssize_t read (int fd, void* buf, size_t count);
1558 [CCode (cheader_filename = "unistd.h")]
1559 public ssize_t pread (int fd, void* buf, size_t count, off_t offset);
1560 [CCode (cheader_filename = "unistd.h")]
1561 public ssize_t readlink (string path, char[] buf);
1562 [CCode (cheader_filename = "sys/uio.h")]
1563 public ssize_t readv (int fd, iovector vector, int iovcnt);
1564 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1565 public int setgid (gid_t gid);
1566 [CCode (cheader_filename = "unistd.h,sys/types.h")]
1567 public int setuid (uid_t uid);
1568 [CCode (cheader_filename = "unistd.h")]
1569 public int unlink (string filename);
1570 [CCode (cheader_filename = "unistd.h")]
1571 public ssize_t write (int fd, void* buf, size_t count);
1572 [CCode (cheader_filename = "unistd.h")]
1573 public ssize_t pwrite (int fd, void* buf, size_t count, off_t offset);
1574 [CCode (cheader_filename = "sys/uio.h")]
1575 public ssize_t writev (int fd, iovector vector, int iovcnt);
1576 [CCode (cheader_filename = "unistd.h")]
1577 public off_t lseek(int fildes, off_t offset, int whence);
1579 [CCode (cheader_filename = "unistd.h")]
1580 public const int SEEK_SET;
1581 [CCode (cheader_filename = "unistd.h")]
1582 public const int SEEK_CUR;
1583 [CCode (cheader_filename = "unistd.h")]
1584 public const int SEEK_END;
1586 [CCode (cheader_filename = "unistd.h")]
1587 public pid_t fork ();
1588 [CCode (cheader_filename = "unistd.h")]
1589 public pid_t vfork ();
1590 [CCode (cheader_filename = "unistd.h")]
1591 public unowned string ttyname (int fd);
1592 [CCode (cheader_filename = "unistd.h")]
1593 public int ttyname_r (int fd, char[] buf);
1594 [CCode (cheader_filename = "unistd.h")]
1595 public bool isatty (int fd);
1596 [CCode (cheader_filename = "unistd.h")]
1597 public int link (string from, string to);
1598 [CCode (cheader_filename = "unistd.h")]
1599 public int symlink (string from, string to);
1600 [CCode (cheader_filename = "unistd.h")]
1601 public long sysconf (int name);
1602 [CCode (cheader_filename = "unistd.h")]
1603 public int rmdir (string path);
1604 [CCode (cheader_filename = "unistd.h")]
1605 public pid_t tcgetpgrp (int fd);
1606 [CCode (cheader_filename = "unistd.h")]
1607 public int tcsetpgrp (int fd, pid_t pgrp_id);
1608 [CCode (cheader_filename = "unistd.h")]
1609 public unowned string getlogin ();
1610 [CCode (cheader_filename = "unistd.h")]
1611 public int vhangup ();
1612 [CCode (cheader_filename = "unistd.h")]
1613 public int revoke (string file);
1614 [CCode (cheader_filename = "unistd.h")]
1615 public int acct (string name);
1616 [CCode (cheader_filename = "unistd.h")]
1617 public unowned string getusershell ();
1618 [CCode (cheader_filename = "unistd.h")]
1619 public void endusershell ();
1620 [CCode (cheader_filename = "unistd.h")]
1621 public void setusershell ();
1622 [CCode (cheader_filename = "unistd.h")]
1623 public int chroot (string path);
1624 [CCode (cheader_filename = "unistd.h")]
1625 public unowned string getpass (string promt);
1626 [CCode (cheader_filename = "unistd.h")]
1627 public int getpagesize ();
1628 [CCode (cheader_filename = "unistd.h")]
1629 public int getdtablesize ();
1631 [CCode (cheader_filename = "unistd.h")]
1632 public const int _SC_ARG_MAX;
1633 [CCode (cheader_filename = "unistd.h")]
1634 public const int _SC_CHILD_MAX;
1635 [CCode (cheader_filename = "unistd.h")]
1636 public const int _SC_HOST_NAME_MAX;
1637 [CCode (cheader_filename = "unistd.h")]
1638 public const int _SC_LOGIN_NAME_MAX;
1639 [CCode (cheader_filename = "unistd.h")]
1640 public const int _SC_CLK_TCK;
1641 [CCode (cheader_filename = "unistd.h")]
1642 public const int _SC_OPEN_MAX;
1643 [CCode (cheader_filename = "unistd.h")]
1644 public const int _SC_PAGESIZE;
1645 [CCode (cheader_filename = "unistd.h")]
1646 public const int _SC_RE_DUP_MAX;
1647 [CCode (cheader_filename = "unistd.h")]
1648 public const int _SC_STREAM_MAX;
1649 [CCode (cheader_filename = "unistd.h")]
1650 public const int _SC_SYMLOOP_MAX;
1651 [CCode (cheader_filename = "unistd.h")]
1652 public const int _SC_TTY_NAME_MAX;
1653 [CCode (cheader_filename = "unistd.h")]
1654 public const int _SC_TZNAME_MAX;
1655 [CCode (cheader_filename = "unistd.h")]
1656 public const int _SC_VERSION;
1657 [CCode (cheader_filename = "unistd.h")]
1658 public const int _SC_BASE_MAX;
1659 [CCode (cheader_filename = "unistd.h")]
1660 public const int _SC_BC_DIM_MAX;
1661 [CCode (cheader_filename = "unistd.h")]
1662 public const int _SC_BC_SCALE_MAX;
1663 [CCode (cheader_filename = "unistd.h")]
1664 public const int _SC_BC_STRING_MAX;
1665 [CCode (cheader_filename = "unistd.h")]
1666 public const int _SC_COLL_WEIGHTS_MAX;
1667 [CCode (cheader_filename = "unistd.h")]
1668 public const int _SC_EXRP_NEST_MAX;
1669 [CCode (cheader_filename = "unistd.h")]
1670 public const int _SC_LINE_MAX;
1671 [CCode (cheader_filename = "unistd.h")]
1672 public const int _SC_2_VERSION;
1673 [CCode (cheader_filename = "unistd.h")]
1674 public const int _SC_2_C_DEV;
1675 [CCode (cheader_filename = "unistd.h")]
1676 public const int _SC_2_FORT_DEV;
1677 [CCode (cheader_filename = "unistd.h")]
1678 public const int _SC_2_FORT_RUN;
1679 [CCode (cheader_filename = "unistd.h")]
1680 public const int _SC_2_LOCALEDEF;
1681 [CCode (cheader_filename = "unistd.h")]
1682 public const int _SC_2_SW_DEV;
1684 [CCode (cheader_filename = "unistd.h")]
1685 public const int STDIN_FILENO;
1686 [CCode (cheader_filename = "unistd.h")]
1687 public const int STDOUT_FILENO;
1688 [CCode (cheader_filename = "unistd.h")]
1689 public const int STDERR_FILENO;
1690 [CCode (cheader_filename = "unistd.h")]
1691 public const int R_OK;
1692 [CCode (cheader_filename = "unistd.h")]
1693 public const int W_OK;
1694 [CCode (cheader_filename = "unistd.h")]
1695 public const int X_OK;
1696 [CCode (cheader_filename = "unistd.h")]
1697 public const int F_OK;
1699 [CCode (cheader_filename = "unistd.h")]
1700 public int access (string patchname, int mode);
1701 [CCode (cheader_filename = "unistd.h")]
1702 public int euidaccess (string patchname, int mode);
1703 [CCode (cheader_filename = "unistd.h")]
1704 public int eaccess (string patchname, int mode);
1706 [CCode (cheader_filename = "unistd.h")]
1707 public uint alarm (uint seconds);
1708 [CCode (cheader_filename = "unistd.h")]
1709 public uint ualarm (uint useconds);
1710 [CCode (cheader_filename = "unistd.h")]
1711 public uint sleep (uint seconds);
1712 [CCode (cheader_filename = "unistd.h")]
1713 public uint usleep (uint useconds);
1714 [CCode (cheader_filename = "unistd.h")]
1715 public int pause ();
1716 [CCode (cheader_filename = "unistd.h")]
1717 public int chown (string filename, uid_t owner, gid_t group);
1718 [CCode (cheader_filename = "unistd.h")]
1719 public int fchown (int fd, uid_t owner, gid_t group);
1720 [CCode (cheader_filename = "unistd.h")]
1721 public int lchown (string filename, uid_t owner, gid_t group);
1722 [CCode (cheader_filename = "unistd.h")]
1723 public int chdir (string filepath);
1724 [CCode (cheader_filename = "unistd.h")]
1725 public int fchdir (int file);
1726 [CCode (cheader_filename = "unistd.h")]
1727 public int dup (int fd);
1728 [CCode (cheader_filename = "unistd.h")]
1729 public int dup2 (int fd1, int fd2);
1730 [CCode (cheader_filename = "unistd.h")]
1731 public int gethostname (char[] name);
1732 [CCode (cheader_filename = "unistd.h")]
1733 public pid_t getpid ();
1734 [CCode (cheader_filename = "unistd.h")]
1735 public pid_t getppid ();
1736 [CCode (cheader_filename = "unistd.h")]
1737 public pid_t getpgrp ();
1738 [CCode (cheader_filename = "unistd.h")]
1739 public pid_t getpgid (pid_t pid);
1740 [CCode (cheader_filename = "unistd.h")]
1741 public int setpgid (pid_t pid, pid_t pgid);
1742 [CCode (cheader_filename = "unistd.h")]
1743 public pid_t setpgrp ();
1744 [CCode (cheader_filename = "unistd.h")]
1745 public pid_t getsid (pid_t pid);
1746 [CCode (cheader_filename = "unistd.h")]
1747 public uid_t getuid ();
1748 [CCode (cheader_filename = "unistd.h")]
1749 public uid_t geteuid ();
1750 [CCode (cheader_filename = "unistd.h")]
1751 public gid_t getgid ();
1752 [CCode (cheader_filename = "unistd.h")]
1753 public gid_t getegid ();
1754 [CCode (cheader_filename = "unistd.h")]
1755 public int group_member (gid_t gid);
1756 [CCode (cheader_filename = "unistd.h")]
1757 public pid_t setsid ();
1758 [CCode (cheader_filename = "unistd.h")]
1759 public pid_t tcgetsid (int fd);
1761 [CCode (cheader_filename = "unistd.h")]
1762 public int fsync (int fd);
1763 [CCode (cheader_filename = "unistd.h")]
1764 public int fdatasync (int fd);
1765 [CCode (cheader_filename = "unistd.h")]
1768 [CCode (cheader_filename = "unistd.h")]
1769 public int ftruncate(int fd, off_t length);
1770 [CCode (cheader_filename = "unistd.h")]
1771 public int truncate(string path, off_t length);
1772 [CCode (cheader_filename = "unistd.h")]
1773 public int nice (int inc);
1776 [CCode (cname = "cc_t", cheader_filename = "termios.h")]
1777 [IntegerType (rank = 3, min = 0, max = 255)]
1778 public struct cc_t {
1782 [CCode (cname = "speed_t", cheader_filename = "termios.h")]
1783 [IntegerType (rank = 7)]
1784 public struct speed_t {
1788 [CCode (cname = "tcflag_t", cheader_filename = "termios.h")]
1789 [IntegerType (rank = 7)]
1790 public struct tcflag_t {
1793 [CCode (cname="struct termios", cheader_filename = "termios.h")]
1794 public struct termios
1796 public tcflag_t c_iflag;
1797 public tcflag_t c_oflag;
1798 public tcflag_t c_cflag;
1799 public tcflag_t c_lflag;
1801 public unowned cc_t[] c_cc;
1802 public speed_t c_ispeed;
1803 public speed_t c_ospeed;
1806 [CCode (cheader_filename = "termios.h")]
1807 public int tcgetattr (int fd, termios termios_p);
1808 [CCode (cheader_filename = "termios.h")]
1809 public int tcsetattr (int fd, int optional_actions, termios termios_p);
1810 [CCode (cheader_filename = "termios.h")]
1811 public int tcsendbreak (int fd, int duration);
1812 [CCode (cheader_filename = "termios.h")]
1813 public int tcdrain (int fd);
1814 [CCode (cheader_filename = "termios.h")]
1815 public int tcflush (int fd, int queue_selector);
1816 [CCode (cheader_filename = "termios.h")]
1817 public int tcflow (int fd, int action);
1818 [CCode (cheader_filename = "termios.h")]
1819 public void cfmakeraw (termios termios_p);
1820 [CCode (cheader_filename = "termios.h")]
1821 public speed_t cfgetispeed (termios termios_p);
1822 [CCode (cheader_filename = "termios.h")]
1823 public speed_t cfgetospeed (termios termios_p);
1824 [CCode (cheader_filename = "termios.h")]
1825 public int cfsetispeed (termios termios_p, speed_t speed);
1826 [CCode (cheader_filename = "termios.h")]
1827 public int cfsetospeed (termios termios_p, speed_t speed);
1828 [CCode (cheader_filename = "termios.h")]
1829 public int cfsetspeed (termios termios, speed_t speed);
1832 [CCode (cheader_filename = "termios.h")]
1833 public const tcflag_t IGNBRK;
1834 [CCode (cheader_filename = "termios.h")]
1835 public const tcflag_t BRKINT;
1836 [CCode (cheader_filename = "termios.h")]
1837 public const tcflag_t IGNPAR;
1838 [CCode (cheader_filename = "termios.h")]
1839 public const tcflag_t PARMRK;
1840 [CCode (cheader_filename = "termios.h")]
1841 public const tcflag_t INPCK;
1842 [CCode (cheader_filename = "termios.h")]
1843 public const tcflag_t ISTRIP;
1844 [CCode (cheader_filename = "termios.h")]
1845 public const tcflag_t INLCR;
1846 [CCode (cheader_filename = "termios.h")]
1847 public const tcflag_t IGNCR;
1848 [CCode (cheader_filename = "termios.h")]
1849 public const tcflag_t IXON;
1850 [CCode (cheader_filename = "termios.h")]
1851 public const tcflag_t IXANY;
1852 [CCode (cheader_filename = "termios.h")]
1853 public const tcflag_t IXOFF;
1854 [CCode (cheader_filename = "termios.h")]
1855 public const tcflag_t ICRNL;
1858 [CCode (cheader_filename = "termios.h")]
1859 public const tcflag_t OPOST;
1860 [CCode (cheader_filename = "termios.h")]
1861 public const tcflag_t ONLCR;
1862 [CCode (cheader_filename = "termios.h")]
1863 public const tcflag_t OCRNL;
1864 [CCode (cheader_filename = "termios.h")]
1865 public const tcflag_t ONOCR;
1866 [CCode (cheader_filename = "termios.h")]
1867 public const tcflag_t ONLRET;
1868 [CCode (cheader_filename = "termios.h")]
1869 public const tcflag_t OFILL;
1870 [CCode (cheader_filename = "termios.h")]
1871 public const tcflag_t NLDLY;
1872 [CCode (cheader_filename = "termios.h")]
1873 public const tcflag_t NL0;
1874 [CCode (cheader_filename = "termios.h")]
1875 public const tcflag_t NL1;
1876 [CCode (cheader_filename = "termios.h")]
1877 public const tcflag_t CRDLY;
1878 [CCode (cheader_filename = "termios.h")]
1879 public const tcflag_t CR0;
1880 [CCode (cheader_filename = "termios.h")]
1881 public const tcflag_t CR1;
1882 [CCode (cheader_filename = "termios.h")]
1883 public const tcflag_t CR2;
1884 [CCode (cheader_filename = "termios.h")]
1885 public const tcflag_t CR3;
1886 [CCode (cheader_filename = "termios.h")]
1887 public const tcflag_t TABDLY;
1888 [CCode (cheader_filename = "termios.h")]
1889 public const tcflag_t TAB0;
1890 [CCode (cheader_filename = "termios.h")]
1891 public const tcflag_t TAB1;
1892 [CCode (cheader_filename = "termios.h")]
1893 public const tcflag_t TAB2;
1894 [CCode (cheader_filename = "termios.h")]
1895 public const tcflag_t TAB3;
1896 [CCode (cheader_filename = "termios.h")]
1897 public const tcflag_t BSDLY;
1898 [CCode (cheader_filename = "termios.h")]
1899 public const tcflag_t BS0;
1900 [CCode (cheader_filename = "termios.h")]
1901 public const tcflag_t BS1;
1902 [CCode (cheader_filename = "termios.h")]
1903 public const tcflag_t VTDLY;
1904 [CCode (cheader_filename = "termios.h")]
1905 public const tcflag_t VT0;
1906 [CCode (cheader_filename = "termios.h")]
1907 public const tcflag_t VT1;
1908 [CCode (cheader_filename = "termios.h")]
1909 public const tcflag_t FFDLY;
1910 [CCode (cheader_filename = "termios.h")]
1911 public const tcflag_t FF0;
1912 [CCode (cheader_filename = "termios.h")]
1913 public const tcflag_t FF1;
1916 [CCode (cheader_filename = "termios.h")]
1917 public const tcflag_t CSIZE;
1918 [CCode (cheader_filename = "termios.h")]
1919 public const tcflag_t CS5;
1920 [CCode (cheader_filename = "termios.h")]
1921 public const tcflag_t CS6;
1922 [CCode (cheader_filename = "termios.h")]
1923 public const tcflag_t CS7;
1924 [CCode (cheader_filename = "termios.h")]
1925 public const tcflag_t CS8;
1926 [CCode (cheader_filename = "termios.h")]
1927 public const tcflag_t CSTOPB;
1928 [CCode (cheader_filename = "termios.h")]
1929 public const tcflag_t CREAD;
1930 [CCode (cheader_filename = "termios.h")]
1931 public const tcflag_t PARENB;
1932 [CCode (cheader_filename = "termios.h")]
1933 public const tcflag_t PARODD;
1934 [CCode (cheader_filename = "termios.h")]
1935 public const tcflag_t HUPCL;
1936 [CCode (cheader_filename = "termios.h")]
1937 public const tcflag_t CLOCAL;
1940 [CCode (cheader_filename = "termios.h")]
1941 public const tcflag_t ISIG;
1942 [CCode (cheader_filename = "termios.h")]
1943 public const tcflag_t ICANON;
1944 [CCode (cheader_filename = "termios.h")]
1945 public const tcflag_t ECHO;
1946 [CCode (cheader_filename = "termios.h")]
1947 public const tcflag_t ECHOE;
1948 [CCode (cheader_filename = "termios.h")]
1949 public const tcflag_t ECHOK;
1950 [CCode (cheader_filename = "termios.h")]
1951 public const tcflag_t ECHONL;
1952 [CCode (cheader_filename = "termios.h")]
1953 public const tcflag_t NOFLSH;
1954 [CCode (cheader_filename = "termios.h")]
1955 public const tcflag_t TOSTOP;
1956 [CCode (cheader_filename = "termios.h")]
1957 public const tcflag_t IEXTEN;
1960 [CCode (cheader_filename = "termios.h")]
1961 public const int VINTR;
1962 [CCode (cheader_filename = "termios.h")]
1963 public const int VQUIT;
1964 [CCode (cheader_filename = "termios.h")]
1965 public const int VERASE;
1966 [CCode (cheader_filename = "termios.h")]
1967 public const int VKILL;
1968 [CCode (cheader_filename = "termios.h")]
1969 public const int VEOF;
1970 [CCode (cheader_filename = "termios.h")]
1971 public const int VMIN;
1972 [CCode (cheader_filename = "termios.h")]
1973 public const int VEOL;
1974 [CCode (cheader_filename = "termios.h")]
1975 public const int VTIME;
1976 [CCode (cheader_filename = "termios.h")]
1977 public const int VSTART;
1978 [CCode (cheader_filename = "termios.h")]
1979 public const int VSTOP;
1980 [CCode (cheader_filename = "termios.h")]
1981 public const int VSUSP;
1984 [CCode (cheader_filename = "termios.h")]
1985 public const int TCSANOW;
1986 [CCode (cheader_filename = "termios.h")]
1987 public const int TCSADRAIN;
1988 [CCode (cheader_filename = "termios.h")]
1989 public const int TCSAFLUSH;
1992 [CCode (cheader_filename = "termios.h")]
1993 public const int TCIFLUSH;
1994 [CCode (cheader_filename = "termios.h")]
1995 public const int TCOFLUSH;
1996 [CCode (cheader_filename = "termios.h")]
1997 public const int TCIOFLUSH;
2000 [CCode (cheader_filename = "termios.h")]
2001 public const int TCOOFF;
2002 [CCode (cheader_filename = "termios.h")]
2003 public const int TCOON;
2004 [CCode (cheader_filename = "termios.h")]
2005 public const int TCIOFF;
2006 [CCode (cheader_filename = "termios.h")]
2007 public const int TCION;
2010 [CCode (cheader_filename = "termios.h")]
2011 public const speed_t B0;
2012 [CCode (cheader_filename = "termios.h")]
2013 public const speed_t B50;
2014 [CCode (cheader_filename = "termios.h")]
2015 public const speed_t B75;
2016 [CCode (cheader_filename = "termios.h")]
2017 public const speed_t B110;
2018 [CCode (cheader_filename = "termios.h")]
2019 public const speed_t B134;
2020 [CCode (cheader_filename = "termios.h")]
2021 public const speed_t B150;
2022 [CCode (cheader_filename = "termios.h")]
2023 public const speed_t B200;
2024 [CCode (cheader_filename = "termios.h")]
2025 public const speed_t B300;
2026 [CCode (cheader_filename = "termios.h")]
2027 public const speed_t B600;
2028 [CCode (cheader_filename = "termios.h")]
2029 public const speed_t B1200;
2030 [CCode (cheader_filename = "termios.h")]
2031 public const speed_t B1800;
2032 [CCode (cheader_filename = "termios.h")]
2033 public const speed_t B2400;
2034 [CCode (cheader_filename = "termios.h")]
2035 public const speed_t B4800;
2036 [CCode (cheader_filename = "termios.h")]
2037 public const speed_t B9600;
2038 [CCode (cheader_filename = "termios.h")]
2039 public const speed_t B19200;
2040 [CCode (cheader_filename = "termios.h")]
2041 public const speed_t B38400;
2042 [CCode (cheader_filename = "termios.h")]
2043 public const speed_t B57600;
2044 [CCode (cheader_filename = "termios.h")]
2045 public const speed_t B115200;
2046 [CCode (cheader_filename = "termios.h")]
2047 public const speed_t B230400;
2049 [CCode (cname = "fd_set", cheader_filename = "sys/select.h")]
2050 public struct fd_set {
2053 [CCode (cname = "struct timeval", cheader_filename = "sys/time.h")]
2054 public struct timeval {
2055 public time_t tv_sec;
2056 public long tv_usec;
2057 [CCode (cname = "gettimeofday")]
2058 public int get_time_of_day (void * timezone = null);
2059 [CCode (cname = "settimeofday")]
2060 public int set_time_of_day (void * timezone = null);
2063 [CCode (cname = "sigset_t", cheader_filename = "sys/select.h")]
2064 public struct sigset_t {
2067 [CCode (cheader_filename = "sys/select.h")]
2068 public int select (int nfds, fd_set? readfds, fd_set? writefds, fd_set? exceptfds, timeval timeout);
2069 [CCode (cheader_filename = "sys/select.h")]
2070 public void FD_CLR (int fd, fd_set @set);
2071 [CCode (cheader_filename = "sys/select.h")]
2072 public int FD_ISSET (int fd, fd_set @set);
2073 [CCode (cheader_filename = "sys/select.h")]
2074 public void FD_SET (int fd, fd_set @set);
2075 [CCode (cheader_filename = "sys/select.h")]
2076 public void FD_ZERO (fd_set @set);
2077 [CCode (cheader_filename = "sys/select.h")]
2078 public int pselect (int nfds, fd_set? readfds, fd_set? writefds, fd_set? exceptfds, timespec timeout, sigset_t sigmask);
2080 // sys/mman.h - Posix mmap(), munmap(), mprotect()
2081 [CCode (cheader_filename = "sys/mman.h")]
2082 public void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2083 [CCode (cheader_filename = "sys/mman.h")]
2084 public int munmap(void *addr, size_t length);
2085 [CCode (cheader_filename = "sys/mman.h")]
2086 public int mprotect(void *addr, size_t len, int prot);
2087 [CCode (cheader_filename = "sys/mman.h")]
2088 public const int PROT_READ;
2089 [CCode (cheader_filename = "sys/mman.h")]
2090 public const int PROT_WRITE;
2091 [CCode (cheader_filename = "sys/mman.h")]
2092 public const int PROT_EXEC;
2093 [CCode (cheader_filename = "sys/mman.h")]
2094 public const int MAP_SHARED;
2095 [CCode (cheader_filename = "sys/mman.h")]
2096 public const int MAP_PRIVATE;
2097 [CCode (cheader_filename = "sys/mman.h")]
2098 public const int MAP_FIXED;
2099 [CCode (cheader_filename = "sys/mman.h")]
2100 public void *MAP_FAILED;
2101 // sys/mman.h - [MLR] Range Memory Locking
2102 [CCode (cheader_filename = "sys/mman.h")]
2103 public int mlock(void *addr, size_t len);
2104 [CCode (cheader_filename = "sys/mman.h")]
2105 public int munlock(void *addr, size_t len);
2106 // sys/mman.h - [XSI] X/Open System Interfaces
2107 [CCode (cheader_filename = "sys/mman.h")]
2108 public int msync(void *addr, size_t len, int flags);
2109 [CCode (cheader_filename = "sys/mman.h")]
2110 public const int MS_ASYNC;
2111 [CCode (cheader_filename = "sys/mman.h")]
2112 public const int MS_INVALIDATE;
2113 [CCode (cheader_filename = "sys/mman.h")]
2114 public const int MS_SYNC;
2116 [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h")]
2117 public struct utsname {
2118 public unowned string sysname;
2119 public unowned string nodename;
2120 public unowned string release;
2121 public unowned string version;
2122 public unowned string machine;
2123 [CCode (cname = "uname")]
2128 [CCode (cname = "FILE", free_function = "fclose", cheader_filename = "stdio.h")]
2130 [CCode (cname = "EOF", cheader_filename = "stdio.h")]
2131 public const int EOF;
2132 [CCode (cname = "SEEK_SET", cheader_filename = "stdio.h")]
2133 public const int SEEK_SET;
2134 [CCode (cname = "SEEK_CUR", cheader_filename = "stdio.h")]
2135 public const int SEEK_CUR;
2136 [CCode (cname = "SEEK_END", cheader_filename = "stdio.h")]
2137 public const int SEEK_END;
2139 [CCode (cname = "fopen")]
2140 public static FILE? open (string path, string mode);
2141 [CCode (cname = "fdopen")]
2142 public static FILE? fdopen (int fildes, string mode);
2143 [CCode (cname = "popen")]
2144 public static FILE? popen (string command, string mode);
2146 [CCode (cname = "fprintf")]
2148 public void printf (string format, ...);
2149 [CCode (cname = "fputc", instance_pos = -1)]
2150 public void putc (char c);
2151 [CCode (cname = "fputs", instance_pos = -1)]
2152 public void puts (string s);
2153 [CCode (cname = "fgetc")]
2155 [CCode (cname = "fgets", instance_pos = -1)]
2156 public unowned string gets (char[] s);
2157 [CCode (cname = "feof")]
2159 [CCode (cname = "fscanf"), ScanfFormat]
2160 public int scanf (string format, ...);
2161 [CCode (cname = "fflush")]
2162 public int flush ();
2163 [CCode (cname = "fseek")]
2164 public int seek (long offset, int whence);
2165 [CCode (cname = "ftell")]
2166 public long tell ();
2167 [CCode (cname = "rewind")]
2168 public void rewind ();
2169 [CCode (cname = "fileno")]
2170 public int fileno ();
2171 [CCode (cname = "ferror")]
2172 public int error ();
2173 [CCode (cname = "clearerr")]
2174 public void clearerr ();
2177 public static FILE stderr;
2178 public static FILE stdout;
2179 public static FILE stdin;