diff --git a/inc/errno.h b/inc/errno.h index d0c52aa..e9fae4b 100644 --- a/inc/errno.h +++ b/inc/errno.h @@ -7,3 +7,7 @@ // TODO: figure out why _Thread_local doesn't work extern _Thread_local int errno; + +#if __STDC_WANT_LIB_EXT1__ == 1 + typedef int errno_t; +#endif diff --git a/inc/stddef.h b/inc/stddef.h index 26922a0..f562749 100644 --- a/inc/stddef.h +++ b/inc/stddef.h @@ -19,3 +19,6 @@ typedef int wchar_t; #endif +#if __STDC_WANT_LIB_EXT1__ == 1 + typedef size_t rsize_t; +#endif diff --git a/inc/stdint.h b/inc/stdint.h index 8b6e28a..a1af872 100644 --- a/inc/stdint.h +++ b/inc/stdint.h @@ -143,3 +143,11 @@ typedef uint64_t uintmax_t; #if defined(_WIN32) #define UINT64_C(lit) lit ## ull #endif + +#if __STDC_WANT_LIB_EXT1__ == 1 + #if defined(_WIN32) + #define RSIZE_MAX 0xffffffffffffull; + #else + #define RSIZE_MAX 0xfffffffffffful; + #endif +#endif