Reserve "defined" as a macro name

After lengthy debate, the GLES working group recommended that this
should be an error in WebGL, though old specs were not updated. Make
ANGLE follow the WebGL spec and generate an error in this case.

This breaks some dEQP tests which are not in line with the WebGL spec.

BUG=angleproject:1335
TEST=WebGL conformance tests

Change-Id: I93fc397094419ecbf6a1b5179631b72064149bd0
Reviewed-on: https://chromium-review.googlesource.com/352470
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/preprocessor/DirectiveParser.cpp b/src/compiler/preprocessor/DirectiveParser.cpp
index 2faa331..c1f202f 100644
--- a/src/compiler/preprocessor/DirectiveParser.cpp
+++ b/src/compiler/preprocessor/DirectiveParser.cpp
@@ -118,8 +118,8 @@
 
 bool isMacroNameReserved(const std::string &name)
 {
-    // Names prefixed with "GL_" are reserved.
-    return (name.substr(0, 3) == "GL_");
+    // Names prefixed with "GL_" and the name "defined" are reserved.
+    return name == "defined" || (name.substr(0, 3) == "GL_");
 }
 
 bool hasDoubleUnderscores(const std::string &name)