From: nhmall Date: Sun, 4 Oct 2020 23:51:37 +0000 (-0400) Subject: Merge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=751d5ef76cb991a25351846e2af39588a66cec8f;p=nethack Merge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2 --- 751d5ef76cb991a25351846e2af39588a66cec8f diff --cc .gitignore index 366cf938f,fb74047b9..aa171205f --- a/.gitignore +++ b/.gitignore @@@ -83,7 -83,14 +83,14 @@@ win/share/oththin.tx # end of ms-dos #libnethack -src/nethack.data -src/nethack.wasm -src/nethack.js -src/wasm-data +targets/* +#test.js +#sys/lib/npm-package/build/nethack.js +#sys/lib/npm-package/build/nethack.wasm + src/libnethack.a + /libtest.c + /nhlibtest + /run.sh + /test.js + sys/lib/npm-package/build/nethack.js + sys/lib/npm-package/build/nethack.wasm diff --cc include/global.h index caa32847b,b3f17e996..4581137ef --- a/include/global.h +++ b/include/global.h @@@ -396,17 -397,14 +403,17 @@@ struct savefile_info /* PANICTRACE: Always defined for NH_DEVEL_STATUS != NH_STATUS_RELEASED but only for supported platforms. */ - #ifdef UNIX + #if defined(UNIX) && !defined(__EMSCRIPTEN__) #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) /* see end.c */ +#if !defined(CROSS_TO_WASM) #ifndef PANICTRACE #define PANICTRACE -#endif -#endif -#endif +#endif /* PANICTRACE */ +#endif /* CROSS_TO_WASM */ +#endif /* NH_DEVEL_STATUS != NH_STATUS_RELEASED */ +#endif /* UNIX */ + /* The following are meaningless if PANICTRACE is not defined: */ #if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2) #define PANICTRACE_LIBC @@@ -414,11 -412,9 +421,11 @@@ #if defined(MACOSX) #define PANICTRACE_LIBC #endif - #ifdef UNIX + #if defined(UNIX) && !defined(__EMSCRIPTEN__) /* no popen in WASM */ +#if !defined(CROSS_TO_WASM) /* no popen in WASM */ #define PANICTRACE_GDB #endif +#endif /* Supply nethack_enter macro if not supplied by port */ #ifndef nethack_enter