1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
|
/* posix.vapi
*
* Copyright (C) 2008-2009 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Jürg Billeter <j@bitron.ch>
*/
[CCode (cprefix = "", lower_case_cprefix = "")]
namespace Posix {
[CCode (cheader_filename = "assert.h")]
public void assert (bool expression);
[CCode (cheader_filename = "ctype.h")]
public bool isalnum (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isalpha (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isascii (int c);
[CCode (cheader_filename = "ctype.h")]
public bool iscntrl (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isdigit (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isgraph (int c);
[CCode (cheader_filename = "ctype.h")]
public bool islower (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isprint (int c);
[CCode (cheader_filename = "ctype.h")]
public bool ispunct (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isspace (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isupper (int c);
[CCode (cheader_filename = "ctype.h")]
public bool isxdigit (int c);
[CCode (cheader_filename = "ctype.h")]
public int toascii (int c);
[CCode (cheader_filename = "ctype.h")]
public int tolower (int c);
[CCode (cheader_filename = "ctype.h")]
public int toupper (int c);
[CCode (cheader_filename = "errno.h")]
public int errno;
[CCode (cheader_filename = "errno.h")]
public const int E2BIG;
[CCode (cheader_filename = "errno.h")]
public const int EACCES;
[CCode (cheader_filename = "errno.h")]
public const int EADDRINUSE;
[CCode (cheader_filename = "errno.h")]
public const int EADDRNOTAVAIL;
[CCode (cheader_filename = "errno.h")]
public const int EAFNOSUPPORT;
[CCode (cheader_filename = "errno.h")]
public const int EAGAIN;
[CCode (cheader_filename = "errno.h")]
public const int EALREADY;
[CCode (cheader_filename = "errno.h")]
public const int EBADF;
[CCode (cheader_filename = "errno.h")]
public const int EBADMSG;
[CCode (cheader_filename = "errno.h")]
public const int EBUSY;
[CCode (cheader_filename = "errno.h")]
public const int ECANCELED;
[CCode (cheader_filename = "errno.h")]
public const int ECHILD;
[CCode (cheader_filename = "errno.h")]
public const int ECONNABORTED;
[CCode (cheader_filename = "errno.h")]
public const int ECONNREFUSED;
[CCode (cheader_filename = "errno.h")]
public const int ECONNRESET;
[CCode (cheader_filename = "errno.h")]
public const int EDEADLK;
[CCode (cheader_filename = "errno.h")]
public const int EDESTADDRREQ;
[CCode (cheader_filename = "errno.h")]
public const int EDOM;
[CCode (cheader_filename = "errno.h")]
public const int EDQUOT;
[CCode (cheader_filename = "errno.h")]
public const int EEXIST;
[CCode (cheader_filename = "errno.h")]
public const int EFAULT;
[CCode (cheader_filename = "errno.h")]
public const int EFBIG;
[CCode (cheader_filename = "errno.h")]
public const int EHOSTUNREACH;
[CCode (cheader_filename = "errno.h")]
public const int EIDRM;
[CCode (cheader_filename = "errno.h")]
public const int EILSEQ;
[CCode (cheader_filename = "errno.h")]
public const int EINPROGRESS;
[CCode (cheader_filename = "errno.h")]
public const int EINTR;
[CCode (cheader_filename = "errno.h")]
public const int EINVAL;
[CCode (cheader_filename = "errno.h")]
public const int EIO;
[CCode (cheader_filename = "errno.h")]
public const int EISCONN;
[CCode (cheader_filename = "errno.h")]
public const int EISDIR;
[CCode (cheader_filename = "errno.h")]
public const int ELOOP;
[CCode (cheader_filename = "errno.h")]
public const int EMFILE;
[CCode (cheader_filename = "errno.h")]
public const int EMLINK;
[CCode (cheader_filename = "errno.h")]
public const int EMSGSIZE;
[CCode (cheader_filename = "errno.h")]
public const int EMULTIHOP;
[CCode (cheader_filename = "errno.h")]
public const int ENAMETOOLONG;
[CCode (cheader_filename = "errno.h")]
public const int ENETDOWN;
[CCode (cheader_filename = "errno.h")]
public const int ENETRESET;
[CCode (cheader_filename = "errno.h")]
public const int ENETUNREACH;
[CCode (cheader_filename = "errno.h")]
public const int ENFILE;
[CCode (cheader_filename = "errno.h")]
public const int ENOBUFS;
[CCode (cheader_filename = "errno.h")]
public const int ENODATA;
[CCode (cheader_filename = "errno.h")]
public const int ENODEV;
[CCode (cheader_filename = "errno.h")]
public const int ENOENT;
[CCode (cheader_filename = "errno.h")]
public const int ENOEXEC;
[CCode (cheader_filename = "errno.h")]
public const int ENOLCK;
[CCode (cheader_filename = "errno.h")]
public const int ENOLINK;
[CCode (cheader_filename = "errno.h")]
public const int ENOMEM;
[CCode (cheader_filename = "errno.h")]
public const int ENOMSG;
[CCode (cheader_filename = "errno.h")]
public const int ENOPROTOOPT;
[CCode (cheader_filename = "errno.h")]
public const int ENOSPC;
[CCode (cheader_filename = "errno.h")]
public const int ENOSR;
[CCode (cheader_filename = "errno.h")]
public const int ENOSTR;
[CCode (cheader_filename = "errno.h")]
public const int ENOSYS;
[CCode (cheader_filename = "errno.h")]
public const int ENOTCONN;
[CCode (cheader_filename = "errno.h")]
public const int ENOTDIR;
[CCode (cheader_filename = "errno.h")]
public const int ENOTEMPTY;
[CCode (cheader_filename = "errno.h")]
public const int ENOTSOCK;
[CCode (cheader_filename = "errno.h")]
public const int ENOTSUP;
[CCode (cheader_filename = "errno.h")]
public const int ENOTTY;
[CCode (cheader_filename = "errno.h")]
public const int ENXIO;
[CCode (cheader_filename = "errno.h")]
public const int EOPNOTSUPP;
[CCode (cheader_filename = "errno.h")]
public const int EOVERFLOW;
[CCode (cheader_filename = "errno.h")]
public const int EPERM;
[CCode (cheader_filename = "errno.h")]
public const int EPIPE;
[CCode (cheader_filename = "errno.h")]
public const int EPROTO;
[CCode (cheader_filename = "errno.h")]
public const int EPROTONOSUPPORT;
[CCode (cheader_filename = "errno.h")]
public const int EPROTOTYPE;
[CCode (cheader_filename = "errno.h")]
public const int ERANGE;
[CCode (cheader_filename = "errno.h")]
public const int EROFS;
[CCode (cheader_filename = "errno.h")]
public const int ESPIPE;
[CCode (cheader_filename = "errno.h")]
public const int ESRCH;
[CCode (cheader_filename = "errno.h")]
public const int ESTALE;
[CCode (cheader_filename = "errno.h")]
public const int ETIME;
[CCode (cheader_filename = "errno.h")]
public const int ETIMEDOUT;
[CCode (cheader_filename = "errno.h")]
public const int ETXTBSY;
[CCode (cheader_filename = "errno.h")]
public const int EWOULDBLOCK;
[CCode (cheader_filename = "errno.h")]
public const int EXDEV;
[CCode (cheader_filename = "fcntl.h")]
public const int F_DUPFD;
[CCode (cheader_filename = "fcntl.h")]
public const int F_GETFD;
[CCode (cheader_filename = "fcntl.h")]
public const int F_SETFD;
[CCode (cheader_filename = "fcntl.h")]
public const int F_GETFL;
[CCode (cheader_filename = "fcntl.h")]
public const int F_SETFL;
[CCode (cheader_filename = "fcntl.h")]
public const int F_GETLK;
[CCode (cheader_filename = "fcntl.h")]
public const int F_SETLK;
[CCode (cheader_filename = "fcntl.h")]
public const int F_SETLKW;
[CCode (cheader_filename = "fcntl.h")]
public const int F_GETOWN;
[CCode (cheader_filename = "fcntl.h")]
public const int F_SETOWN;
[CCode (cheader_filename = "fcntl.h")]
public const int FD_CLOEXEC;
[CCode (cheader_filename = "fcntl.h")]
public const int F_RDLCK;
[CCode (cheader_filename = "fcntl.h")]
public const int F_UNLCK;
[CCode (cheader_filename = "fcntl.h")]
public const int F_WRLCK;
[CCode (cheader_filename = "fcntl.h")]
public const int O_CREAT;
[CCode (cheader_filename = "fcntl.h")]
public const int O_EXCL;
[CCode (cheader_filename = "fcntl.h")]
public const int O_NOCTTY;
[CCode (cheader_filename = "fcntl.h")]
public const int O_TRUNC;
[CCode (cheader_filename = "fcntl.h")]
public const int O_APPEND;
[CCode (cheader_filename = "fcntl.h")]
public const int O_DSYNC;
[CCode (cheader_filename = "fcntl.h")]
public const int O_NONBLOCK;
[CCode (cheader_filename = "fcntl.h")]
public const int O_RSYNC;
[CCode (cheader_filename = "fcntl.h")]
public const int O_SYNC;
[CCode (cheader_filename = "fcntl.h")]
public const int O_ACCMODE;
[CCode (cheader_filename = "fcntl.h")]
public const int O_RDONLY;
[CCode (cheader_filename = "fcntl.h")]
public const int O_RDWR;
[CCode (cheader_filename = "fcntl.h")]
public const int O_WRONLY;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_NORMAL;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_SEQUENTIAL;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_RANDOM;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_WILLNEED;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_DONTNEED;
[CCode (cheader_filename = "fcntl.h")]
public const int POSIX_FADV_NOREUSE;
[CCode (cheader_filename = "fcntl.h")]
public int creat (string path, mode_t mode);
[CCode (cheader_filename = "fcntl.h")]
public int fcntl (int fd, int cmd, ...);
[CCode (cheader_filename = "fcntl.h")]
public int open (string path, int oflag, mode_t mode=0);
[CCode (cheader_filename = "fcntl.h")]
public int posix_fadvice (int fd, long offset, long len, int advice);
[CCode (cheader_filename = "fcntl.h")]
public int posix_fallocate (int fd, long offset, long len);
[CCode (cheader_filename = "signal.h")]
public const int SIGABRT;
[CCode (cheader_filename = "signal.h")]
public const int SIGALRM;
[CCode (cheader_filename = "signal.h")]
public const int SIGBUS;
[CCode (cheader_filename = "signal.h")]
public const int SIGCHLD;
[CCode (cheader_filename = "signal.h")]
public const int SIGCONT;
[CCode (cheader_filename = "signal.h")]
public const int SIGFPE;
[CCode (cheader_filename = "signal.h")]
public const int SIGHUP;
[CCode (cheader_filename = "signal.h")]
public const int SIGILL;
[CCode (cheader_filename = "signal.h")]
public const int SIGINT;
[CCode (cheader_filename = "signal.h")]
public const int SIGKILL;
[CCode (cheader_filename = "signal.h")]
public const int SIGPIPE;
[CCode (cheader_filename = "signal.h")]
public const int SIGQUIT;
[CCode (cheader_filename = "signal.h")]
public const int SIGSEGV;
[CCode (cheader_filename = "signal.h")]
public const int SIGSTOP;
[CCode (cheader_filename = "signal.h")]
public const int SIGTERM;
[CCode (cheader_filename = "signal.h")]
public const int SIGTSTP;
[CCode (cheader_filename = "signal.h")]
public const int SIGTTIN;
[CCode (cheader_filename = "signal.h")]
public const int SIGTTOU;
[CCode (cheader_filename = "signal.h")]
public const int SIGUSR1;
[CCode (cheader_filename = "signal.h")]
public const int SIGUSR2;
[CCode (cheader_filename = "signal.h")]
public const int SIGPOLL;
[CCode (cheader_filename = "signal.h")]
public const int SIGPROF;
[CCode (cheader_filename = "signal.h")]
public const int SIGSYS;
[CCode (cheader_filename = "signal.h")]
public const int SIGTRAP;
[CCode (cheader_filename = "signal.h")]
public const int SIGURG;
[CCode (cheader_filename = "signal.h")]
public const int SIGVTALRM;
[CCode (cheader_filename = "signal.h")]
public const int SIGXCPU;
[CCode (cheader_filename = "signal.h")]
public const int SIGXFSZ;
[CCode (cheader_filename = "signal.h")]
public const int SIGIOT;
[CCode (cheader_filename = "signal.h")]
public const int SIGSTKFLT;
[SimpleType]
[IntegerType (rank = 6)]
[CCode (cname = "pid_t", default_value = "0", cheader_filename = "sys/types.h")]
public struct pid_t {
}
[CCode (cheader_filename = "signal.h")]
public int kill (pid_t pid, int signum);
public static delegate void sighandler_t (int signal);
[CCode (cheader_filename = "signal.h")]
public sighandler_t signal (int signum, sighandler_t? handler);
[CCode (cheader_filename = "string.h")]
public int memcmp (void* s1, void* s2, size_t n);
[CCode (cheader_filename = "string.h")]
public unowned string strerror (int errnum);
[CCode (cheader_filename = "stropts.h")]
public const int I_PUSH;
[CCode (cheader_filename = "stropts.h")]
public const int I_POP;
[CCode (cheader_filename = "stropts.h")]
public const int I_LOOK;
[CCode (cheader_filename = "stropts.h")]
public const int I_FLUSH;
[CCode (cheader_filename = "stropts.h")]
public const int I_FLUSHBAND;
[CCode (cheader_filename = "stropts.h")]
public const int I_SETSIG;
[CCode (cheader_filename = "stropts.h")]
public const int I_GETSIG;
[CCode (cheader_filename = "stropts.h")]
public const int I_FIND;
[CCode (cheader_filename = "stropts.h")]
public const int I_PEEK;
[CCode (cheader_filename = "stropts.h")]
public const int I_SRDOPT;
[CCode (cheader_filename = "stropts.h")]
public const int I_GRDOPT;
[CCode (cheader_filename = "stropts.h")]
public const int I_NREAD;
[CCode (cheader_filename = "stropts.h")]
public const int I_FDINSERT;
[CCode (cheader_filename = "stropts.h")]
public const int I_STR;
[CCode (cheader_filename = "stropts.h")]
public const int I_SWROPT;
[CCode (cheader_filename = "stropts.h")]
public const int I_GWROPT;
[CCode (cheader_filename = "stropts.h")]
public const int I_SENDFD;
[CCode (cheader_filename = "stropts.h")]
public const int I_RECVFD;
[CCode (cheader_filename = "stropts.h")]
public const int I_LIST;
[CCode (cheader_filename = "stropts.h")]
public const int I_ATMARK;
[CCode (cheader_filename = "stropts.h")]
public const int I_CKBAND;
[CCode (cheader_filename = "stropts.h")]
public const int I_GETBAND;
[CCode (cheader_filename = "stropts.h")]
public const int I_CANPUT;
[CCode (cheader_filename = "stropts.h")]
public const int I_SETCLTIME;
[CCode (cheader_filename = "stropts.h")]
public const int I_GETCLTIME;
[CCode (cheader_filename = "stropts.h")]
public const int I_LINK;
[CCode (cheader_filename = "stropts.h")]
public const int I_UNLINK;
[CCode (cheader_filename = "stropts.h")]
public const int I_PLINK;
[CCode (cheader_filename = "stropts.h")]
public const int I_PUNLINK;
[CCode (cheader_filename = "stropts.h")]
public const int FLUSHR;
[CCode (cheader_filename = "stropts.h")]
public const int FLUSHW;
[CCode (cheader_filename = "stropts.h")]
public const int FLUSHRW;
[CCode (cheader_filename = "stropts.h")]
public const int S_RDNORM;
[CCode (cheader_filename = "stropts.h")]
public const int S_RDBAND;
[CCode (cheader_filename = "stropts.h")]
public const int S_INPUT;
[CCode (cheader_filename = "stropts.h")]
public const int S_HIPRI;
[CCode (cheader_filename = "stropts.h")]
public const int S_OUTPUT;
[CCode (cheader_filename = "stropts.h")]
public const int S_WRNORM;
[CCode (cheader_filename = "stropts.h")]
public const int S_WRBAND;
[CCode (cheader_filename = "stropts.h")]
public const int S_MSG;
[CCode (cheader_filename = "stropts.h")]
public const int S_ERROR;
[CCode (cheader_filename = "stropts.h")]
public const int S_HANGUP;
[CCode (cheader_filename = "stropts.h")]
public const int S_BANDURG;
[CCode (cheader_filename = "stropts.h")]
public const int RS_HIPRI;
[CCode (cheader_filename = "stropts.h")]
public const int RNORM;
[CCode (cheader_filename = "stropts.h")]
public const int RMSGD;
[CCode (cheader_filename = "stropts.h")]
public const int RMSGN;
[CCode (cheader_filename = "stropts.h")]
public const int RPROTNORN;
[CCode (cheader_filename = "stropts.h")]
public const int RPROTDAT;
[CCode (cheader_filename = "stropts.h")]
public const int RPROTDIS;
[CCode (cheader_filename = "stropts.h")]
public const int SNDZERO;
[CCode (cheader_filename = "stropts.h")]
public const int ANYMARK;
[CCode (cheader_filename = "stropts.h")]
public const int LASTMARK;
[CCode (cheader_filename = "stropts.h")]
public const int MUXID_ALL;
[CCode (cheader_filename = "stropts.h")]
public const int MSG_ANY;
[CCode (cheader_filename = "stropts.h")]
public const int MSG_BAND;
[CCode (cheader_filename = "stropts.h")]
public const int MSG_HIPRI;
[CCode (cheader_filename = "stropts.h")]
public const int MORECTL;
[CCode (cheader_filename = "stropts.h")]
public const int MOREDATA;
[CCode (cheader_filename = "stropts.h", sentinel = "")]
public int ioctl (int fildes, int request, ...);
[CCode (cheader_filename = "syslog.h")]
public void openlog (string ident, int option, int facility );
[CCode (cheader_filename = "syslog.h")]
public void syslog (int priority, string format, ... );
[CCode (cheader_filename = "syslog.h")]
public void closelog ();
[CCode (cheader_filename = "syslog.h")]
public const int LOG_PID;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_CONS;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_ODELAY;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_NDELAY;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_NOWAIT;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_EMERG;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_ALERT;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_CRIT;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_ERR;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_WARNING;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_NOTICE;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_INFO;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_DEBUG;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_KERN;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_USER;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_MAIL;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_DAEMON;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_SYSLOG;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LPR;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_NEWS;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_UUCP;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_CRON;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_AUTHPRIV;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_FTP;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL0;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL1;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL2;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL3;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL4;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL5;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL6;
[CCode (cheader_filename = "syslog.h")]
public const int LOG_LOCAL7;
[CCode (cheader_filename = "sys/socket.h")]
public const int SOCK_DGRAM;
[CCode (cheader_filename = "sys/socket.h")]
public const int SOCK_RAW;
[CCode (cheader_filename = "sys/socket.h")]
public const int SOCK_SEQPACKET;
[CCode (cheader_filename = "sys/socket.h")]
public const int SOCK_STREAM;
[CCode (cheader_filename = "sys/socket.h")]
public const int AF_INET;
[CCode (cheader_filename = "sys/socket.h")]
public const int AF_INET6;
[CCode (cheader_filename = "sys/socket.h")]
public const int AF_UNIX;
[CCode (cheader_filename = "sys/socket.h")]
public int socket (int domain, int type, int protocol);
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFMT;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFBLK;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFCHR;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFIFO;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFREG;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFDIR;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFLNK;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IFSOCK;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IRWXU;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IRUSR;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IWUSR;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IXUSR;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IRWXG;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IRGRP;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IWGRP;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IXGRP;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IRWXO;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IROTH;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IWOTH;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_IXOTH;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_ISUID;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_ISGID;
[CCode (cheader_filename = "sys/stat.h")]
public const mode_t S_ISVTX;
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISBLK (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISCHR (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISDIR (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISFIFO (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISREG (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISLNK (mode_t mode);
[CCode (cheader_filename = "sys/stat.h")]
public bool S_ISSOCK (mode_t mode);
[CCode (cheader_filename = "sys/stat.h", cname = "struct stat")]
public struct Stat {
public dev_t st_dev;
public ino_t st_ino;
public mode_t st_mode;
public nlink_t st_nlink;
public uid_t st_uid;
public gid_t st_gid;
public dev_t st_rdev;
public size_t st_size;
public time_t st_atime;
public time_t st_mtime;
public time_t st_ctime;
public blksize_t st_blksize;
public blkcnt_t st_blocks;
}
[CCode (cheader_filename = "sys/stat.h")]
int fstat( int fd, out Stat buf);
[CCode (cheader_filename = "sys/stat.h")]
int stat (string filename, out Stat buf);
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/statvfs.h")]
public struct fsblkcnt_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/statvfs.h")]
public struct fsfilcnt_t {
}
[CCode (cheader_filename = "sys/statvfs.h", cname = "struct statvfs")]
public struct statvfs {
public ulong f_bsize;
public ulong f_frsize;
public fsblkcnt_t f_blocks;
public fsblkcnt_t f_bfree;
public fsblkcnt_t f_bavail;
public fsfilcnt_t f_files;
public fsfilcnt_t f_ffree;
public fsfilcnt_t f_favail;
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cname="off_t", cheader_filename = "sys/types.h")]
public struct off_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct uid_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct gid_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cname = "mode_t", cheader_filename = "sys/types.h")]
public struct mode_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct dev_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct ino_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct nlink_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct blksize_t {
}
[SimpleType]
[IntegerType (rank = 9)]
[CCode (cheader_filename = "sys/types.h")]
public struct blkcnt_t {
}
[CCode (cheader_filename = "time.h")]
public struct tm {
public int tm_sec;
public int tm_min;
public int tm_hour;
public int tm_mday;
public int tm_mon;
public int tm_year;
public int tm_wday;
public int tm_yday;
public int tm_isdt;
}
[CCode (cheader_filename = "time.h")]
public struct timespec {
time_t tv_sec;
long tv_nsec;
}
[CCode (cheader_filename = "unistd.h")]
public int close (int fd);
[CCode (cheader_filename = "unistd.h")]
public int execl (string path, params string[] arg);
[CCode (cheader_filename = "unistd.h")]
public ssize_t read (int fd, void* buf, size_t count);
[CCode (cheader_filename = "unistd.h")]
public ssize_t write (int fd, void* buf, size_t count);
[CCode (cheader_filename = "unistd.h")]
public off_t lseek(int fildes, off_t offset, int whence);
[CCode (cheader_filename = "unistd.h")]
public const int SEEK_SET;
[CCode (cheader_filename = "unistd.h")]
public const int SEEK_CUR;
[CCode (cheader_filename = "unistd.h")]
public const int SEEK_END;
}
|