From 9a3984ee426e09de1a7588d0224574c97dba5d72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 18 Apr 2011 07:49:39 +0100 Subject: [PATCH] Standard define for Windows is _WIN32, not WIN32. --- formatter.hpp | 4 ++-- glimports.hpp | 12 ++++++------ glproc.py | 10 +++++----- os.hpp | 6 +++--- trace_write.cpp | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/formatter.hpp b/formatter.hpp index 9f17c00..040d06d 100644 --- a/formatter.hpp +++ b/formatter.hpp @@ -105,7 +105,7 @@ inline std::ostream& operator<<(std::ostream& os, const Attribute *attr) { } -#ifdef WIN32 +#ifdef _WIN32 #include @@ -156,7 +156,7 @@ public: inline Formatter *defaultFormatter(void) { -#ifdef WIN32 +#ifdef _WIN32 return new WindowsFormatter; #else return new AnsiFormatter; diff --git a/glimports.hpp b/glimports.hpp index 4b21083..d3dc89b 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -30,7 +30,7 @@ #ifndef _GLIMPORTS_HPP_ #define _GLIMPORTS_HPP_ -#ifdef WIN32 +#ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 @@ -38,11 +38,11 @@ #include -#else /* !WIN32 */ +#else /* !_WIN32 */ #include -#endif /* !WIN32 */ +#endif /* !_WIN32 */ #include @@ -52,7 +52,7 @@ #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED #endif -#ifdef WIN32 +#ifdef _WIN32 #include @@ -78,7 +78,7 @@ typedef struct _WGLSWAP #endif /* __MINGW32__ */ -#else /* !WIN32 */ +#else /* !_WIN32 */ #include #include @@ -86,6 +86,6 @@ typedef struct _WGLSWAP /* Prevent collision with Trace::Bool */ #undef Bool -#endif /* !WIN32 */ +#endif /* !_WIN32 */ #endif /* _GLIMPORTS_HPP_ */ diff --git a/glproc.py b/glproc.py index 2fde623..e1e7d16 100644 --- a/glproc.py +++ b/glproc.py @@ -410,14 +410,14 @@ class GlDispatcher(Dispatcher): def header(self): print '#ifdef RETRACE' - print '# ifdef WIN32' + print '# ifdef _WIN32' print '# define __getPrivateProcAddress(name) wglGetProcAddress(name)' print '# else' print '# define __getPrivateProcAddress(name) glXGetProcAddressARB((const GLubyte *)(name))' print '# endif' print '# define __abort() OS::Abort()' print '#else /* !RETRACE */' - print '# ifdef WIN32' + print '# ifdef _WIN32' print '# define __getPrivateProcAddress(name) __wglGetProcAddress(name)' print ' static inline PROC __stdcall __wglGetProcAddress(const char * lpszProc);' print '# else' @@ -445,13 +445,13 @@ if __name__ == '__main__': print dispatcher = GlDispatcher() dispatcher.header() - print '#ifdef WIN32' + print '#ifdef _WIN32' print dispatcher.dispatch_api(wglapi) - print '#else /* !WIN32 */' + print '#else /* !_WIN32 */' print dispatcher.dispatch_api(glxapi) - print '#endif /* !WIN32 */' + print '#endif /* !_WIN32 */' print dispatcher.dispatch_api(glapi) print diff --git a/os.hpp b/os.hpp index 42a3daa..eaf571d 100644 --- a/os.hpp +++ b/os.hpp @@ -34,7 +34,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #ifndef snprintf #define snprintf _snprintf #endif @@ -42,9 +42,9 @@ #define vsnprintf _vsnprintf #endif #define PATH_SEP '\\' -#else /* !WIN32 */ +#else /* !_WIN32 */ #define PATH_SEP '/' -#endif /* !WIN32 */ +#endif /* !_WIN32 */ #ifndef PATH_MAX #define PATH_MAX 1024 diff --git a/trace_write.cpp b/trace_write.cpp index 6a44b28..f77a275 100644 --- a/trace_write.cpp +++ b/trace_write.cpp @@ -347,7 +347,7 @@ void Abort(void) { } /* namespace Trace */ -#ifdef WIN32 +#ifdef _WIN32 #if 0 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { -- 2.45.2