Add support for emscripten SDK

This commit is contained in:
Alam Ed Arias 2025-03-20 10:08:29 -04:00
parent 61ee96e60e
commit dc661b7d37
2 changed files with 6 additions and 2 deletions

View file

@ -110,7 +110,7 @@ int startswith (const char *base, const char *tag);
int endswith (const char *base, const char *tag);
char *xstrtok(char *line, const char *delims);
#if defined (_WIN32) || defined (__HAIKU__)
#if defined (_WIN32) || defined (__HAIKU__) || defined (__EMSCRIPTEN__)
#define HAVE_DOSSTR_FUNCS
#endif

View file

@ -79,7 +79,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#define HAVE_SDLCPUINFO
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
#if defined (__linux__) || defined (__HAIKU__)
#if defined (__linux__) || defined (__HAIKU__) || defined (__EMSCRIPTEN__)
#include <sys/statvfs.h>
#else
#include <sys/statvfs.h>
@ -111,9 +111,11 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#include <errno.h>
#include <sys/wait.h>
#ifndef __HAIKU__ // haiku's crash dialog is just objectively better
#ifndef __EMSCRIPTEN__ // WASM does not have a rell fork()
#define NEWSIGNALHANDLER
#endif
#endif
#endif
#ifndef NOMUMBLE
#ifdef __linux__ // need -lrt
@ -145,12 +147,14 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#endif
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
#if !defined (__EMSCRIPTEN__)
#ifndef NOEXECINFO
#include <execinfo.h>
#endif
#include <time.h>
#define UNIXBACKTRACE
#endif
#endif
// Locations to directly check for srb2.pk3 in
const char *wadDefaultPaths[] = {