]> git.cworth.org Git - apitrace/commitdiff
Standard define for Windows is _WIN32, not WIN32.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 18 Apr 2011 06:49:39 +0000 (07:49 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 18 Apr 2011 08:35:54 +0000 (09:35 +0100)
formatter.hpp
glimports.hpp
glproc.py
os.hpp
trace_write.cpp

index 9f17c006afc05b7ecd309c4adc17013070873c34..040d06d49084feafa191c8232ad708dea3d1e3bb 100644 (file)
@@ -105,7 +105,7 @@ inline std::ostream& operator<<(std::ostream& os, const Attribute *attr) {
 }
 
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #include <windows.h>
 
@@ -156,7 +156,7 @@ public:
 
 
 inline Formatter *defaultFormatter(void) {
-#ifdef WIN32
+#ifdef _WIN32
     return new WindowsFormatter;
 #else
     return new AnsiFormatter;
index 4b21083449114031498b91068c2b9af6db6d7777..d3dc89b7dfbb2776609ce9e0fc357096d5c0d326 100644 (file)
@@ -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
 
 #include <windows.h>
 
-#else /* !WIN32 */
+#else /* !_WIN32 */
 
 #include <X11/Xlib.h>
 
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
 
 #include <GL/gl.h>
 
@@ -52,7 +52,7 @@
 #define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
 #endif
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #include <GL/wglext.h>
 
@@ -78,7 +78,7 @@ typedef struct _WGLSWAP
 
 #endif /* __MINGW32__ */
 
-#else /* !WIN32 */
+#else /* !_WIN32 */
 
 #include <GL/glx.h>
 #include <GL/glext.h>
@@ -86,6 +86,6 @@ typedef struct _WGLSWAP
 /* Prevent collision with Trace::Bool */
 #undef Bool
 
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
 
 #endif /* _GLIMPORTS_HPP_ */
index 2fde623cb8f7cb10fe1cf89880b409137a1ce5a7..e1e7d16f3ed164ec3369859f413f16f2c40e8feb 100644 (file)
--- 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 42a3daac7ce7cf09f80359c424530daded40f190..eaf571db0926f0097c5ccbae6f22c450b8be5bb5 100644 (file)
--- a/os.hpp
+++ b/os.hpp
@@ -34,7 +34,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#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
index 6a44b28c231698ce8eff059f590b519d480c567d..f77a275524a611e76ceea8586806f3819bd45740 100644 (file)
@@ -347,7 +347,7 @@ void Abort(void) {
 } /* namespace Trace */
 
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #if 0
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {