From: José Fonseca Date: Wed, 27 Apr 2011 18:05:29 +0000 (+0100) Subject: sgi: Fix MSVC build. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa7a051c251552c4581caadce772a29c64f6a850;p=mesa.git sgi: Fix MSVC build. 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. --- diff --git a/src/glu/sgi/include/gluos.h b/src/glu/sgi/include/gluos.h index 802aa8402d4..ac0a7874cec 100644 --- a/src/glu/sgi/include/gluos.h +++ b/src/glu/sgi/include/gluos.h @@ -60,6 +60,10 @@ #pragma comment(linker, "/OPT:NOWIN98") #endif +#ifndef WINGDIAPI +#define WINGDIAPI +#endif + #elif defined(__OS2__) #include diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 415dfaa5411..c475c96a208 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -6631,7 +6631,7 @@ static TexImage3Dproc pTexImage3D = 0; # include # include #else -# include + WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR); #endif static void gluTexImage3D( GLenum target, GLint level,