public: add definitions for GNU/Hurd

This commit is contained in:
Alibek Omarov 2025-08-13 16:45:40 +05:00
parent e716290523
commit 59d771c4e4
5 changed files with 11 additions and 2 deletions

2
3rdparty/mainui vendored

@ -1 +1 @@
Subproject commit b015e450620dee43e9b27f86d67c1bda89dd1447
Subproject commit e0a1328ce52868c0b9d1a8427d3170164674ad5c

View File

@ -121,6 +121,8 @@ const char *Q_PlatformStringByID( const int platform )
return "wasi";
case PLATFORM_SUNOS:
return "sunos";
case PLATFORM_HURD:
return "hurd";
}
assert( 0 );

View File

@ -65,6 +65,7 @@ Then you can use another oneliner to query all variables:
#undef XASH_EMSCRIPTEN
#undef XASH_FREEBSD
#undef XASH_HAIKU
#undef XASH_HURD
#undef XASH_IOS
#undef XASH_IRIX
#undef XASH_JS
@ -137,6 +138,8 @@ Then you can use another oneliner to query all variables:
#define XASH_SUNOS 1
#elif defined __EMSCRIPTEN__
#define XASH_EMSCRIPTEN 1
#elif defined __gnu_hurd__
#define XASH_HURD 1
#else
#error
#endif

View File

@ -43,6 +43,7 @@ GNU General Public License for more details.
#define PLATFORM_PSVITA 14
#define PLATFORM_WASI 15
#define PLATFORM_SUNOS 16
#define PLATFORM_HURD 17
#if XASH_WIN32
#define XASH_PLATFORM PLATFORM_WIN32
@ -76,6 +77,8 @@ GNU General Public License for more details.
#define XASH_PLATFORM PLATFORM_WASI
#elif XASH_SUNOS
#define XASH_PLATFORM PLATFORM_SUNOS
#elif XASH_HURD
#define XASH_PLATFORM PLATFORM_HURD
#else
#error
#endif
@ -93,7 +96,7 @@ GNU General Public License for more details.
#define ARCHITECTURE_E2K 7
#define ARCHITECTURE_RISCV 8
#define ARCHITECTURE_PPC 9
#define ARCHITECTURE_WASM 10
#define ARCHITECTURE_WASM 10
#if XASH_AMD64
#define XASH_ARCHITECTURE ARCHITECTURE_AMD64

View File

@ -25,6 +25,7 @@ static struct
{ PLATFORM_NSWITCH, "nswitch" },
{ PLATFORM_PSVITA, "psvita" },
{ PLATFORM_WASI, "wasi" },
{ PLATFORM_HURD, "hurd" },
};
static struct