DEADSOFTWARE

add utility cpmake
[cpc.git] / src / native / linux / 486 / Posix / Mod / Cfcntl.cp
1 MODULE PosixCfcntl ['libc.so.6'];
3 (* generated by genposix.sh, do not modify *)
5 IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
7 TYPE
8 char* = PosixCtypes.char;
9 signed_char* = PosixCtypes.signed_char;
10 unsigned_char* = PosixCtypes.unsigned_char;
11 short* = PosixCtypes.short;
12 short_int* = PosixCtypes.short_int;
13 signed_short* = PosixCtypes.signed_short;
14 signed_short_int* = PosixCtypes.signed_short_int;
15 unsigned_short* = PosixCtypes.unsigned_short;
16 unsigned_short_int* = PosixCtypes.unsigned_short_int;
17 int* = PosixCtypes.int;
18 signed* = PosixCtypes.signed;
19 signed_int* = PosixCtypes.signed_int;
20 unsigned* = PosixCtypes.unsigned;
21 unsigned_int* = PosixCtypes.unsigned_int;
22 long* = PosixCtypes.long;
23 long_int* = PosixCtypes.long_int;
24 signed_long* = PosixCtypes.signed_long;
25 signed_long_int* = PosixCtypes.signed_long_int;
26 unsigned_long* = PosixCtypes.unsigned_long;
27 unsigned_long_int* = PosixCtypes.unsigned_long_int;
28 long_long* = PosixCtypes.long_long;
29 long_long_int* = PosixCtypes.long_long_int;
30 signed_long_long* = PosixCtypes.signed_long_long;
31 signed_long_long_int* = PosixCtypes.signed_long_long_int;
32 unsigned_long_long* = PosixCtypes.unsigned_long_long;
33 unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
34 float* = PosixCtypes.float;
35 double* = PosixCtypes.double;
36 long_double* = PosixCtypes.long_double;
38 CONST
39 F_DUPFD* = 0;
40 F_GETFD* = 1;
41 F_SETFD* = 2;
42 F_GETFL* = 3;
43 F_SETFL* = 4;
44 F_GETLK* = 5;
45 F_SETLK* = 6;
46 F_SETLKW* = 7;
47 F_GETOWN* = 9;
48 F_SETOWN* = 8;
50 CONST
51 F_DUPFD_CLOEXEC* = 1030;
53 CONST
54 FD_CLOEXEC* = 1;
56 CONST
57 F_RDLCK* = 0;
58 F_UNLCK* = 2;
59 F_WRLCK* = 1;
61 CONST
62 SEEK_SET* = 0;
63 SEEK_CUR* = 1;
64 SEEK_END* = 2;
66 CONST
67 O_CREAT* = 64;
68 O_DIRECTORY* = 65536;
69 O_EXCL* = 128;
70 O_NOCTTY* = 256;
71 O_NOFOLLOW* = 131072;
72 O_TRUNC* = 512;
73 O_APPEND* = 1024;
74 O_NONBLOCK* = 2048;
75 O_SYNC* = 1052672;
76 O_ACCMODE* = 3;
77 O_RDONLY* = 0;
78 O_RDWR* = 2;
79 O_WRONLY* = 1;
81 CONST
82 O_CLOEXEC* = 524288;
83 O_DSYNC* = 4096;
84 O_RSYNC* = 1052672;
86 CONST
87 AT_FDCWD* = -100;
88 AT_EACCESS* = 512;
89 AT_SYMLINK_NOFOLLOW* = 256;
90 AT_SYMLINK_FOLLOW* = 1024;
91 AT_REMOVEDIR* = 512;
93 CONST
94 POSIX_FADV_DONTNEED* = 4;
95 POSIX_FADV_NOREUSE* = 5;
96 POSIX_FADV_NORMAL* = 0;
97 POSIX_FADV_RANDOM* = 1;
98 POSIX_FADV_SEQUENTIAL* = 2;
99 POSIX_FADV_WILLNEED* = 3;
101 TYPE
102 Pstruct_flock* = POINTER TO struct_flock;
103 struct_flock* = RECORD [noalign] (* 16 *)
104 l_type*: short; (* 0+2 *)
105 l_whence*: short; (* 2+2 *)
106 l_start*: off_t; (* 4+4 *)
107 l_len*: off_t; (* 8+4 *)
108 l_pid*: pid_t; (* 12+4 *)
109 END;
111 TYPE
112 mode_t* = PosixCsys_types.mode_t;
113 off_t* = PosixCsys_types.off_t;
114 pid_t* = PosixCsys_types.pid_t;
116 PROCEDURE [ccall] creat* (IN pathname: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
117 PROCEDURE [ccall] fcntl* (fildes, cmd, arg: int): int;
118 PROCEDURE [ccall] open* (IN pathname: ARRAY [untagged] OF SHORTCHAR; flags: int; mode: mode_t): int;
119 PROCEDURE [ccall] openat* (fddir: int; IN pathname: ARRAY [untagged] OF SHORTCHAR; flags: int; mode: mode_t): int;
120 PROCEDURE [ccall] posix_fadvise* (fd: int; offset, len: off_t; advice: int): int;
121 PROCEDURE [ccall] posix_fallocate* (fd: int; offset, len: off_t): int;
123 END PosixCfcntl.