def StdC : StandardSpec<"stdc"> { NamedType FILE = NamedType<"FILE">; PtrType FILEPtr = PtrType; RestrictedPtrType FILERestrictedPtr = RestrictedPtrType; NamedType StructTmType = NamedType<"struct tm">; PtrType StructTmPtr = PtrType; HeaderSpec Assert = HeaderSpec< "assert.h", [ Macro<"static_assert">, Macro<"assert">, ], [], // Types [], // Enumerations [] >; HeaderSpec CType = HeaderSpec< "ctype.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec< "isalnum", RetValSpec, [ArgSpec] >, FunctionSpec< "isalpha", RetValSpec, [ArgSpec] >, FunctionSpec< "isblank", RetValSpec, [ArgSpec] >, FunctionSpec< "iscntrl", RetValSpec, [ArgSpec] >, FunctionSpec< "isdigit", RetValSpec, [ArgSpec] >, FunctionSpec< "isgraph", RetValSpec, [ArgSpec] >, FunctionSpec< "islower", RetValSpec, [ArgSpec] >, FunctionSpec< "isprint", RetValSpec, [ArgSpec] >, FunctionSpec< "ispunct", RetValSpec, [ArgSpec] >, FunctionSpec< "isspace", RetValSpec, [ArgSpec] >, FunctionSpec< "isupper", RetValSpec, [ArgSpec] >, FunctionSpec< "isxdigit", RetValSpec, [ArgSpec] >, FunctionSpec< "tolower", RetValSpec, [ArgSpec] >, FunctionSpec< "toupper", RetValSpec, [ArgSpec] >, ] >; 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, [ArgSpec] >, FunctionSpec< "fetestexcept", RetValSpec, [ArgSpec] >, FunctionSpec< "feraiseexcept", RetValSpec, [ArgSpec] >, FunctionSpec< "fesetround", RetValSpec, [ArgSpec] >, FunctionSpec< "fegetround", RetValSpec, [] >, ] >; HeaderSpec String = HeaderSpec< "string.h", [ Macro<"NULL">, ], [ SizeTType, ], [], // Enumerations [ FunctionSpec< "memcpy", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "memmove", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "memcmp", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "memchr", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "memset", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strcpy", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strncpy", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strcat", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strncat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strcmp", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strcoll", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strncmp", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strxfrm", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strchr", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strcspn", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strpbrk", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strrchr", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strspn", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strstr", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strtok", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strerror", RetValSpec, [ArgSpec] >, FunctionSpec< "strlen", RetValSpec, [ArgSpec] >, ] >; HeaderSpec Math = HeaderSpec< "math.h", [ Macro<"MATH_ERRNO">, Macro<"MATH_ERREXCEPT">, Macro<"math_errhandling">, Macro<"INFINITY">, Macro<"NAN">, Macro<"FP_ILOGB0">, Macro<"FP_ILOGBNAN">, Macro<"isfinite">, Macro<"isinf">, Macro<"isnan">, ], [ NamedType<"float_t">, NamedType<"double_t">, ], [], // Enumerations [ FunctionSpec<"copysign", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"copysignf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"copysignl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"ceil", RetValSpec, [ArgSpec]>, FunctionSpec<"ceilf", RetValSpec, [ArgSpec]>, FunctionSpec<"ceill", RetValSpec, [ArgSpec]>, FunctionSpec<"fabs", RetValSpec, [ArgSpec]>, FunctionSpec<"fabsf", RetValSpec, [ArgSpec]>, FunctionSpec<"fabsl", RetValSpec, [ArgSpec]>, FunctionSpec<"fdim", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fdimf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fdiml", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"floor", RetValSpec, [ArgSpec]>, FunctionSpec<"floorf", RetValSpec, [ArgSpec]>, FunctionSpec<"floorl", RetValSpec, [ArgSpec]>, FunctionSpec<"fmin", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fminf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fminl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fmax", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fmaxf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"fmaxl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"frexp", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"frexpf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"frexpl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"hypot", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"hypotf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"ilogb", RetValSpec, [ArgSpec]>, FunctionSpec<"ilogbf", RetValSpec, [ArgSpec]>, FunctionSpec<"ilogbl", RetValSpec, [ArgSpec]>, FunctionSpec<"ldexp", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"ldexpf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"ldexpl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"logb", RetValSpec, [ArgSpec]>, FunctionSpec<"logbf", RetValSpec, [ArgSpec]>, FunctionSpec<"logbl", RetValSpec, [ArgSpec]>, FunctionSpec<"modf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"modff", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"modfl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"cosf", RetValSpec, [ArgSpec]>, FunctionSpec<"sinf", RetValSpec, [ArgSpec]>, FunctionSpec<"expf", RetValSpec, [ArgSpec]>, FunctionSpec<"exp2f", RetValSpec, [ArgSpec]>, FunctionSpec<"remainderf", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"remainder", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"remainderl", RetValSpec, [ArgSpec, ArgSpec]>, FunctionSpec<"remquof", RetValSpec, [ArgSpec, ArgSpec, ArgSpec]>, FunctionSpec<"remquo", RetValSpec, [ArgSpec, ArgSpec, ArgSpec]>, FunctionSpec<"remquol", RetValSpec, [ArgSpec, ArgSpec, ArgSpec]>, FunctionSpec<"round", RetValSpec, [ArgSpec]>, FunctionSpec<"roundf", RetValSpec, [ArgSpec]>, FunctionSpec<"roundl", RetValSpec, [ArgSpec]>, FunctionSpec<"sqrt", RetValSpec, [ArgSpec]>, FunctionSpec<"sqrtf", RetValSpec, [ArgSpec]>, FunctionSpec<"sqrtl", RetValSpec, [ArgSpec]>, FunctionSpec<"trunc", RetValSpec, [ArgSpec]>, FunctionSpec<"truncf", RetValSpec, [ArgSpec]>, FunctionSpec<"truncl", RetValSpec, [ArgSpec]>, ] >; HeaderSpec StdIO = HeaderSpec< "stdio.h", [], // Macros [ // Types SizeTType, FILE, ], [], // Enumerations [ FunctionSpec< "fwrite", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec StdLib = HeaderSpec< "stdlib.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec<"abort", RetValSpec, [ArgSpec]>, FunctionSpec<"_Exit", RetValSpec, [ArgSpec]>, ] >; HeaderSpec Errno = HeaderSpec< "errno.h", [ Macro<"errno">, Macro<"EDOM">, Macro<"EILSEQ">, Macro<"ERANGE">, ] >; 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, SigHandlerT, ], [], // Enumerations [ FunctionSpec<"raise", RetValSpec, [ArgSpec]>, FunctionSpec< "signal", RetValSpec, [ArgSpec, ArgSpec] >, ] >; HeaderSpec Threads = HeaderSpec< "threads.h", [ Macro<"ONCE_FLAG_INIT">, ], [ OnceFlagType, CallOnceFuncType, 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">, ], [ FunctionSpec< "call_once", RetValSpec, [ ArgSpec, ArgSpec, ] >, FunctionSpec< "mtx_init", RetValSpec, [ ArgSpec, ArgSpec, ] >, FunctionSpec< "mtx_lock", RetValSpec, [ ArgSpec, ] >, FunctionSpec< "mtx_unlock", RetValSpec, [ ArgSpec, ] >, FunctionSpec< "thrd_create", RetValSpec, [ ArgSpec, ArgSpec, ArgSpec, ] >, FunctionSpec< "thrd_join", RetValSpec, [ ArgSpec, ArgSpec, ] > ] >; HeaderSpec Time = HeaderSpec< "time.h", [], // Macros [ // Types StructTmType, TimeTType, ], [], // Enumerations [ FunctionSpec< "mktime", RetValSpec, [ArgSpec] >, ] >; let Headers = [ Assert, CType, Errno, Fenv, Math, String, StdIO, StdLib, Signal, Threads, Time, ]; }