Disallow defining macros whose names start with "__" or "GL_".

The GLSL specification reserves these for future use.
diff --git a/glcpp-parse.y b/glcpp-parse.y
index dd8e133..5072c48 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -1345,12 +1345,30 @@
 }
 
 void
+_check_for_reserved_macro_name (const char *identifier)
+{
+	/* According to the GLSL specification, macro names starting with "__"
+	 * or "GL_" are reserved for future use.  So, don't allow them.
+	 */
+	if (strncmp(identifier, "__", 2) == 0) {
+		fprintf (stderr, "Error: Macro names starting with \"__\" are reserved.\n");
+		exit(1);
+	}
+	if (strncmp(identifier, "GL_", 3) == 0) {
+		fprintf (stderr, "Error: Macro names starting with \"GL_\" are reserved.\n");
+		exit(1);
+	}
+}
+
+void
 _define_object_macro (glcpp_parser_t *parser,
 		      const char *identifier,
 		      token_list_t *replacements)
 {
 	macro_t *macro;
 
+	_check_for_reserved_macro_name(identifier);
+
 	macro = xtalloc (parser, macro_t);
 
 	macro->is_function = 0;
@@ -1369,6 +1387,8 @@
 {
 	macro_t *macro;
 
+	_check_for_reserved_macro_name(identifier);
+
 	macro = xtalloc (parser, macro_t);
 
 	macro->is_function = 1;