From 2f3c378a3974cc206cf4e184dec9b303ce2ee43a Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 23 Jan 2014 14:15:01 +0100 Subject: [PATCH] Globally #undef min and max on Windows --- src/modules/m_repeat.cpp | 5 ----- win/inspircd_win32wrapper.h | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 69946ed0c..d91fe7e8a 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -19,11 +19,6 @@ #include "inspircd.h" -#ifdef _WIN32 -// windows.h defines this -#undef min -#endif - class RepeatMode : public ModeHandler { private: diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index a7f2b4354..0b9216313 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -75,8 +75,10 @@ #define W_OK (1<<1) /* test for write permission */ #define R_OK (1<<2) /* test for read permission */ -/* Windows defines this already. */ +// Windows defines these already. #undef ERROR +#undef min +#undef max /* strcasecmp is not defined on windows by default */ #define strcasecmp _stricmp -- 2.39.2