From 4e972cee7ea6ebc71783635f088a18a9e13a7507 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 20 Sep 2022 11:25:15 +0800 Subject: [PATCH] fix foreign test for i3nt For some build environments, `_WIN32` is needed (as in other "foreign*.c" files) instead of `WIN32` without the leading underscore. --- mats/foreign3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mats/foreign3.c b/mats/foreign3.c index d84038f90..60777ebec 100644 --- a/mats/foreign3.c +++ b/mats/foreign3.c @@ -17,7 +17,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -178,7 +178,7 @@ EXPORT char Srvtest_char(ptr code, ptr x1) { return (*((char (*)(ptr))Sforeign_callable_entry_point(code)))(x1); } -#ifdef WIN32 +#ifdef _WIN32 EXPORT int __stdcall sum_stdcall(int a, int b) { return a + b; } @@ -208,7 +208,7 @@ EXPORT com_instance_t *get_com_instance(void) { com_instance.data = -31; return &com_instance; } -#endif /* WIN32 */ +#endif /* _WIN32 */ /* foreign_callable example adapted from foreign.stex */ typedef void (*CB)(char);