sgi: Fix MSVC build.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 27 Apr 2011 18:05:29 +0000 (19:05 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 27 Apr 2011 18:06:07 +0000 (19:06 +0100)
Including windows.h was ineffective on MSVC because we define the NOGDI macro,
which skips the wingdi.h include.

Unsetting NOGDI is also a bad idea because it causes all sort of symbol
clashes with SGI code.

The real problem is that WINGDAPI was not being defined, also due to NOGDI,
so simply define it to blank if not done already.  This seems to make
everybody happy.

src/glu/sgi/include/gluos.h
src/glu/sgi/libutil/mipmap.c

index 802aa8402d46181777c71a663de1bcccd5e08a09..ac0a7874cece23f5eb96b021bc9738a3d7ee0814 100644 (file)
 #pragma comment(linker, "/OPT:NOWIN98")
 #endif
 
+#ifndef WINGDIAPI
+#define WINGDIAPI
+#endif
+
 #elif defined(__OS2__)
 
 #include <stdlib.h>
index 415dfaa5411f95248d0f74a2655aa0cf32886370..c475c96a208c6c31a160622ddfc0876b8b619941 100644 (file)
@@ -6631,7 +6631,7 @@ static TexImage3Dproc pTexImage3D = 0;
 #  include <dlfcn.h>
 #  include <sys/types.h>
 #else
-#  include <windows.h>
+  WINGDIAPI PROC  WINAPI wglGetProcAddress(LPCSTR);
 #endif
 
 static void gluTexImage3D( GLenum target, GLint level,