def StdC : StandardSpec<"stdc"> { ConstType ConstVoidPtr = ConstType; RestrictedPtrType VoidRestrictedPtr = RestrictedPtrType; ConstType ConstVoidRestrictedPtr = ConstType; PtrType CharPtr = PtrType; ConstType ConstCharPtr = ConstType; RestrictedPtrType CharRestrictedPtr = RestrictedPtrType; ConstType ConstCharRestrictedPtr = ConstType; HeaderSpec String = HeaderSpec< "string.h", [ Macro<"NULL">, ], [ SizeTType, ], [ 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", [], // Macros [ NamedType<"float_t">, NamedType<"double_t">, ], [ FunctionSpec<"acos", RetValSpec, [ArgSpec]>, FunctionSpec<"acosl", RetValSpec, [ArgSpec]>, ] >; HeaderSpec StdIO = HeaderSpec< "stdio.h", [], // Macros [ // Types SizeTType, ], [ FunctionSpec< "snprintf", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec Errno = HeaderSpec< "errno.h", [ Macro<"errno">, Macro<"EDOM">, Macro<"EILSEQ">, Macro<"ERANGE">, ], [], // Types [] // Functions >; let Headers = [ Errno, Math, String, StdIO, ]; }