# define XULRUNNER_DIR_SUFFIX "win64"
#elif defined(WIN32)
# define XULRUNNER_DIR_SUFFIX "win32"
-#elif defined(DP_ARCH) && defined(DP_MACHINE)
-# define XULRUNNER_DIR_SUFFIX DP_ARCH "-" DP_MACHINE
+#elif defined(DP_OS_STR) && defined(DP_ARCH_STR)
+# define XULRUNNER_DIR_SUFFIX DP_OS_STR "-" DP_ARCH_STR
#endif
clgecko_t * CL_Gecko_CreateBrowser( const char *name ) {
#elif defined(MACOSX)
"OffscreenGecko.dylib",
#else
- "OffscreenGecko.so",
+ "libOffscreenGecko.so",
#endif
NULL
};
COM_InitGameType();
// construct a version string for the corner of the console
-#if defined(__linux__)
- os = "Linux";
-#elif defined(WIN32)
- os = "Windows";
-#elif defined(__FreeBSD__)
- os = "FreeBSD";
-#elif defined(__NetBSD__)
- os = "NetBSD";
-#elif defined(__OpenBSD__)
- os = "OpenBSD";
-#elif defined(MACOSX)
- os = "Mac OS X";
-#elif defined(__MORPHOS__)
- os = "MorphOS";
-#else
- os = "Unknown";
-#endif
+ os = DP_OS_NAME;
dpsnprintf (engineversion, sizeof (engineversion), "%s %s %s", gamename, os, buildstring);
Con_Printf("%s\n", engineversion);
extern qboolean noclip_anglehack;
-extern char engineversion[128];
extern cvar_t developer;
+/* Preprocessor macros to identify platform
+ DP_OS_NAME - "friendly" name of the OS, for humans to read
+ DP_OS_STR - "identifier" of the OS, more suited for code to use
+ DP_ARCH_STR - "identifier" of the processor architecture
+ */
+#if defined(__linux__)
+# define DP_OS_NAME "Linux"
+# define DP_OS_STR "linux"
+#elif defined(WIN64)
+# define DP_OS_NAME "Windows64"
+# define DP_OS_STR "win64"
+#elif defined(WIN32)
+# define DP_OS_NAME "Windows"
+# define DP_OS_STR "win32"
+#elif defined(__FreeBSD__)
+# define DP_OS_NAME "FreeBSD"
+# define DP_OS_STR "freebsd"
+#elif defined(__NetBSD__)
+# define DP_OS_NAME "NetBSD"
+# define DP_OS_STR "netbsd"
+#elif defined(__OpenBSD__)
+# define DP_OS_NAME "OpenBSD"
+# define DP_OS_STR "openbsd"
+#elif defined(MACOSX)
+# define DP_OS_NAME "Mac OS X"
+# define DP_OS_STR "osx"
+#elif defined(__MORPHOS__)
+# define DP_OS_NAME "MorphOS"
+# define DP_OS_STR "morphos"
+#else
+# define DP_OS_NAME "Unknown"
+#endif
+
+#if defined(__GNUC__)
+# if defined(__i386__)
+# define DP_ARCH_STR "686"
+# elif defined(__x86_64__)
+# define DP_ARCH_STR "x86_64"
+# elif defined(__powerpc__)
+# define DP_ARCH_STR "ppc"
+# endif
+#elif defined(WIN64)
+# define DP_ARCH_STR "x86_64"
+#elif defined(WIN32)
+# define DP_ARCH_STR "x86"
+#endif
+
// incremented every frame, never reset
extern int host_framecount;
// not bounded in any way, changed at start of every frame, never reset