Use __linux__ macro throughout, instead of ocasional __linux.
authorSylvestre Ledru <sylvestre@debian.org>
Wed, 30 Jul 2014 08:33:21 +0000 (08:33 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 30 Jul 2014 08:33:21 +0000 (08:33 +0000)
__linux is not universally defined across all standards versions, compilers and architectures. Specifically at C99 and up, it's not defined in GCC on powerpc platform.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28314

Bugzilla: http://llvm.org/bugs/show_bug.cgi?id=20380

Patch by Dimitri John Ledkov <dimitri.ledkov@canonical.com>

llvm-svn: 214291

lldb/tools/lldb-mi/MICmnLogMediumFile.cpp
lldb/tools/lldb-mi/MIUtilSystemLinux.cpp
lldb/tools/lldb-mi/MIUtilSystemLinux.h

index a14ad04..382db07 100644 (file)
@@ -28,7 +28,7 @@
 
 #if defined( _MSC_VER )
        #include "MIUtilSystemWindows.h"
-#elif defined( __FreeBSD__ ) || defined( __linux )
+#elif defined( __FreeBSD__ ) || defined( __linux__ )
        #include "MIUtilSystemLinux.h"
 #elif defined( __APPLE__ )
        #include "MIUtilSystemOsx.h"
index de14317..9c4deb4 100644 (file)
@@ -22,7 +22,7 @@
 // Include compiler configuration
 #include "MICmnConfig.h"
 
-#if defined( __FreeBSD__ ) || defined( __linux )
+#if defined( __FreeBSD__ ) || defined( __linux__ )
 
 // In-house headers:
 #include "MIUtilSystemLinux.h"
@@ -119,4 +119,4 @@ bool CMIUtilSystemLinux::GetLogFilesPath( CMIUtilString & vrwFileNamePath ) cons
        return MIstatus::success;
 }
 
-#endif // #if defined( __linux )
+#endif // #if defined( __linux__ )
index c79bcfd..0d9062a 100644 (file)
@@ -24,7 +24,7 @@
 // Include compiler configuration
 #include "MICmnConfig.h"
 
-#if defined( __FreeBSD__ ) || defined( __linux )
+#if defined( __FreeBSD__ ) || defined( __linux__ )
 
 // In-house headers:
 #include "MIUtilString.h"  
@@ -57,4 +57,4 @@ public:
 
 typedef CMIUtilSystemLinux CMIUtilSystem;
 
-#endif // #if defined( __linux )
+#endif // #if defined( __linux__ )