diff --git a/auto/Makefile b/auto/Makefile index 3efc5de..fa3218d 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -15,6 +15,10 @@ PYTHON ?= python EXT = extensions/gl CORE = core/gl +REPO_OPENGL ?= https://github.com/KhronosGroup/OpenGL-Registry.git +REPO_EGL ?= https://github.com/KhronosGroup/EGL-Registry.git +REPO_GLFIXES ?= https://github.com/nigels-com/glfixes + BIN = bin SRC = src BLACKLIST = blacklist @@ -89,9 +93,9 @@ OpenGL-Registry/.dummy: @echo "--------------------------------------------------------------------" @echo "Downloading OpenGL-Registry" @echo "--------------------------------------------------------------------" - git clone https://github.com/KhronosGroup/OpenGL-Registry.git OpenGL-Registry - git clone https://github.com/KhronosGroup/EGL-Registry.git EGL-Registry - git clone --branch glew https://github.com/nigels-com/glfixes glfixes + git clone $(REPO_OPENGL) OpenGL-Registry + git clone $(REPO_EGL) EGL-Registry + git clone --branch glew $(REPO_GLFIXES) glfixes touch $@ $(EXT)/.dummy: OpenGL-Registry/.dummy diff --git a/auto/src/glewinfo_tail.c b/auto/src/glewinfo_tail.c index 4d45538..60cffee 100644 --- a/auto/src/glewinfo_tail.c +++ b/auto/src/glewinfo_tail.c @@ -127,7 +127,11 @@ GLboolean glewParseArgs (int argc, char** argv, struct createParams *params) if (!strcmp(argv[p], "-version")) { if (++p >= argc) return GL_TRUE; +#if defined(__STDC_LIB_EXT1__) || (defined(_MSC_VER) && (_MSC_VER >= 1400)) + if (sscanf_s(argv[p++], "%d.%d", ¶ms->major, ¶ms->minor) != 2) return GL_TRUE; +#else if (sscanf(argv[p++], "%d.%d", ¶ms->major, ¶ms->minor) != 2) return GL_TRUE; +#endif } else if (!strcmp(argv[p], "-profile")) {