[cfe-commits] r53145 - /cfe/trunk/lib/Lex/Preprocessor.cpp

Nuno Lopes nunoplopes at sapo.pt
Sat Jul 5 10:58:44 PDT 2008


Author: nlopes
Date: Sat Jul  5 12:58:44 2008
New Revision: 53145

URL: http://llvm.org/viewvc/llvm-project?rev=53145&view=rev
Log:
predefine the macro linux when compiled on a linux system. this fixes the build of libtidy

Modified:
    cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=53145&r1=53144&r2=53145&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sat Jul  5 12:58:44 2008
@@ -433,6 +433,11 @@
   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) {





More information about the cfe-commits mailing list