2020-03-25 13:29:11 +08:00
|
|
|
def GnuExtensions : StandardSpec<"GNUExtensions"> {
|
2022-04-20 06:06:07 +08:00
|
|
|
NamedType CookieIOFunctionsT = NamedType<"cookie_io_functions_t">;
|
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
|
2022-04-20 06:06:07 +08:00
|
|
|
[CookieIOFunctionsT], // Types
|
2022-04-19 15:36:43 +08:00
|
|
|
[], // Enumerations
|
|
|
|
[
|
2022-04-23 07:32:42 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"clearerr_unlocked",
|
|
|
|
RetValSpec<VoidType>,
|
|
|
|
[ArgSpec<FILEPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"feof_unlocked",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<FILEPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"ferror_unlocked",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<FILEPtr>]
|
|
|
|
>,
|
2022-04-20 06:06:07 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"fopencookie",
|
|
|
|
RetValSpec<FILEPtr>,
|
|
|
|
[ArgSpec<VoidPtr>, ArgSpec<ConstCharPtr>, ArgSpec<CookieIOFunctionsT>]
|
|
|
|
>,
|
2022-04-19 15:36:43 +08:00
|
|
|
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>]
|
|
|
|
>,
|
|
|
|
]
|
2022-04-20 06:06:07 +08:00
|
|
|
>;
|
2022-04-19 15:36:43 +08:00
|
|
|
|
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
|
|
|
];
|
|
|
|
}
|