]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Set correct macro for PP based on the selected standard
authorDale Weiler <killfieldengine@gmail.com>
Sat, 24 Nov 2012 00:37:36 +0000 (00:37 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 24 Nov 2012 00:37:36 +0000 (00:37 +0000)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index 4cdfb68fbf6f04042722ee102be0097b4c90628a..7969231299a00b2dd8f06bafa0d33e2c8f838bde 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1363,7 +1363,15 @@ bool ftepp_init()
     ftepp = ftepp_new();
     if (!ftepp)
         return false;
-    ftepp_add_define(NULL, "GMQCC");
+    
+    /* set the right macro based on the selected standard */
+    if (opts_standard == COMPILER_FTEQCC)
+        ftepp_add_define(NULL, "FTEQCC");
+    else if (opts_standard == COMPILER_GMQCC)
+        ftepp_add_define(NULL, "GMQCC");
+    else if (opts_standard == COMPILER_QCC)
+        ftepp_add_define(NULL, "QCC");
+    
     return true;
 }