forked from mirror/OpenTTD
(svn r11979) -Codechange: drop MSVC 2003 support because MSVC 2003 is broken in such a manner that it triggers an internal compiler error without any clue what of the code is wrong. Even trying to bisect the problem does not give a single line of code that causes the trouble.
This commit is contained in:
38
src/debug.h
38
src/debug.h
@@ -19,44 +19,14 @@
|
||||
* 6.. - extremely detailed spamming
|
||||
*/
|
||||
|
||||
/* Of course MSVC 2003 and lower has no support for variadic macros
|
||||
* so we need to work around this... *sigh* */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1400)
|
||||
#define NO_VARARG_MACRO
|
||||
#endif
|
||||
|
||||
#if defined(NO_VARARG_MACRO)
|
||||
enum DebugLevelType {
|
||||
ai,
|
||||
driver,
|
||||
grf,
|
||||
map,
|
||||
misc,
|
||||
ms,
|
||||
net,
|
||||
sprite,
|
||||
oldloader,
|
||||
ntp,
|
||||
npf,
|
||||
yapf,
|
||||
freetype,
|
||||
sl,
|
||||
station,
|
||||
};
|
||||
#endif /* NO_VARARG_MACRO */
|
||||
|
||||
#ifdef NO_DEBUG_MESSAGES
|
||||
#if defined(NO_VARARG_MACRO)
|
||||
static inline void DEBUG(int name, int level, ...) {}
|
||||
#elif defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#define DEBUG(name, level, args...)
|
||||
#else
|
||||
#define DEBUG(name, level, ...)
|
||||
#endif
|
||||
#else /* NO_DEBUG_MESSAGES */
|
||||
#if defined(NO_VARARG_MACRO)
|
||||
void CDECL DEBUG(int name, int level, ...);
|
||||
#elif defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
#define DEBUG(name, level, args...) if ((level == 0) || ( _debug_ ## name ## _level >= level)) debug(#name, args)
|
||||
#else
|
||||
#define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
|
||||
@@ -78,9 +48,7 @@
|
||||
extern int _debug_sl_level;
|
||||
extern int _debug_station_level;
|
||||
|
||||
#if !defined(NO_VARARG_MACRO)
|
||||
void CDECL debug(const char *dbg, ...);
|
||||
#endif /* NO_VARARG_MACRO */
|
||||
void CDECL debug(const char *dbg, ...);
|
||||
#endif /* NO_DEBUG_MESSAGES */
|
||||
|
||||
void SetDebugString(const char *s);
|
||||
|
Reference in New Issue
Block a user