More wasm details, deal with requirements for -sMAIN_MODULE
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
c3f271d9e9
commit
d1d08e4704
12 changed files with 112 additions and 40 deletions
|
@ -30,16 +30,19 @@
|
|||
|
||||
#include_next "common.hpp"
|
||||
|
||||
// Workaround for wrong file permissions from zstd extraction
|
||||
// Workaround for wrong file permissions from zstd extraction and system usage
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define fopen fopen_wasm
|
||||
#define system system_wasm
|
||||
|
||||
extern "C" {
|
||||
FILE* fopen_wasm(const char* filename, const char* mode);
|
||||
inline int system_wasm(const char*) { return 0; }
|
||||
}
|
||||
|
||||
namespace std {
|
||||
using ::fopen_wasm;
|
||||
using ::system_wasm;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue