X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=include%2FGL%2Fglut.h;h=e286349f9b01c3903b4f9104c9aaf36ba1531661;hb=76fb8089103e9dba9aaa7232c86d864d5874a08f;hp=7977dc94c92a08fe5517260866cdc8aa025432b3;hpb=83889ffd970a807074d834849677fd233c031dc7;p=mesa.git diff --git a/include/GL/glut.h b/include/GL/glut.h index 7977dc94c92..e286349f9b0 100644 --- a/include/GL/glut.h +++ b/include/GL/glut.h @@ -10,6 +10,10 @@ #include #include +#if defined(__MINGW32__) +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -108,14 +112,14 @@ extern _CRTIMP void __cdecl exit(int); and redifinition of Windows system defs, also removes requirement of pretty much any standard windows header from this file */ -#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__) +#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__) # define GLUTAPIENTRY __stdcall #else # define GLUTAPIENTRY #endif /* GLUT API entry point declarations for Win32. */ -#if defined(GLUT_BUILDING_LIB) && defined(_DLL) +#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && defined(_DLL) # define GLUTAPI __declspec(dllexport) #elif defined(_DLL) # define GLUTAPI __declspec(dllimport) @@ -130,9 +134,12 @@ extern _CRTIMP void __cdecl exit(int); # pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" ) # endif # define CALLBACK __stdcall -typedef int (GLUTAPIENTRY *PROC)(); -typedef void *HGLRC; -typedef void *HDC; + +#if !defined(__MINGW32__) + typedef int (GLUTAPIENTRY *PROC)(); + typedef void *HGLRC; + typedef void *HDC; +#endif typedef unsigned long COLORREF; #endif @@ -193,13 +200,11 @@ WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *); #else /* _WIN32 not defined */ /* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */ -# define GLUTAPIENTRY +# define GLUTAPIENTRY GLAPIENTRY # define GLUTAPIENTRYV -# define GLUT_APIENTRY_DEFINED # define GLUTCALLBACK # define GLUTAPI extern -/* Prototype exit for the non-Win32 case (see above). */ -/*extern void exit(int); this screws up gcc -ansi -pedantic! */ + #endif @@ -664,7 +669,8 @@ GLUTAPI int GLUTAPIENTRY glutGetModifiers(void); GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type); #endif #if (GLUT_API_VERSION >= 5) -GLUTAPI void * GLUTAPIENTRY glutGetProcAddress(const char *procName); +typedef void (*GLUTproc)(); +GLUTAPI GLUTproc GLUTAPIENTRY glutGetProcAddress(const char *procName); #endif /* GLUT font sub-API */ @@ -746,26 +752,4 @@ GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode); } #endif -#if 0 -#ifdef GLUT_APIENTRY_DEFINED -# undef GLUT_APIENTRY_DEFINED -# undef APIENTRY -#endif - -#ifdef GLUT_WINGDIAPI_DEFINED -# undef GLUT_WINGDIAPI_DEFINED -# undef WINGDIAPI -#endif - -#ifdef GLUT_DEFINED___CDECL -# undef GLUT_DEFINED___CDECL -# undef __cdecl -#endif - -#ifdef GLUT_DEFINED__CRTIMP -# undef GLUT_DEFINED__CRTIMP -# undef _CRTIMP -#endif -#endif - #endif /* __glut_h__ */