summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-04-27 19:05:29 +0100
committerJosé Fonseca <jfonseca@vmware.com>2011-04-27 19:06:07 +0100
commite21c970d96848358a8a60b6b95ce43cac34c0ae2 (patch)
tree99b23c833c351bbff758eda1574b63ea572d36f1
parent13f77791b25db45c26d3bd412fbcdde55bebe649 (diff)
downloadglu-e21c970d96848358a8a60b6b95ce43cac34c0ae2.tar.gz
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.
-rw-r--r--src/include/gluos.h4
-rw-r--r--src/libutil/mipmap.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/include/gluos.h b/src/include/gluos.h
index 802aa84..ac0a787 100644
--- a/src/include/gluos.h
+++ b/src/include/gluos.h
@@ -60,6 +60,10 @@
#pragma comment(linker, "/OPT:NOWIN98")
#endif
+#ifndef WINGDIAPI
+#define WINGDIAPI
+#endif
+
#elif defined(__OS2__)
#include <stdlib.h>
diff --git a/src/libutil/mipmap.c b/src/libutil/mipmap.c
index 415dfaa..c475c96 100644
--- a/src/libutil/mipmap.c
+++ b/src/libutil/mipmap.c
@@ -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,