mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Clean up doomtype.h a bit, add indenting and comments to make some preprocessor code more readable
This commit is contained in:
parent
0bdbdd1b1e
commit
5c61c40551
1 changed files with 70 additions and 59 deletions
|
@ -44,13 +44,14 @@
|
|||
typedef long ssize_t;
|
||||
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#if (_MSC_VER <= 1200)
|
||||
#ifndef DWORD_PTR
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
|
||||
#if ((_MSC_VER <= 1200) && (!defined(PDWORD_PTR)))
|
||||
#ifndef PDWORD_PTR
|
||||
#define PDWORD_PTR PDWORD
|
||||
#endif
|
||||
#endif
|
||||
#elif defined (_arch_dreamcast) // KOS Dreamcast
|
||||
#include <arch/types.h>
|
||||
|
||||
|
@ -102,7 +103,7 @@ typedef long ssize_t;
|
|||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||
#define snprintf _snprintf
|
||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||
#if (_MSC_VER <= 1200) // MSVC 6.0 and back
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
|
@ -276,13 +277,14 @@ typedef UINT32 tic_t;
|
|||
|
||||
#ifdef __GNUC__ // __attribute__ ((X))
|
||||
#define FUNCNORETURN __attribute__ ((noreturn))
|
||||
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && defined (__MINGW32__)
|
||||
|
||||
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && defined (__MINGW32__) // MinGW, >= GCC 4.1
|
||||
#include "inttypes.h"
|
||||
#if 0 //defined (__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO > 0
|
||||
#define FUNCPRINTF __attribute__ ((format(gnu_printf, 1, 2)))
|
||||
#define FUNCDEBUG __attribute__ ((format(gnu_printf, 2, 3)))
|
||||
#define FUNCIERROR __attribute__ ((format(gnu_printf, 1, 2),noreturn))
|
||||
#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
||||
#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // >= GCC 4.4
|
||||
#define FUNCPRINTF __attribute__ ((format(ms_printf, 1, 2)))
|
||||
#define FUNCDEBUG __attribute__ ((format(ms_printf, 2, 3)))
|
||||
#define FUNCIERROR __attribute__ ((format(ms_printf, 1, 2),noreturn))
|
||||
|
@ -296,27 +298,36 @@ typedef UINT32 tic_t;
|
|||
#define FUNCDEBUG __attribute__ ((format(printf, 2, 3)))
|
||||
#define FUNCIERROR __attribute__ ((format(printf, 1, 2),noreturn))
|
||||
#endif
|
||||
|
||||
#ifndef FUNCIERROR
|
||||
#define FUNCIERROR __attribute__ ((noreturn))
|
||||
#endif
|
||||
|
||||
#define FUNCMATH __attribute__((const))
|
||||
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
|
||||
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) // >= GCC 3.1
|
||||
#define FUNCDEAD __attribute__ ((deprecated))
|
||||
#define FUNCINLINE __attribute__((always_inline))
|
||||
#define FUNCNONNULL __attribute__((nonnull))
|
||||
#endif
|
||||
|
||||
#define FUNCNOINLINE __attribute__((noinline))
|
||||
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
||||
|
||||
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // >= GCC 4.4
|
||||
#ifdef __i386__ // i386 only
|
||||
#define FUNCTARGET(X) __attribute__ ((__target__ (X)))
|
||||
#endif
|
||||
#endif
|
||||
#if defined (__MINGW32__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
|
||||
#if defined (__MINGW32__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) // MinGW, >= GCC 3.4
|
||||
#define ATTRPACK __attribute__((packed, gcc_struct))
|
||||
#else
|
||||
#define ATTRPACK __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#define ATTRUNUSED __attribute__((unused))
|
||||
|
||||
// Xbox-only macros
|
||||
#ifdef _XBOX
|
||||
#define FILESTAMP I_OutputMsg("%s:%d\n",__FILE__,__LINE__);
|
||||
#define XBOXSTATIC static
|
||||
|
@ -324,7 +335,7 @@ typedef UINT32 tic_t;
|
|||
#elif defined (_MSC_VER)
|
||||
#define ATTRNORETURN __declspec(noreturn)
|
||||
#define ATTRINLINE __forceinline
|
||||
#if _MSC_VER > 1200
|
||||
#if _MSC_VER > 1200 // >= MSVC 6.0
|
||||
#define ATTRNOINLINE __declspec(noinline)
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue