From 7321c40065d7b09fdf2958699bffddf12530c702 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:03:34 +0200 Subject: [PATCH 01/15] win32: do not redefine mode_t with conflicting type on MinGW --- src/include/win/port_win.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/win/port_win.h b/src/include/win/port_win.h index 790a8fe3..5dd02edd 100644 --- a/src/include/win/port_win.h +++ b/src/include/win/port_win.h @@ -74,7 +74,9 @@ typedef __int64_t int64_t; typedef __uint64_t uint64_t; typedef long off_t; +#if !defined(__MINGW32__) typedef int mode_t; +#endif typedef long _off_t; typedef long int __loff_t; typedef unsigned long DWORD; From 4590dfb23ba4b89c6559fe9ee06900200f1048c0 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:04:53 +0200 Subject: [PATCH 02/15] win32: include stdint for INT64_MAX --- src/include/portability.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/portability.h b/src/include/portability.h index d0360ebf..ec5ea772 100644 --- a/src/include/portability.h +++ b/src/include/portability.h @@ -16,6 +16,7 @@ #ifndef NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_H_ #define NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_H_ 1 +#include #include #include "native_client/src/include/build_config.h" From 1f919a476c9ace626d1fb37c842404f0c9cd9e63 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:05:21 +0200 Subject: [PATCH 03/15] win32: use lowercase header file name --- src/shared/platform/win/lock_impl.h | 2 +- src/shared/platform/win/xlate_system_error.c | 2 +- src/trusted/validator/validation_cache.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/platform/win/lock_impl.h b/src/shared/platform/win/lock_impl.h index cb5f98b8..9024ea3a 100644 --- a/src/shared/platform/win/lock_impl.h +++ b/src/shared/platform/win/lock_impl.h @@ -8,7 +8,7 @@ #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_LOCK_IMPL_H_ #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_LOCK_IMPL_H_ -#include +#include #include "native_client/src/include/nacl_macros.h" #include "native_client/src/shared/platform/nacl_sync.h" diff --git a/src/shared/platform/win/xlate_system_error.c b/src/shared/platform/win/xlate_system_error.c index cfaca7c2..b9d51f34 100644 --- a/src/shared/platform/win/xlate_system_error.c +++ b/src/shared/platform/win/xlate_system_error.c @@ -9,7 +9,7 @@ */ #include -#include +#include #include "native_client/src/shared/platform/nacl_log.h" #include "native_client/src/shared/platform/win/xlate_system_error.h" diff --git a/src/trusted/validator/validation_cache.c b/src/trusted/validator/validation_cache.c index b9d9536b..f8ce53e9 100644 --- a/src/trusted/validator/validation_cache.c +++ b/src/trusted/validator/validation_cache.c @@ -21,7 +21,7 @@ #include "native_client/src/trusted/validator/validation_metadata.h" #if NACL_WINDOWS -#include +#include #include #endif From a714bdcb8eda72c2335a6276b4a8440bb55267bf Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:26:48 +0200 Subject: [PATCH 04/15] win32: use __inline__ instead of __forceinline__ on MinGW --- src/include/nacl_compiler_annotations.h | 2 +- src/trusted/validator_ragel/bitmap.h | 2 +- src/trusted/validator_ragel/decoding.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/nacl_compiler_annotations.h b/src/include/nacl_compiler_annotations.h index c9baad67..2f8a0552 100644 --- a/src/include/nacl_compiler_annotations.h +++ b/src/include/nacl_compiler_annotations.h @@ -10,7 +10,7 @@ #include "native_client/src/include/build_config.h" /* MSVC supports "inline" only in C++ */ -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSC_VER) # define INLINE __forceinline #else # define INLINE __inline__ diff --git a/src/trusted/validator_ragel/bitmap.h b/src/trusted/validator_ragel/bitmap.h index dec2a0d2..b39523cb 100644 --- a/src/trusted/validator_ragel/bitmap.h +++ b/src/trusted/validator_ragel/bitmap.h @@ -15,7 +15,7 @@ #include "native_client/src/include/nacl_macros.h" #include "native_client/src/include/portability.h" -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSC_VER) # define FORCEINLINE __forceinline #else # define FORCEINLINE __inline __attribute__ ((always_inline)) diff --git a/src/trusted/validator_ragel/decoding.h b/src/trusted/validator_ragel/decoding.h index 64087b76..9e5d531e 100644 --- a/src/trusted/validator_ragel/decoding.h +++ b/src/trusted/validator_ragel/decoding.h @@ -19,7 +19,7 @@ #include "native_client/src/include/build_config.h" #include "native_client/src/trusted/validator_ragel/decoder.h" -#if NACL_WINDOWS +#if NACL_WINDOWS && !defined(__GNUC__) # define FORCEINLINE __forceinline #else # define FORCEINLINE __inline __attribute__ ((always_inline)) From 1aa9fe68a6e4ca5f8f90fd483f161decfc1edb3e Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:27:54 +0200 Subject: [PATCH 05/15] win32: do not use non-standard i64 integer suffix on MinGW --- src/include/portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/portability.h b/src/include/portability.h index ec5ea772..13441483 100644 --- a/src/include/portability.h +++ b/src/include/portability.h @@ -60,7 +60,7 @@ #define GG_UINT32_C(x) (x ## U) #define GG_UINT64_C(x) GG_ULONGLONG(x) -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSC_VER) #define GG_LONGLONG(x) x##I64 #define GG_ULONGLONG(x) x##UI64 #else From 51f577c700ea5e7af100203238a209067b3b2fa2 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:34:32 +0200 Subject: [PATCH 06/15] win32: do not declare PosixSignals enum on MinGW --- src/trusted/service_runtime/nacl_signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trusted/service_runtime/nacl_signal.h b/src/trusted/service_runtime/nacl_signal.h index e3a8fa17..2301ed40 100644 --- a/src/trusted/service_runtime/nacl_signal.h +++ b/src/trusted/service_runtime/nacl_signal.h @@ -58,7 +58,7 @@ struct NaClExceptionFrame; #define NACL_ABI_WIFSIGNALED(status) ((((status) + 1) & 0x7f) > 1) #define NACL_ABI_W_EXITCODE(ret, sig) ((((ret) & 0xff) << 8) + ((sig) & 0x7f)) -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSC_VER) enum PosixSignals { SIGINT = 2, SIGQUIT = 3, From f0e5657551329d553cd23c9f1050a1b89b87ba5b Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 09:37:05 +0200 Subject: [PATCH 07/15] win32: use GCC noinline on MinGW --- src/trusted/service_runtime/sel_ldr.c | 2 +- src/trusted/validator_ragel/decoding.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trusted/service_runtime/sel_ldr.c b/src/trusted/service_runtime/sel_ldr.c index 4dbc7611..7bcf97c2 100644 --- a/src/trusted/service_runtime/sel_ldr.c +++ b/src/trusted/service_runtime/sel_ldr.c @@ -912,7 +912,7 @@ void NaClVmIoPendingCheck_mu(struct NaClApp *nap, * We need its symbol in the symbol table so don't inline it. * TODO(dje): add some explanation for the non-GDB person. */ -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSVC_VER) __declspec(dllexport noinline) #endif #ifdef __GNUC__ diff --git a/src/trusted/validator_ragel/decoding.h b/src/trusted/validator_ragel/decoding.h index 9e5d531e..45541247 100644 --- a/src/trusted/validator_ragel/decoding.h +++ b/src/trusted/validator_ragel/decoding.h @@ -19,7 +19,7 @@ #include "native_client/src/include/build_config.h" #include "native_client/src/trusted/validator_ragel/decoder.h" -#if NACL_WINDOWS && !defined(__GNUC__) +#if NACL_WINDOWS && defined(_MSC_VER) # define FORCEINLINE __forceinline #else # define FORCEINLINE __inline __attribute__ ((always_inline)) From e043d29f61594b9b933c8efb1ea7a80b973d5023 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 11:02:41 +0200 Subject: [PATCH 08/15] win32: add and use a simplistic macamd64.inc --- include-hax/fake_masm/macamd64.inc | 9 +++++++++ .../arch/x86_64/nacl_switch_unwind_win.asm | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 include-hax/fake_masm/macamd64.inc diff --git a/include-hax/fake_masm/macamd64.inc b/include-hax/fake_masm/macamd64.inc new file mode 100644 index 00000000..970487f4 --- /dev/null +++ b/include-hax/fake_masm/macamd64.inc @@ -0,0 +1,9 @@ +push_reg macro Reg + push Reg + .pushreg Reg + endm + +alloc_stack macro Size + sub rsp, Size + .allocstack Size + endm diff --git a/src/trusted/service_runtime/arch/x86_64/nacl_switch_unwind_win.asm b/src/trusted/service_runtime/arch/x86_64/nacl_switch_unwind_win.asm index d5dd93a9..6ead0948 100644 --- a/src/trusted/service_runtime/arch/x86_64/nacl_switch_unwind_win.asm +++ b/src/trusted/service_runtime/arch/x86_64/nacl_switch_unwind_win.asm @@ -2,7 +2,7 @@ ; Use of this source code is governed by a BSD-style license that can be ; found in the LICENSE file. -include ksamd64.inc +include macamd64.inc EXTERN NaClSwitch : QWORD From b5f2355da1f737e5d2da7459f3fbe6589752dcce Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 11:30:35 +0200 Subject: [PATCH 09/15] win32: use asm intrinsics alternative to __halt() on MinGW --- src/shared/platform/win/nacl_exit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/platform/win/nacl_exit.c b/src/shared/platform/win/nacl_exit.c index a190175f..17c7741d 100644 --- a/src/shared/platform/win/nacl_exit.c +++ b/src/shared/platform/win/nacl_exit.c @@ -39,7 +39,11 @@ void NaClAbort(void) { * http://code.google.com/p/nativeclient/issues/detail?id=2772). */ while (1) { +#if defined(_MSC_VER) __halt(); +#else + __asm__("hlt"); +#endif } } From ad5559338ea5753b7e45adf5696149dc6f24d97e Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 12:21:33 +0200 Subject: [PATCH 10/15] win32: use posix intrinsics instead of MSVC asm code on i686 MinGW --- src/trusted/service_runtime/arch/x86_32/sel_rt_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trusted/service_runtime/arch/x86_32/sel_rt_32.c b/src/trusted/service_runtime/arch/x86_32/sel_rt_32.c index 5757b6c9..364aaadf 100644 --- a/src/trusted/service_runtime/arch/x86_32/sel_rt_32.c +++ b/src/trusted/service_runtime/arch/x86_32/sel_rt_32.c @@ -90,7 +90,7 @@ int NaClAppThreadInitArchSpecific(struct NaClAppThread *natp, * Save the system's state of the x87 FPU control word so we can restore * the same state when returning to trusted code. */ -#if NACL_WINDOWS +#if NACL_WINDOWS && defined(_MSC_VER) { uint16_t sys_fcw; __asm { From c656e2b9aecb3303dd6c658c70e82a3dace410b9 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 12:25:36 +0200 Subject: [PATCH 11/15] win32: skip some CPU detection on Windows with MinGW like 64-bit MSVC The only known working implementation is for i686 MSVC. - amd64 MSVC was already disabled and marked at not working, - there is no MinGW implementation in the code. --- src/trusted/platform_qualify/arch/x86/vcpuid.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/trusted/platform_qualify/arch/x86/vcpuid.c b/src/trusted/platform_qualify/arch/x86/vcpuid.c index dbefa9b1..17db404b 100644 --- a/src/trusted/platform_qualify/arch/x86/vcpuid.c +++ b/src/trusted/platform_qualify/arch/x86/vcpuid.c @@ -38,7 +38,15 @@ const int kMagicConst_ROUNDSS = 0xc0000000; const int kMagicConst_POPCNT = 13; const int kMagicConst_CRC32 = 0xb906c3ea; -#if !(NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64)) +#if (NACL_WINDOWS && defined(_MSC_VER) && (NACL_BUILD_SUBARCH == 64)) +# define NACL_WINDOWS_MSC_64 +#endif + +#if (NACL_WINDOWS && !defined(_MSC_VER)) +# define NACL_WINDOWS_MINGW +#endif + +#if !defined(NACL_WINDOWS_MSC_64) && !defined(NACL_WINDOWS_MINGW) static int asm_HasMMX(void) { volatile int before, after; before = kMagicConst; @@ -386,7 +394,7 @@ static int asm_HasCX8(void) { #endif /* 0 */ #endif /* 64-bit Windows */ -#if NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64) +#if defined(NACL_WINDOWS_MSC_64) || defined(NACL_WINDOWS_MINGW) static int CheckCPUFeatureDetection(NaClCPUFeaturesX86 *cpuf) { /* Unfortunately the asm_ tests will not work on 64-bit Windows */ return 0; From 84ce70fbd0105964b8f4ac0eabfd480c0a82117b Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 10 Dec 2025 09:16:48 +0100 Subject: [PATCH 12/15] win32: implement CPU detection for MinGW --- .../platform_qualify/arch/x86/vcpuid.c | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/src/trusted/platform_qualify/arch/x86/vcpuid.c b/src/trusted/platform_qualify/arch/x86/vcpuid.c index 17db404b..a5ec005d 100644 --- a/src/trusted/platform_qualify/arch/x86/vcpuid.c +++ b/src/trusted/platform_qualify/arch/x86/vcpuid.c @@ -46,7 +46,7 @@ const int kMagicConst_CRC32 = 0xb906c3ea; # define NACL_WINDOWS_MINGW #endif -#if !defined(NACL_WINDOWS_MSC_64) && !defined(NACL_WINDOWS_MINGW) +#if !defined(NACL_WINDOWS_MSC_64) static int asm_HasMMX(void) { volatile int before, after; before = kMagicConst; @@ -394,20 +394,34 @@ static int asm_HasCX8(void) { #endif /* 0 */ #endif /* 64-bit Windows */ -#if defined(NACL_WINDOWS_MSC_64) || defined(NACL_WINDOWS_MINGW) +#if defined(NACL_WINDOWS_MSC_64) static int CheckCPUFeatureDetection(NaClCPUFeaturesX86 *cpuf) { /* Unfortunately the asm_ tests will not work on 64-bit Windows */ return 0; } #else -#if (NACL_LINUX || NACL_OSX) +#if (NACL_LINUX || NACL_OSX || defined(NACL_WINDOWS_MINGW)) /* Linux/MacOS signal handling code, for trapping illegal instruction faults */ static int sawbadinstruction = 0; -static struct sigaction crash_detect; static int signum; -sigjmp_buf crash_load; +#if defined(NACL_WINDOWS_MINGW) +static PVOID crash_handler; +static jmp_buf crash_load; +#else +static struct sigaction crash_detect; +static sigjmp_buf crash_load; +#endif +#if defined(NACL_WINDOWS_MINGW) +static LONG CALLBACK handler_load(EXCEPTION_POINTERS *ep) +{ + if (ep->ExceptionRecord->ExceptionCode == EXCEPTION_ILLEGAL_INSTRUCTION) { + longjmp(crash_load, SIGILL); + } + return EXCEPTION_CONTINUE_SEARCH; +} +#else void handler_load(int signal_num) { siglongjmp(crash_load, signal_num); } @@ -435,13 +449,18 @@ void all_sigs(struct sigaction *new_action, (void) sigaction(SIGCHLD, &ign, 0); (void) sigaction(SIGTSTP, &ign, 0); } +#endif static void SignalInit(void) { sawbadinstruction = 0; +#if defined(NACL_WINDOWS_MINGW) + crash_handler = AddVectoredExceptionHandler(1, handler_load); +#else crash_detect.sa_handler = handler_load; sigemptyset(&crash_detect.sa_mask); crash_detect.sa_flags = SA_RESETHAND; all_sigs(&crash_detect, 0); +#endif } static void SetSawBadInst(void) { @@ -458,7 +477,13 @@ static int SawBadInst(void) { */ static int DoTest(int (*thetest)(void), const char *s) { SignalInit(); - if (0 != (signum = sigsetjmp(crash_load, 1))) { + +#if defined(NACL_WINDOWS_MINGW) + signum = setjmp(crash_load); +#else + signum = sigsetjmp(crash_load, 1); +#endif + if (0 != signum) { SetSawBadInst(); if (SIGILL == signum) { fprintf(stderr, "%s: illegal instruction\n", s); @@ -470,10 +495,16 @@ static int DoTest(int (*thetest)(void), const char *s) { int hasfeature = thetest(); if (hasfeature && (! SawBadInst())) { printf("[Has %s]\n", s); +#if defined(NACL_WINDOWS_MINGW) + RemoveVectoredExceptionHandler(crash_handler); +#endif return 0; } } printf("no %s\n", s); +#if defined(NACL_WINDOWS_MINGW) + RemoveVectoredExceptionHandler(crash_handler); +#endif return 1; } #elif NACL_WINDOWS From 3febe6eceb966d715d5f6c20a212b77c67989086 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 12:29:32 +0200 Subject: [PATCH 13/15] win32: do not use MSVC fast asm in port_win.c on i686 MinGW --- src/shared/platform/win/port_win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/platform/win/port_win.c b/src/shared/platform/win/port_win.c index 2f303ff1..d743bd1c 100644 --- a/src/shared/platform/win/port_win.c +++ b/src/shared/platform/win/port_win.c @@ -12,7 +12,7 @@ #include "native_client/src/include/portability.h" -#if ( DO_NOT_USE_FAST_ASSEMBLER_VERSION_FOR_FFS || defined(_WIN64) ) +#if ( DO_NOT_USE_FAST_ASSEMBLER_VERSION_FOR_FFS || defined(_WIN64) || !defined(_MSC_VER) ) int ffs(int x) { int r = 1; From 21afefeb1b5a9a3c817777af095aca07cc0e7a9f Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 9 Dec 2025 18:07:46 +0100 Subject: [PATCH 14/15] win32: silence some MSVC pragma and redefinitions on MinGW --- src/include/portability.h | 2 ++ src/include/portability_io.h | 4 ++++ src/include/portability_string.h | 2 ++ src/include/win/port_win.h | 6 +++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/include/portability.h b/src/include/portability.h index 13441483..42aab4d5 100644 --- a/src/include/portability.h +++ b/src/include/portability.h @@ -31,7 +31,9 @@ #if NACL_WINDOWS /* disable warnings for deprecated functions like getenv, etc. */ +#if defined(_MSC_VER) #pragma warning(disable : 4996) +#endif # include /* TODO: eliminate port_win.h */ # include "native_client/src/include/win/port_win.h" diff --git a/src/include/portability_io.h b/src/include/portability_io.h index 75eedbf1..8abafd02 100644 --- a/src/include/portability_io.h +++ b/src/include/portability_io.h @@ -17,7 +17,9 @@ #if NACL_WINDOWS /* disable warnings for deprecated _snprintf */ +#if defined(_MSC_VER) #pragma warning(disable : 4996) +#endif #include #include @@ -43,7 +45,9 @@ /* missing from win stdio.h and fcntl.h */ /* from bits/fcntl.h */ +#if defined(_MSC_VER) #define O_ACCMODE 0003 +#endif #else diff --git a/src/include/portability_string.h b/src/include/portability_string.h index 9b86ead9..1c499547 100644 --- a/src/include/portability_string.h +++ b/src/include/portability_string.h @@ -53,7 +53,9 @@ size_t strnlen(const char* str, size_t max); #if NACL_WINDOWS /* disable warnings for deprecated strncpy */ +#if defined(_MSC_VER) #pragma warning(disable : 4996) +#endif #define STRDUP _strdup #define STRTOLL _strtoi64 diff --git a/src/include/win/port_win.h b/src/include/win/port_win.h index 5dd02edd..2ab405ac 100644 --- a/src/include/win/port_win.h +++ b/src/include/win/port_win.h @@ -38,6 +38,7 @@ /* TODO: eliminated this file and move its contents to portability*.h */ +#if defined(_MSC_VER) /* wchar_t and unsigned short are not always equivalent*/ #pragma warning(disable : 4255) /* padding added after struct member */ @@ -46,6 +47,7 @@ #pragma warning(disable: 4826) /* conditional expression is constant */ #pragma warning(disable : 4127) +#endif /* TODO: limit this include to files that really need it */ #ifndef NOMINMAX @@ -96,7 +98,7 @@ typedef int32_t ssize_t; * * Only including range values actually used in our codebase. */ -#if _MSC_VER >= 1800 +#if !defined(_MSC_VER) || _MSC_VER >= 1800 #include #else # if !defined(UINT8_MAX) @@ -162,6 +164,8 @@ EXTERN_C_END /* from linux/limits.h, via sys/param.h */ +#if defined(_MSC_VER) #define PATH_MAX 4096 +#endif #endif /* NATIVE_CLIENT_SRC_INCLUDE_WIN_PORT_WIN_H_ */ From ba6106372ca6d49c573827af1df8ebbdfebd5b18 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 9 Dec 2025 18:33:56 +0100 Subject: [PATCH 15/15] win32: silence warnings about undefined NACL_USE_TLS and NACL_USE_TSD --- src/trusted/fault_injection/fault_injection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/trusted/fault_injection/fault_injection.c b/src/trusted/fault_injection/fault_injection.c index 3d71f5f7..2fa29c35 100644 --- a/src/trusted/fault_injection/fault_injection.c +++ b/src/trusted/fault_injection/fault_injection.c @@ -66,6 +66,8 @@ */ # define NACL_HAS_STRNDUP 0 /* could use TLS if not built into a DLL, otherwise must use TLSALLOC */ +# define NACL_USE_TLS 0 +# define NACL_USE_TSD 0 # define NACL_USE_TLSALLOC 1 # include #endif