diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/SystemConfig.h.in | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in index 09735b01097..233403b77de 100644 --- a/src/shared/SystemConfig.h.in +++ b/src/shared/SystemConfig.h.in @@ -52,6 +52,16 @@ # define _ENDIAN_STRING "little-endian" #endif +#if defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86) +# define ARCHITECTURE "x32" +#elif defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(_M_X64) +# define ARCHITECTURE "x64" +#elif defined(__ia64) || defined(__IA64__) || defined(_M_IA64) +# define ARCHITECTURE "IA64" +#else +# define ARCHITECTURE "x32" +#endif + // The path to config files #ifndef SYSCONFDIR # define SYSCONFDIR "" @@ -66,7 +76,21 @@ # define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf" # define _REALMD_CONFIG SYSCONFDIR"realmd.conf" #else -# define _ENDIAN_PLATFORM "Unix (" _ENDIAN_STRING ")" +# if defined (__FreeBSD__) +# define _ENDIAN_PLATFORM "FreeBSD_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# elif defined(__NetBSD__) +# define _ENDIAN_PLATFORM "NetBSD_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# elif defined(__OpenBSD__) +# define _ENDIAN_PLATFORM "OpenBSD_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# elif defined(__DragonFly__) +# define _ENDIAN_PLATFORM "DragonFlyBSD_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# elif defined(__APPLE__) +# define _ENDIAN_PLATFORM "MacOSX_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# elif defined(__linux) || defined(__linux__) +# define _ENDIAN_PLATFORM "Linux_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# else +# define _ENDIAN_PLATFORM "Unix_"ARCHITECTURE" (" _ENDIAN_STRING ")" +# endif # define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf" # define _REALMD_CONFIG SYSCONFDIR"realmd.conf" #endif |