replace -DWASM with compiler internal __EMSCRIPTEN__

This commit is contained in:
Adam Powers
2020-08-27 22:15:12 -07:00
parent 18254eb291
commit c9f5bb9ac4
4 changed files with 9 additions and 13 deletions

View File

@@ -325,15 +325,15 @@ struct version_info {
unsigned long incarnation; /* actual version number */
unsigned long feature_set; /* bitmask of config settings */
unsigned long entity_count; /* # of monsters and objects */
#ifndef WASM
#ifndef __EMSCRIPTEN__
unsigned long struct_sizes1; /* size of key structs */
unsigned long struct_sizes2; /* size of more key structs */
#else /* WASM */
#else /* __EMSCRIPTEN__ */
/* 'long' in WASM is 4 bytes, which is too small to hold version numbers
* such as: VERSION_SANITY2 */
unsigned long long struct_sizes1; /* size of key structs */
unsigned long long struct_sizes2; /* size of more key structs */
#endif /* !WASM */
#endif /* !__EMSCRIPTEN__ */
};
struct savefile_info {
@@ -397,7 +397,7 @@ struct savefile_info {
/* PANICTRACE: Always defined for NH_DEVEL_STATUS != NH_STATUS_RELEASED
but only for supported platforms. */
#if defined(UNIX) && !defined(WASM)
#if defined(UNIX) && !defined(__EMSCRIPTEN__)
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
/* see end.c */
#ifndef PANICTRACE
@@ -412,7 +412,7 @@ struct savefile_info {
#if defined(MACOSX)
#define PANICTRACE_LIBC
#endif
#if defined(UNIX) && !defined(WASM) /* no popen in WASM */
#if defined(UNIX) && !defined(__EMSCRIPTEN__) /* no popen in WASM */
#define PANICTRACE_GDB
#endif