2019-11-06 03:40:26 +08:00
|
|
|
def StdC : StandardSpec<"stdc"> {
|
2020-03-23 02:15:47 +08:00
|
|
|
|
2020-04-14 16:02:27 +08:00
|
|
|
NamedType FILE = NamedType<"FILE">;
|
|
|
|
PtrType FILEPtr = PtrType<FILE>;
|
|
|
|
RestrictedPtrType FILERestrictedPtr = RestrictedPtrType<FILE>;
|
2020-12-01 13:06:47 +08:00
|
|
|
NamedType StructTmType = NamedType<"struct tm">;
|
|
|
|
PtrType StructTmPtr = PtrType<StructTmType>;
|
2020-04-14 16:02:27 +08:00
|
|
|
|
2020-03-12 11:45:58 +08:00
|
|
|
HeaderSpec Assert = HeaderSpec<
|
|
|
|
"assert.h",
|
|
|
|
[
|
|
|
|
Macro<"static_assert">,
|
|
|
|
Macro<"assert">,
|
|
|
|
],
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[]
|
|
|
|
>;
|
2020-07-29 07:12:17 +08:00
|
|
|
|
|
|
|
HeaderSpec CType = HeaderSpec<
|
|
|
|
"ctype.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
2020-07-31 00:36:28 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isalnum",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-07-29 07:12:17 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isalpha",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 02:55:12 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isblank",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"iscntrl",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-07-31 00:36:28 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isdigit",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 02:55:12 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isgraph",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-01 02:04:36 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"islower",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 22:42:30 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isprint",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 02:55:12 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"ispunct",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 22:42:30 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isspace",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-01 02:04:36 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isupper",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-05 22:42:30 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"isxdigit",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-08-07 03:21:07 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"tolower",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"toupper",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
2020-07-29 07:12:17 +08:00
|
|
|
]
|
|
|
|
>;
|
2020-12-02 03:39:48 +08:00
|
|
|
|
|
|
|
HeaderSpec Fenv = HeaderSpec<
|
|
|
|
"fenv.h",
|
|
|
|
[
|
|
|
|
Macro<"FE_DIVBYZERO">,
|
|
|
|
Macro<"FE_INEXACT">,
|
|
|
|
Macro<"FE_INVALID">,
|
|
|
|
Macro<"FE_OVERFLOW">,
|
|
|
|
Macro<"FE_UNDERFLOW">,
|
|
|
|
Macro<"FE_ALL_EXCEPT">,
|
|
|
|
|
|
|
|
Macro<"FE_DOWNWARD">,
|
|
|
|
Macro<"FE_TONEAREST">,
|
|
|
|
Macro<"FE_TOWARDZERO">,
|
|
|
|
Macro<"FE_UPWARD">
|
|
|
|
],
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"feclearexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"fetestexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"feraiseexcept",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"fesetround",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"fegetround",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2019-11-06 03:40:26 +08:00
|
|
|
HeaderSpec String = HeaderSpec<
|
|
|
|
"string.h",
|
|
|
|
[
|
|
|
|
Macro<"NULL">,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
SizeTType,
|
|
|
|
],
|
2020-02-28 06:30:24 +08:00
|
|
|
[], // Enumerations
|
2019-11-06 03:40:26 +08:00
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"memcpy",
|
|
|
|
RetValSpec<VoidPtr>,
|
|
|
|
[ArgSpec<VoidRestrictedPtr>,
|
|
|
|
ArgSpec<ConstVoidRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"memmove",
|
|
|
|
RetValSpec<VoidPtr>,
|
|
|
|
[ArgSpec<VoidPtr>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"memcmp",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<ConstVoidPtr>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"memchr",
|
|
|
|
RetValSpec<VoidPtr>,
|
|
|
|
[ArgSpec<ConstVoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"memset",
|
|
|
|
RetValSpec<VoidPtr>,
|
|
|
|
[ArgSpec<VoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strcpy",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<CharRestrictedPtr>, ArgSpec<ConstCharRestrictedPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strncpy",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<CharRestrictedPtr>,
|
|
|
|
ArgSpec<ConstCharRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strcat",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<CharRestrictedPtr>, ArgSpec<ConstCharRestrictedPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strncat",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<CharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strcmp",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strcoll",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strncmp",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strxfrm",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<CharRestrictedPtr>,
|
|
|
|
ArgSpec<ConstCharRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strchr",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strcspn",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strpbrk",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strrchr",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strspn",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strstr",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strtok",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<CharRestrictedPtr>, ArgSpec<ConstCharRestrictedPtr>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strerror",
|
|
|
|
RetValSpec<CharPtr>,
|
|
|
|
[ArgSpec<IntType>]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"strlen",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<ConstCharPtr>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
|
|
|
HeaderSpec Math = HeaderSpec<
|
|
|
|
"math.h",
|
2020-03-25 01:52:56 +08:00
|
|
|
[
|
|
|
|
Macro<"MATH_ERRNO">,
|
|
|
|
Macro<"MATH_ERREXCEPT">,
|
|
|
|
Macro<"math_errhandling">,
|
|
|
|
|
|
|
|
Macro<"INFINITY">,
|
|
|
|
Macro<"NAN">,
|
|
|
|
|
2020-11-04 08:30:16 +08:00
|
|
|
Macro<"FP_ILOGB0">,
|
|
|
|
Macro<"FP_ILOGBNAN">,
|
|
|
|
|
2020-03-25 01:52:56 +08:00
|
|
|
Macro<"isfinite">,
|
|
|
|
Macro<"isinf">,
|
|
|
|
Macro<"isnan">,
|
|
|
|
],
|
2019-11-06 03:40:26 +08:00
|
|
|
[
|
|
|
|
NamedType<"float_t">,
|
|
|
|
NamedType<"double_t">,
|
|
|
|
],
|
2020-02-28 06:30:24 +08:00
|
|
|
[], // Enumerations
|
2019-11-06 03:40:26 +08:00
|
|
|
[
|
2020-06-03 05:04:57 +08:00
|
|
|
FunctionSpec<"copysign", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"copysignf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
2020-06-20 04:08:10 +08:00
|
|
|
FunctionSpec<"copysignl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
|
2020-06-03 05:04:57 +08:00
|
|
|
|
2020-06-04 13:39:34 +08:00
|
|
|
FunctionSpec<"ceil", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"ceilf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-26 03:09:02 +08:00
|
|
|
FunctionSpec<"ceill", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2020-06-04 13:39:34 +08:00
|
|
|
|
2020-05-09 14:19:17 +08:00
|
|
|
FunctionSpec<"fabs", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"fabsf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-09 02:11:49 +08:00
|
|
|
FunctionSpec<"fabsl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2020-05-09 14:19:17 +08:00
|
|
|
|
2020-11-18 23:28:51 +08:00
|
|
|
FunctionSpec<"fdim", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"fdimf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"fdiml", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
|
2020-11-06 03:55:46 +08:00
|
|
|
|
2020-06-04 13:39:34 +08:00
|
|
|
FunctionSpec<"floor", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"floorf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-26 03:09:02 +08:00
|
|
|
FunctionSpec<"floorl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2020-06-04 13:39:34 +08:00
|
|
|
|
2020-07-10 03:30:29 +08:00
|
|
|
FunctionSpec<"fmin", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"fminf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"fminl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-07-23 14:04:33 +08:00
|
|
|
FunctionSpec<"fmax", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"fmaxf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"fmaxl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-06-03 05:04:57 +08:00
|
|
|
FunctionSpec<"frexp", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<IntPtr>]>,
|
|
|
|
FunctionSpec<"frexpf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<IntPtr>]>,
|
2020-06-20 04:08:10 +08:00
|
|
|
FunctionSpec<"frexpl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<IntPtr>]>,
|
2020-06-03 05:04:57 +08:00
|
|
|
|
2020-09-18 11:22:18 +08:00
|
|
|
FunctionSpec<"hypot", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
2020-08-13 09:18:28 +08:00
|
|
|
FunctionSpec<"hypotf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
|
|
|
|
2020-11-04 08:30:16 +08:00
|
|
|
FunctionSpec<"ilogb", RetValSpec<IntType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"ilogbf", RetValSpec<IntType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"ilogbl", RetValSpec<IntType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-11-05 14:34:06 +08:00
|
|
|
FunctionSpec<"ldexp", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<IntType>]>,
|
|
|
|
FunctionSpec<"ldexpf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<IntType>]>,
|
|
|
|
FunctionSpec<"ldexpl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<IntType>]>,
|
|
|
|
|
2020-06-03 05:04:57 +08:00
|
|
|
FunctionSpec<"logb", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"logbf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-20 04:08:10 +08:00
|
|
|
FunctionSpec<"logbl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2020-06-03 05:04:57 +08:00
|
|
|
|
|
|
|
FunctionSpec<"modf", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoublePtr>]>,
|
|
|
|
FunctionSpec<"modff", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatPtr>]>,
|
2020-06-20 04:08:10 +08:00
|
|
|
FunctionSpec<"modfl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoublePtr>]>,
|
2020-06-03 05:04:57 +08:00
|
|
|
|
2020-03-25 01:52:56 +08:00
|
|
|
FunctionSpec<"cosf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"sinf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
|
2020-04-28 02:32:11 +08:00
|
|
|
FunctionSpec<"expf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"exp2f", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
|
2020-08-18 07:24:45 +08:00
|
|
|
FunctionSpec<"remainderf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"remainder", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"remainderl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
|
|
|
|
|
|
|
|
FunctionSpec<"remquof", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>, ArgSpec<IntPtr>]>,
|
|
|
|
FunctionSpec<"remquo", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>, ArgSpec<IntPtr>]>,
|
|
|
|
FunctionSpec<"remquol", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>, ArgSpec<IntPtr>]>,
|
|
|
|
|
2020-03-25 01:52:56 +08:00
|
|
|
FunctionSpec<"round", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
2020-05-29 14:03:32 +08:00
|
|
|
FunctionSpec<"roundf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-26 03:09:02 +08:00
|
|
|
FunctionSpec<"roundl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2020-06-04 13:39:34 +08:00
|
|
|
|
2020-12-09 13:44:22 +08:00
|
|
|
FunctionSpec<"lround", RetValSpec<LongType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"lroundf", RetValSpec<LongType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"lroundl", RetValSpec<LongType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
|
|
|
FunctionSpec<"llround", RetValSpec<LongLongType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"llroundf", RetValSpec<LongLongType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"llroundl", RetValSpec<LongLongType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-12-22 01:16:41 +08:00
|
|
|
FunctionSpec<"rint", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"rintf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"rintl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
|
|
|
FunctionSpec<"lrint", RetValSpec<LongType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"lrintf", RetValSpec<LongType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"lrintl", RetValSpec<LongType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
|
|
|
FunctionSpec<"llrint", RetValSpec<LongLongType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"llrintf", RetValSpec<LongLongType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"llrintl", RetValSpec<LongLongType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-07-28 13:41:36 +08:00
|
|
|
FunctionSpec<"sqrt", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"sqrtf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"sqrtl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
|
|
|
|
2020-06-04 13:39:34 +08:00
|
|
|
FunctionSpec<"trunc", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"truncf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
2020-06-09 02:11:49 +08:00
|
|
|
FunctionSpec<"truncl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2021-01-02 13:19:31 +08:00
|
|
|
|
|
|
|
FunctionSpec<"nearbyint", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
|
|
|
|
FunctionSpec<"nearbyintf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
|
|
|
|
FunctionSpec<"nearbyintl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
|
2019-11-06 03:40:26 +08:00
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
|
|
|
HeaderSpec StdIO = HeaderSpec<
|
|
|
|
"stdio.h",
|
|
|
|
[], // Macros
|
|
|
|
[ // Types
|
|
|
|
SizeTType,
|
2020-04-14 16:02:27 +08:00
|
|
|
FILE,
|
2019-11-06 03:40:26 +08:00
|
|
|
],
|
2020-02-28 06:30:24 +08:00
|
|
|
[], // Enumerations
|
2019-11-06 03:40:26 +08:00
|
|
|
[
|
|
|
|
FunctionSpec<
|
2020-04-14 16:02:27 +08:00
|
|
|
"fwrite",
|
|
|
|
RetValSpec<SizeTType>,
|
|
|
|
[ArgSpec<ConstVoidRestrictedPtr>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<SizeTType>,
|
|
|
|
ArgSpec<FILERestrictedPtr>]
|
2019-11-06 03:40:26 +08:00
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2020-03-06 03:21:18 +08:00
|
|
|
HeaderSpec StdLib = HeaderSpec<
|
|
|
|
"stdlib.h",
|
|
|
|
[], // Macros
|
|
|
|
[], // Types
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<"abort", RetValSpec<NoReturn>, [ArgSpec<VoidType>]>,
|
2020-12-03 20:17:24 +08:00
|
|
|
FunctionSpec<"abs", RetValSpec<IntType>, [ArgSpec<IntType>]>,
|
|
|
|
FunctionSpec<"labs", RetValSpec<LongType>, [ArgSpec<LongType>]>,
|
|
|
|
FunctionSpec<"llabs", RetValSpec<LongLongType>, [ArgSpec<LongLongType>]>,
|
2020-03-06 03:21:18 +08:00
|
|
|
FunctionSpec<"_Exit", RetValSpec<NoReturn>, [ArgSpec<IntType>]>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2019-12-06 04:09:24 +08:00
|
|
|
HeaderSpec Errno = HeaderSpec<
|
|
|
|
"errno.h",
|
|
|
|
[
|
|
|
|
Macro<"errno">,
|
|
|
|
Macro<"EDOM">,
|
|
|
|
Macro<"EILSEQ">,
|
|
|
|
Macro<"ERANGE">,
|
2020-02-28 06:30:24 +08:00
|
|
|
]
|
2019-12-06 04:09:24 +08:00
|
|
|
>;
|
|
|
|
|
2020-02-21 03:05:34 +08:00
|
|
|
HeaderSpec Signal = HeaderSpec<
|
|
|
|
"signal.h",
|
|
|
|
[
|
|
|
|
Macro<"SIG_BLOCK">,
|
|
|
|
Macro<"SIG_UNBLOCK">,
|
|
|
|
Macro<"SIG_SETMASK">,
|
|
|
|
|
|
|
|
Macro<"SIGABRT">,
|
|
|
|
Macro<"SIGFPE">,
|
|
|
|
Macro<"SIGILL">,
|
|
|
|
Macro<"SIGINT">,
|
|
|
|
Macro<"SIGSEGV">,
|
|
|
|
Macro<"SIGTERM">
|
|
|
|
],
|
|
|
|
[
|
|
|
|
SizeTType,
|
2020-03-23 02:15:47 +08:00
|
|
|
SigHandlerT,
|
2020-02-21 03:05:34 +08:00
|
|
|
],
|
2020-02-28 06:30:24 +08:00
|
|
|
[], // Enumerations
|
2020-02-21 03:05:34 +08:00
|
|
|
[
|
|
|
|
FunctionSpec<"raise", RetValSpec<IntType>, [ArgSpec<IntType>]>,
|
2020-03-23 02:15:47 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"signal",
|
|
|
|
RetValSpec<SigHandlerT>,
|
|
|
|
[ArgSpec<IntType>, ArgSpec<SigHandlerT>]
|
|
|
|
>,
|
2020-02-21 03:05:34 +08:00
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2020-02-28 06:30:24 +08:00
|
|
|
HeaderSpec Threads = HeaderSpec<
|
|
|
|
"threads.h",
|
|
|
|
[
|
2020-05-13 07:01:28 +08:00
|
|
|
Macro<"ONCE_FLAG_INIT">,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
OnceFlagType,
|
|
|
|
CallOnceFuncType,
|
2020-02-28 06:30:24 +08:00
|
|
|
MtxTType,
|
|
|
|
ThrdStartTType,
|
|
|
|
ThrdTType,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
EnumeratedNameValue<"mtx_plain">,
|
|
|
|
EnumeratedNameValue<"mtx_recursive">,
|
|
|
|
EnumeratedNameValue<"mtx_timed">,
|
|
|
|
EnumeratedNameValue<"thrd_timedout">,
|
|
|
|
EnumeratedNameValue<"thrd_success">,
|
|
|
|
EnumeratedNameValue<"thrd_busy">,
|
|
|
|
EnumeratedNameValue<"thrd_error">,
|
|
|
|
EnumeratedNameValue<"thrd_nomem">,
|
|
|
|
],
|
|
|
|
[
|
2020-05-13 07:01:28 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"call_once",
|
|
|
|
RetValSpec<VoidType>,
|
|
|
|
[
|
|
|
|
ArgSpec<OnceFlagTypePtr>,
|
|
|
|
ArgSpec<CallOnceFuncType>,
|
|
|
|
]
|
|
|
|
>,
|
2020-02-28 06:30:24 +08:00
|
|
|
FunctionSpec<
|
|
|
|
"mtx_init",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[
|
|
|
|
ArgSpec<MtxTTypePtr>,
|
|
|
|
ArgSpec<IntType>,
|
|
|
|
]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"mtx_lock",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[
|
|
|
|
ArgSpec<MtxTTypePtr>,
|
|
|
|
]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"mtx_unlock",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[
|
|
|
|
ArgSpec<MtxTTypePtr>,
|
|
|
|
]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"thrd_create",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[
|
|
|
|
ArgSpec<ThrdTTypePtr>,
|
|
|
|
ArgSpec<ThrdStartTType>,
|
|
|
|
ArgSpec<VoidPtr>,
|
|
|
|
]
|
|
|
|
>,
|
|
|
|
FunctionSpec<
|
|
|
|
"thrd_join",
|
|
|
|
RetValSpec<IntType>,
|
|
|
|
[
|
|
|
|
ArgSpec<ThrdTTypePtr>,
|
|
|
|
ArgSpec<IntPtr>,
|
|
|
|
]
|
|
|
|
>
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2020-12-01 13:06:47 +08:00
|
|
|
HeaderSpec Time = HeaderSpec<
|
|
|
|
"time.h",
|
|
|
|
[], // Macros
|
|
|
|
[ // Types
|
|
|
|
StructTmType,
|
|
|
|
TimeTType,
|
|
|
|
],
|
|
|
|
[], // Enumerations
|
|
|
|
[
|
|
|
|
FunctionSpec<
|
|
|
|
"mktime",
|
|
|
|
RetValSpec<TimeTType>,
|
|
|
|
[ArgSpec<StructTmPtr>]
|
|
|
|
>,
|
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2019-11-06 03:40:26 +08:00
|
|
|
let Headers = [
|
2020-03-12 11:45:58 +08:00
|
|
|
Assert,
|
2020-07-29 07:12:17 +08:00
|
|
|
CType,
|
2019-12-06 04:09:24 +08:00
|
|
|
Errno,
|
2020-12-02 03:39:48 +08:00
|
|
|
Fenv,
|
2019-11-06 03:40:26 +08:00
|
|
|
Math,
|
|
|
|
String,
|
|
|
|
StdIO,
|
2020-03-06 03:21:18 +08:00
|
|
|
StdLib,
|
2020-02-21 03:05:34 +08:00
|
|
|
Signal,
|
2020-02-28 06:30:24 +08:00
|
|
|
Threads,
|
2020-12-01 13:06:47 +08:00
|
|
|
Time,
|
2019-11-06 03:40:26 +08:00
|
|
|
];
|
|
|
|
}
|