Skip to content

Commit

Permalink
fix foreign test for i3nt
Browse files Browse the repository at this point in the history
For some build environments, `_WIN32` is needed (as in other
"foreign*.c" files) instead of `WIN32` without the leading underscore.
  • Loading branch information
mflatt committed Aug 3, 2024
1 parent 2b1969a commit 4e972ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mats/foreign3.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdio.h>
#include <stdlib.h>

#ifndef WIN32
#ifndef _WIN32
#include <string.h>
#endif

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4e972ce

Please sign in to comment.