summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-24 18:47:05 +0000
committerrubidium <rubidium@openttd.org>2008-01-24 18:47:05 +0000
commitbbdc5a9314f0f0e90517b3a513ba49db06e30260 (patch)
tree80e848502114343ca21477b04e1cddee125bb546 /src/debug.h
parent4991dcecc7ea2e4ab9de69cf0cdfc69740594ef3 (diff)
downloadopenttd-bbdc5a9314f0f0e90517b3a513ba49db06e30260.tar.xz
(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.
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h38
1 files changed, 3 insertions, 35 deletions
diff --git a/src/debug.h b/src/debug.h
index 4432a5666..5df7bfae8 100644
--- a/src/debug.h
+++ b/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);