]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/cmdlib.h
Merge commit '01a950c3de3ef7f7da23360f925404e2bd385d5d' into master-merge
[xonotic/netradiant.git] / tools / quake3 / common / cmdlib.h
index f6f5e4d17106108c173a13e8e15cd53e32fb3e9d..ecdcf6e1afd6dc42bd0375958efa36affdc5bb58 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+   Copyright (C) 1999-2007 id Software, Inc. and contributors.
    For a list of contributors, see the accompanying CONTRIBUTORS file.
 
    This file is part of GtkRadiant.
@@ -25,8 +25,9 @@
 #define __CMDLIB__
 
 #include "bytebool.h"
+#include "globaldefs.h"
 
-#ifdef _WIN32
+#if GDEF_COMPILER_MSVC
 #pragma warning(disable : 4244)     // MIPS
 #pragma warning(disable : 4136)     // X86
 #pragma warning(disable : 4051)     // ALPHA
@@ -46,7 +47,7 @@
 #include <time.h>
 #include <stdarg.h>
 
-#ifdef _WIN32
+#if GDEF_COMPILER_MSVC
 
 #pragma intrinsic( memset, memcpy )
 
 // the dec offsetof macro doesnt work very well...
 #define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier )
 
-#define SAFE_MALLOC
-#ifdef SAFE_MALLOC
 void *safe_malloc( size_t size );
 void *safe_malloc_info( size_t size, char* info );
-#else
-#define safe_malloc( a ) malloc( a )
-#endif /* SAFE_MALLOC */
+void *safe_malloc0( size_t size );
+void *safe_malloc0_info( size_t size, char* info );
 
 // set these before calling CheckParm
 extern int myargc;
@@ -92,18 +90,12 @@ extern char    *moddirparam;
 void SetQdirFromPath( const char *path );
 char *ExpandArg( const char *path );    // from cmd line
 char *ExpandPath( const char *path );   // from scripts
-char *ExpandGamePath( const char *path );
-char *ExpandPathAndArchive( const char *path );
 void ExpandWildcards( int *argc, char ***argv );
 
 
 double I_FloatTime( void );
 
-void    Error( const char *error, ... )
-#ifdef __GNUC__
-__attribute__( ( noreturn ) )
-#endif
-;
+void    Error( const char *error, ... ) GDEF_ATTRIBUTE_NORETURN;
 int     CheckParm( const char *check );
 
 FILE    *SafeOpenWrite( const char *filename );