Some type declarations for __STDC_WANT_LIB_EXT1__

This commit is contained in:
bumbread 2022-08-10 17:12:33 +11:00
parent f080d67c46
commit 0c9875c53c
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -19,3 +19,6 @@
typedef int wchar_t;
#endif
#if __STDC_WANT_LIB_EXT1__ == 1
typedef size_t rsize_t;
#endif

View File

@ -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