236
|
1 def CpuSetT : NamedType<"cpu_set_t">;
|
|
2 def CpuSetPtr : PtrType<CpuSetT>;
|
|
3 def ConstCpuSetPtr : ConstType<CpuSetPtr>;
|
|
4
|
252
|
5 def QSortRCompareT : NamedType<"__qsortrcompare_t">;
|
|
6
|
173
|
7 def GnuExtensions : StandardSpec<"GNUExtensions"> {
|
236
|
8 NamedType CookieIOFunctionsT = NamedType<"cookie_io_functions_t">;
|
221
|
9 HeaderSpec CType = HeaderSpec<
|
|
10 "ctype.h",
|
|
11 [], // Macros
|
|
12 [], // Types
|
|
13 [], // Enumerations
|
|
14 [
|
|
15 FunctionSpec<
|
|
16 "toascii",
|
|
17 RetValSpec<IntType>,
|
|
18 [ArgSpec<IntType>]
|
|
19 >,
|
|
20 ]
|
|
21 >;
|
|
22
|
173
|
23 HeaderSpec Math = HeaderSpec<
|
|
24 "math.h",
|
|
25 [], // Macros
|
|
26 [], // Types
|
|
27 [], // Enumerations
|
|
28 [
|
|
29 FunctionSpec<
|
|
30 "sincosf",
|
|
31 RetValSpec<VoidType>,
|
|
32 [ArgSpec<FloatType>, ArgSpec<FloatPtr>, ArgSpec<FloatPtr>]
|
|
33 >,
|
236
|
34 FunctionSpec<"exp10f", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
173
|
35 ]
|
|
36 >;
|
252
|
37
|
236
|
38 HeaderSpec Sched = HeaderSpec<
|
|
39 "sched.h",
|
|
40 [], // Macros
|
|
41 [PidT, SizeTType, CpuSetT], // Types
|
|
42 [], // Enumerations
|
|
43 [
|
|
44 FunctionSpec<
|
|
45 "sched_getaffinity",
|
|
46 RetValSpec<IntType>,
|
|
47 [ArgSpec<PidT>, ArgSpec<SizeTType>, ArgSpec<CpuSetPtr>]
|
|
48 >,
|
|
49 FunctionSpec<
|
|
50 "sched_setaffinity",
|
|
51 RetValSpec<IntType>,
|
|
52 [ArgSpec<PidT>, ArgSpec<SizeTType>, ArgSpec<ConstCpuSetPtr>]
|
|
53 >,
|
|
54 ]
|
|
55 >;
|
252
|
56
|
221
|
57 HeaderSpec String = HeaderSpec<
|
|
58 "string.h",
|
|
59 [], // Macros
|
|
60 [], // Types
|
|
61 [], // Enumerations
|
252
|
62 [
|
|
63 FunctionSpec<
|
|
64 "memmem",
|
|
65 RetValSpec<VoidPtr>,
|
|
66 [ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
|
|
67 >,
|
221
|
68 FunctionSpec<
|
|
69 "memrchr",
|
|
70 RetValSpec<VoidPtr>,
|
|
71 [ArgSpec<VoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
|
|
72 >,
|
236
|
73 FunctionSpec<
|
|
74 "strerror_r",
|
|
75 RetValSpec<CharPtr>,
|
|
76 [ArgSpec<IntType>, ArgSpec<CharPtr>, ArgSpec<SizeTType>]
|
|
77 >,
|
252
|
78 FunctionSpec<
|
|
79 "strcasestr",
|
|
80 RetValSpec<CharPtr>,
|
|
81 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
82 >,
|
|
83 FunctionSpec<
|
|
84 "strchrnul",
|
|
85 RetValSpec<CharPtr>,
|
|
86 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
|
|
87 >,
|
236
|
88 ]
|
|
89 >;
|
|
90
|
|
91 HeaderSpec FEnv = HeaderSpec<
|
|
92 "fenv.h",
|
|
93 [], // Macros
|
|
94 [], // Types
|
|
95 [], // Enumerations
|
|
96 [
|
|
97 FunctionSpec<
|
|
98 "fedisableexcept",
|
|
99 RetValSpec<IntType>,
|
|
100 [ArgSpec<IntType>]
|
|
101 >,
|
|
102 FunctionSpec<
|
|
103 "feenableexcept",
|
|
104 RetValSpec<IntType>,
|
|
105 [ArgSpec<IntType>]
|
|
106 >,
|
|
107 FunctionSpec<
|
|
108 "fegetexcept",
|
|
109 RetValSpec<IntType>,
|
|
110 []
|
|
111 >
|
221
|
112 ]
|
|
113 >;
|
|
114
|
236
|
115 HeaderSpec StdIO = HeaderSpec<
|
|
116 "stdio.h",
|
|
117 [], // Macros
|
|
118 [CookieIOFunctionsT], // Types
|
|
119 [], // Enumerations
|
|
120 [
|
|
121 FunctionSpec<
|
|
122 "clearerr_unlocked",
|
|
123 RetValSpec<VoidType>,
|
|
124 [ArgSpec<FILEPtr>]
|
|
125 >,
|
|
126 FunctionSpec<
|
|
127 "feof_unlocked",
|
|
128 RetValSpec<IntType>,
|
|
129 [ArgSpec<FILEPtr>]
|
|
130 >,
|
|
131 FunctionSpec<
|
|
132 "ferror_unlocked",
|
|
133 RetValSpec<IntType>,
|
|
134 [ArgSpec<FILEPtr>]
|
|
135 >,
|
|
136 FunctionSpec<
|
|
137 "fopencookie",
|
|
138 RetValSpec<FILEPtr>,
|
|
139 [ArgSpec<VoidPtr>, ArgSpec<ConstCharPtr>, ArgSpec<CookieIOFunctionsT>]
|
|
140 >,
|
|
141 FunctionSpec<
|
|
142 "fread_unlocked",
|
|
143 RetValSpec<SizeTType>,
|
|
144 [ArgSpec<VoidRestrictedPtr>,
|
|
145 ArgSpec<SizeTType>,
|
|
146 ArgSpec<SizeTType>,
|
|
147 ArgSpec<FILERestrictedPtr>]
|
|
148 >,
|
|
149 FunctionSpec<
|
|
150 "fwrite_unlocked",
|
|
151 RetValSpec<SizeTType>,
|
|
152 [ArgSpec<ConstVoidRestrictedPtr>,
|
|
153 ArgSpec<SizeTType>,
|
|
154 ArgSpec<SizeTType>,
|
|
155 ArgSpec<FILERestrictedPtr>]
|
|
156 >,
|
252
|
157 FunctionSpec<
|
|
158 "fgetc_unlocked",
|
|
159 RetValSpec<IntType>,
|
|
160 [ArgSpec<FILEPtr>]
|
|
161 >,
|
|
162 ]
|
|
163 >;
|
|
164
|
|
165 HeaderSpec StdLib = HeaderSpec<
|
|
166 "stdlib.h",
|
|
167 [], // Macros
|
|
168 [QSortRCompareT], // Types
|
|
169 [], // Enumerations
|
|
170 [
|
|
171 FunctionSpec<
|
|
172 "qsort_r",
|
|
173 RetValSpec<VoidType>,
|
|
174 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<SizeTType>, ArgSpec<QSortRCompareT>, ArgSpec<VoidPtr>]
|
|
175 >,
|
236
|
176 ]
|
|
177 >;
|
|
178
|
|
179 HeaderSpec PThread = HeaderSpec<
|
|
180 "pthread.h",
|
|
181 [], // Macros
|
|
182 [], // Types
|
|
183 [], // Enumerations
|
|
184 [
|
|
185 FunctionSpec<
|
|
186 "pthread_setname_np",
|
|
187 RetValSpec<IntType>,
|
|
188 [ArgSpec<PThreadTType>, ArgSpec<ConstCharPtr>]
|
|
189 >,
|
|
190 FunctionSpec<
|
|
191 "pthread_getname_np",
|
|
192 RetValSpec<IntType>,
|
|
193 [ArgSpec<PThreadTType>, ArgSpec<CharPtr>, ArgSpec<SizeTType>]
|
|
194 >,
|
|
195 ]
|
|
196 >;
|
|
197
|
|
198 HeaderSpec SysAuxv = HeaderSpec<
|
|
199 "sys/auxv.h",
|
|
200 [], // Macros
|
|
201 [], // Types
|
|
202 [], // Enumerations
|
|
203 [] // Functions
|
|
204 >;
|
|
205
|
|
206 HeaderSpec SendFile = HeaderSpec<
|
|
207 "sys/sendfile.h",
|
|
208 [], // Macros
|
|
209 [OffTType, SizeTType, SSizeTType,], // Types
|
|
210 [], // Enumerations
|
|
211 [
|
|
212 FunctionSpec<
|
|
213 "sendfile",
|
|
214 RetValSpec<SSizeTType>,
|
|
215 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<OffTPtr>, ArgSpec<SizeTType>]
|
|
216 >,
|
|
217 ]
|
|
218 >;
|
|
219
|
|
220 HeaderSpec UniStd = HeaderSpec<
|
|
221 "unistd.h",
|
|
222 [], // Macros
|
|
223 [], // Types
|
|
224 [], // Enumerations
|
|
225 [
|
|
226 FunctionSpec<
|
|
227 "dup2",
|
|
228 RetValSpec<IntType>,
|
|
229 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
|
|
230 >,
|
|
231 ]
|
|
232 >;
|
173
|
233
|
|
234 let Headers = [
|
221
|
235 CType,
|
236
|
236 FEnv,
|
|
237 Math,
|
|
238 PThread,
|
|
239 Sched,
|
|
240 SendFile,
|
|
241 SysAuxv,
|
|
242 StdIO,
|
252
|
243 StdLib,
|
221
|
244 String,
|
236
|
245 UniStd,
|
173
|
246 ];
|
|
247 }
|