diff --git a/inc/errno.h b/inc/errno.h index d1eb6bd..d0c52aa 100644 --- a/inc/errno.h +++ b/inc/errno.h @@ -1,12 +1,9 @@ #pragma once -#if defined (_MSC_VER) - #define _Thread_local __declspec(thread) -#endif - #define EDOM 1 #define EILSEQ 2 #define ERANGE 3 +// TODO: figure out why _Thread_local doesn't work extern _Thread_local int errno; diff --git a/inc/float.h b/inc/float.h index 21bc7ef..78c5322 100644 --- a/inc/float.h +++ b/inc/float.h @@ -19,7 +19,7 @@ #define FLT_HAS_SUBNORM 1 #define DBL_DECIMAL_DIG 10 -#define DBL_MIN 0x1.0000000000000p-1021 +#define DBL_MIN 0x1.0000000000000p-1022 #define DBL_MAX 0x1.fffffffffffffp+1023 #define DBL_TRUE_MIN 0x1.0000000000000p-1074 #define DBL_EPSILON 0x1.0000000000001p+0 diff --git a/inc/threads.h b/inc/threads.h index 8acbf32..b533268 100644 --- a/inc/threads.h +++ b/inc/threads.h @@ -1,9 +1,5 @@ #pragma once -#if defined(_WIN32) - #define _Thread_local __declspec(thread) -#endif - #define thread_local _Thread_local #define ONCE_FLAG_INIT 1 diff --git a/test.cmd b/test.cmd index 09d65ed..a1c4583 100644 --- a/test.cmd +++ b/test.cmd @@ -1,2 +1,2 @@ -clang test\%1 utf8.obj -Iinc -g -lciabatta.lib -nostdlib \ No newline at end of file +clang -std=c11 test\%1 utf8.obj -Iinc -g -lciabatta.lib -nostdlib \ No newline at end of file