From 6a7c8544e15baf40f97d8d1215b0f8f53b8b9564 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 29 Aug 2015 09:53:27 +1000 Subject: [PATCH] Skip #ifdef block for extensions detected purely from extension string. --- auto/bin/make_list.pl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index 27bc27c..310ed3a 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -42,11 +42,14 @@ if (@ARGV) #my $pextvar = prefix_varname($extvar); - print "#ifdef $extname\n"; + if (length($extstring) && $extstring !~ /^GL_/ || keys %$functions) + { + print "#ifdef $extname\n"; + } if (length($extstring) && $extstring !~ /^GL_/) { - print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n"; + print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n"; } if (keys %$functions) @@ -60,7 +63,11 @@ if (@ARGV) print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; } } - print "#endif /* $extname */\n"; + + if (length($extstring) && $extstring !~ /^GL_/ || keys %$functions) + { + print "#endif /* $extname */\n"; + } } }