From 6abad2efd29adfe41b5ef2e73b1650e45b1725e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 22 Jul 2019 17:42:00 +0200 Subject: [PATCH] Fix conflict with DEBUG macro defined by Bazel The Bazel build system may define DEBUG when compiling on macOS, which caused the glfwinfo test program to fail to build. Fixes #1537. --- tests/glfwinfo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c index afc32427..0ea23fd6 100644 --- a/tests/glfwinfo.c +++ b/tests/glfwinfo.c @@ -318,7 +318,8 @@ int main(int argc, char** argv) int ch; bool list_extensions = false, list_layers = false; - enum { CLIENT, CONTEXT, BEHAVIOR, DEBUG, FORWARD, HELP, EXTENSIONS, LAYERS, + enum { CLIENT, CONTEXT, BEHAVIOR, DEBUG_CONTEXT, FORWARD, HELP, + EXTENSIONS, LAYERS, MAJOR, MINOR, PROFILE, ROBUSTNESS, VERSION, REDBITS, GREENBITS, BLUEBITS, ALPHABITS, DEPTHBITS, STENCILBITS, ACCUMREDBITS, ACCUMGREENBITS, ACCUMBLUEBITS, ACCUMALPHABITS, @@ -329,7 +330,7 @@ int main(int argc, char** argv) { "behavior", 1, NULL, BEHAVIOR }, { "client-api", 1, NULL, CLIENT }, { "context-api", 1, NULL, CONTEXT }, - { "debug", 0, NULL, DEBUG }, + { "debug", 0, NULL, DEBUG_CONTEXT }, { "forward", 0, NULL, FORWARD }, { "help", 0, NULL, HELP }, { "list-extensions", 0, NULL, EXTENSIONS }, @@ -420,7 +421,7 @@ int main(int argc, char** argv) } break; case 'd': - case DEBUG: + case DEBUG_CONTEXT: glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); break; case 'f':