From: Mikko Rasa Date: Wed, 18 Sep 2019 15:10:21 +0000 (+0300) Subject: Hide windows.h from public headers X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=57d4f63b65aa8801f11e860ad18c9b9054134104 Hide windows.h from public headers OpenGL headers require a few #defines, so do those manually instead. --- diff --git a/source/extension.cpp b/source/extension.cpp index a0959861..21fab9a2 100644 --- a/source/extension.cpp +++ b/source/extension.cpp @@ -2,7 +2,9 @@ #include #if defined(__ANDROID__) #include -#elif !defined(_WIN32) && !defined(__APPLE__) +#elif defined(_WIN32) +#include +#elif !defined(__APPLE__) #define GLX_GLXEXT_PROTOTYPES #include #endif diff --git a/source/gl.h b/source/gl.h index 9a7cb9cd..69b9b130 100644 --- a/source/gl.h +++ b/source/gl.h @@ -15,8 +15,23 @@ typedef double GLdouble; typedef long long GLint64; #else -#ifdef WIN32 -#include +#ifdef _WIN32 +#ifndef WINAPI +#if defined(_ARM_) +#define WINAPI +#else +#define WINAPI __stdcall +#endif +#endif +#ifndef APIENTRY +#define APIENTRY WINAPI +#endif +#ifndef DECLSPEC_IMPORT +#define DECLSPEC_IMPORT __declspec(dllimport) +#endif +#ifndef WINGDIAPI +#define WINGDIAPI DECLSPEC_IMPORT +#endif #endif #include #include