]> granicus.if.org Git - clang/commitdiff
predefine the macro linux when compiled on a linux system. this fixes the build of...
authorNuno Lopes <nunoplopes@sapo.pt>
Sat, 5 Jul 2008 17:58:44 +0000 (17:58 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Sat, 5 Jul 2008 17:58:44 +0000 (17:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53145 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 32ee8f0c817c8580777734db1f52e30cba6168a2..577e64a5cfeb09ebc208c14e52d615478759aa96 100644 (file)
@@ -433,6 +433,11 @@ static void InitializePredefinedMacros(Preprocessor &PP,
   DefineBuiltinMacro(Buf, "__FINITE_MATH_ONLY__=0");
   DefineBuiltinMacro(Buf, "__NO_INLINE__=1");
   DefineBuiltinMacro(Buf, "__PIC__=1");
+
+/* FIXME: this check should be moved to the configure process */
+#ifdef linux
+  DefineBuiltinMacro(Buf, "linux=1");
+#endif
   
   
   if (PP.getLangOptions().CPlusPlus) {