mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 08:44:31 +00:00
public: build: don't confuse other libcs with built with glibc game libraries by specifying them into separate platform, like Android
This commit is contained in:
parent
1274fa13c8
commit
3c64d2ad80
@ -89,6 +89,8 @@ const char *Q_PlatformStringByID( const int platform )
|
|||||||
return "win32";
|
return "win32";
|
||||||
case PLATFORM_ANDROID:
|
case PLATFORM_ANDROID:
|
||||||
return "android";
|
return "android";
|
||||||
|
case PLATFORM_LINUX_UNKNOWN:
|
||||||
|
return "linuxunkabi";
|
||||||
case PLATFORM_LINUX:
|
case PLATFORM_LINUX:
|
||||||
return "linux";
|
return "linux";
|
||||||
case PLATFORM_APPLE:
|
case PLATFORM_APPLE:
|
||||||
|
@ -69,6 +69,7 @@ Then you can use another oneliner to query all variables:
|
|||||||
#undef XASH_IRIX
|
#undef XASH_IRIX
|
||||||
#undef XASH_JS
|
#undef XASH_JS
|
||||||
#undef XASH_LINUX
|
#undef XASH_LINUX
|
||||||
|
#undef XASH_LINUX_UNKNOWN
|
||||||
#undef XASH_LITTLE_ENDIAN
|
#undef XASH_LITTLE_ENDIAN
|
||||||
#undef XASH_MIPS
|
#undef XASH_MIPS
|
||||||
#undef XASH_MOBILE_PLATFORM
|
#undef XASH_MOBILE_PLATFORM
|
||||||
@ -98,10 +99,17 @@ Then you can use another oneliner to query all variables:
|
|||||||
#else // POSIX compatible
|
#else // POSIX compatible
|
||||||
#define XASH_POSIX 1
|
#define XASH_POSIX 1
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#define XASH_LINUX 1
|
|
||||||
#if defined __ANDROID__
|
#if defined __ANDROID__
|
||||||
#define XASH_ANDROID 1
|
#define XASH_ANDROID 1
|
||||||
|
#else
|
||||||
|
#include <features.h>
|
||||||
|
// if our system libc has features.h header
|
||||||
|
// try to detect it to not confuse other libcs with built with glibc game libraries
|
||||||
|
#if !defined __GLIBC__
|
||||||
|
#define XASH_LINUX_UNKNOWN 1
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#define XASH_LINUX 1
|
||||||
#elif defined __FreeBSD__
|
#elif defined __FreeBSD__
|
||||||
#define XASH_FREEBSD 1
|
#define XASH_FREEBSD 1
|
||||||
#elif defined __NetBSD__
|
#elif defined __NetBSD__
|
||||||
|
@ -40,11 +40,14 @@ GNU General Public License for more details.
|
|||||||
#define PLATFORM_SERENITY 11
|
#define PLATFORM_SERENITY 11
|
||||||
#define PLATFORM_IRIX 12
|
#define PLATFORM_IRIX 12
|
||||||
#define PLATFORM_NSWITCH 13
|
#define PLATFORM_NSWITCH 13
|
||||||
|
#define PLATFORM_LINUX_UNKNOWN 14
|
||||||
|
|
||||||
#if XASH_WIN32
|
#if XASH_WIN32
|
||||||
#define XASH_PLATFORM PLATFORM_WIN32
|
#define XASH_PLATFORM PLATFORM_WIN32
|
||||||
#elif XASH_ANDROID
|
#elif XASH_ANDROID
|
||||||
#define XASH_PLATFORM PLATFORM_ANDROID
|
#define XASH_PLATFORM PLATFORM_ANDROID
|
||||||
|
#elif XASH_LINUX_UNKNOWN
|
||||||
|
#define XASH_PLATFORM PLATFORM_LINUX_UNKNOWN
|
||||||
#elif XASH_LINUX
|
#elif XASH_LINUX
|
||||||
#define XASH_PLATFORM PLATFORM_LINUX
|
#define XASH_PLATFORM PLATFORM_LINUX
|
||||||
#elif XASH_APPLE
|
#elif XASH_APPLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user