2020-03-25 13:29:11 +08:00
|
|
|
def GnuExtensions : StandardSpec<"GNUExtensions"> {
|
2021-01-13 06:37:56 +08:00
|
|
|
HeaderSpec CType = HeaderSpec<
|
|
|
|
"ctype.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"toascii",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2020-03-25 13:29:11 +08:00
|
|
|
HeaderSpec Math = HeaderSpec<
|
|
|
|
"math.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"sincosf",
|
|
|
|
RetValSpec<VoidType>,
|
|
|
|
[ArgSpec<FloatType>, ArgSpec<FloatPtr>, ArgSpec<FloatPtr>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
2020-07-25 02:31:27 +08:00
|
|
|
|
|
|
|
HeaderSpec String = HeaderSpec<
|
|
|
|
"string.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"memrchr",
|
|
|
|
RetValSpec<VoidPtr>,
|
|
|
|
[ArgSpec<VoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
2020-03-25 13:29:11 +08:00
|
|
|
|
2021-09-10 03:11:54 +08:00
|
|
|
HeaderSpec FEnv = HeaderSpec<
|
|
|
|
"fenv.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"fedisableexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"feenableexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"fegetexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[]
|
|
|
|
>
|
|
|
|
]
|
|
|
|
>;
|
2021-01-13 06:37:56 +08:00
|
|
|
|
2022-04-19 15:36:43 +08:00
|
|
|
HeaderSpec StdIO = HeaderSpec<
|
|
|
|
"stdio.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"fread_unlocked",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<VoidRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<FILERestrictedPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"fwrite_unlocked",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<ConstVoidRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<FILERestrictedPtr>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2020-03-25 13:29:11 +08:00
|
|
|
let Headers = [
|
2021-01-13 06:37:56 +08:00
|
|
|
CType,
|
2021-09-10 03:11:54 +08:00
|
|
|
FEnv,
|
2022-04-19 15:36:43 +08:00
|
|
|
Math,
|
|
|
|
StdIO,
|
2021-01-13 06:37:56 +08:00
|
|
|
String,
|
2020-03-25 13:29:11 +08:00
|
|
|
];
|
|
|
|
}
|