]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake2/extra/common/cmdlib.c
Centralise compile checks
[xonotic/netradiant.git] / tools / quake2 / extra / common / cmdlib.c
index 60f615a0be05692795716c7c7153798eb68b1c39..792690790530546297e0254c17cc776dd40c8505 100644 (file)
@@ -23,10 +23,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // cmdlib.c
 
 #include "cmdlib.h"
+#include "globaldefs.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
 #include <direct.h>
 #endif
 
@@ -58,7 +60,7 @@ Mimic unix command line expansion
 #define        MAX_EX_ARGC     1024
 int            ex_argc;
 char   *ex_argv[MAX_EX_ARGC];
-#ifdef _WIN32
+#if GDEF_OS_WINDOWS
 #include "io.h"
 void ExpandWildcards (int *argc, char ***argv)
 {
@@ -305,7 +307,7 @@ double I_FloatTime (void)
 
 void Q_getwd (char *out)
 {
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
    _getcwd (out, 256);
    strcat (out, "\\");
 #else
@@ -317,7 +319,7 @@ void Q_getwd (char *out)
 
 void Q_mkdir (char *path)
 {
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
        if (_mkdir (path) != -1)
                return;
 #else
@@ -830,11 +832,7 @@ int ParseNum (char *str)
 ============================================================================
 */
 
-#ifdef _SGI_SOURCE
-#define        __BIG_ENDIAN__
-#endif
-
-#ifdef __BIG_ENDIAN__
+#if GDEF_ARCH_ENDIAN_BIG
 
 short   LittleShort (short l)
 {