+#define _Noreturn
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#undef bool
#endif
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
#define UNICODE
#include <windows.h>
__declspec(dllexport) int isblank(int c) { return c == '\t' || c == ' '; }
#endif
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
intptr_t stdinHandle, stdoutHandle;
int osfStdin, osfStdout;
FILE * fStdIn, * fStdOut;
#endif
FILE *eC_stdin(void) {
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
if(!fStdIn)
{
stdinHandle = (intptr_t)GetStdHandle(STD_INPUT_HANDLE);
typedef enum { unknown, win32, tux, apple } Platform;
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
Platform runtimePlatform = win32;
#elif defined(__APPLE__)
Platform runtimePlatform = apple;
bool Instance_LocateModule(const char * name, char * fileName)
{
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
HMODULE hModule = null;
if(name && name[0])
{
void Instance_COM_Initialize(int argc, char ** argv, char ** parsedCommand, int * argcPtr, const char *** argvPtr)
{
-#if !defined(__WIN32__) && !defined(__EMSCRIPTEN__) && !defined(ECERE_BOOTSTRAP)
+#if !defined(__WIN32__) && !defined(ECERE_BOOTSTRAP)
// Disable stdout buffering on Unix
setvbuf(stdout, null, _IONBF, 0);
#endif
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
*parsedCommand = UTF16toUTF8(GetCommandLineW());
*argvPtr = eSystem_New0(sizeof(char *) * 512);
*argcPtr = Tokenize(*parsedCommand, 512,(void*)(char **)(*argvPtr), forArgsPassing);
*Load = null;
*Unload = null;
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
strcpy(fileName, name);
GetExtension(fileName, extension);
if(!extension[0])
void Instance_Module_Free(void * library)
{
-#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
+#if defined(__WIN32__)
if(library)
FreeLibrary(library);
#elif (defined(__unix__) || defined(__APPLE__)) && !defined(__EMSCRIPTEN__)