From bfe44bc312bf04c6e61436e7e9c9f4adbf20624b Mon Sep 17 00:00:00 2001
From: Yann Dirson <ydirson@free.fr>
Date: Fri, 18 May 2012 15:26:44 +0200
Subject: [PATCH] Check for __unix__ instead of __linux

---
 library/tulip/include/tulip/ConsoleUtils.h     |    2 +-
 library/tulip/include/tulip/SystemDefinition.h |    4 ++--
 software/crash_handling/CrashHandling.cpp      |    2 +-
 software/crash_handling/StackWalker.cpp        |    2 +-
 software/crash_handling/StackWalker.h          |    2 +-
 software/tulip/src/TulipApp.cpp                |    2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/library/tulip/include/tulip/ConsoleUtils.h b/library/tulip/include/tulip/ConsoleUtils.h
index 9d2dc14..ecf74e4 100755
--- a/library/tulip/include/tulip/ConsoleUtils.h
+++ b/library/tulip/include/tulip/ConsoleUtils.h
@@ -31,7 +31,7 @@
 #include <io.h>
 #endif
 
-#if defined(__linux) || defined(__APPLE__)
+#if defined(__unix__) || defined(__APPLE__)
 
 #include <termios.h>
 #include <sys/ioctl.h>
diff --git a/library/tulip/include/tulip/SystemDefinition.h b/library/tulip/include/tulip/SystemDefinition.h
index 6627ed2..0fa2e90 100755
--- a/library/tulip/include/tulip/SystemDefinition.h
+++ b/library/tulip/include/tulip/SystemDefinition.h
@@ -5,8 +5,8 @@
 #define OS_PLATFORM "win"
 #elif defined(__APPLE__)
 #define OS_PLATFORM "mac"
-#elif defined(__linux)
-#define OS_PLATFORM "linux"
+#elif defined(__unix__)
+#define OS_PLATFORM "unix/linux"
 #else
 #define OS_PLATFORM "other"
 #endif
diff --git a/software/crash_handling/CrashHandling.cpp b/software/crash_handling/CrashHandling.cpp
index 7319181..1f2520e 100755
--- a/software/crash_handling/CrashHandling.cpp
+++ b/software/crash_handling/CrashHandling.cpp
@@ -31,7 +31,7 @@ using namespace std;
 /*
   Linux/MacOS-specific handling
  */
-#if defined(__linux) || defined(__APPLE__)
+#if defined(__unix__) || defined(__APPLE__)
 
 #include "UnixSignalInterposer.h"
 
diff --git a/software/crash_handling/StackWalker.cpp b/software/crash_handling/StackWalker.cpp
index 49d0463..d0dfa97 100755
--- a/software/crash_handling/StackWalker.cpp
+++ b/software/crash_handling/StackWalker.cpp
@@ -29,7 +29,7 @@ void StackWalker::printCallStackToStdErr(unsigned int maxDepth) {
   printCallStack(std::cerr, maxDepth);
 }
 
-#if defined(__linux) || defined(__APPLE__)
+#if defined(__unix__) || defined(__APPLE__)
 
 #include <cxxabi.h>
 #ifndef __APPLE__
diff --git a/software/crash_handling/StackWalker.h b/software/crash_handling/StackWalker.h
index 8675f3c..f43dafb 100755
--- a/software/crash_handling/StackWalker.h
+++ b/software/crash_handling/StackWalker.h
@@ -83,7 +83,7 @@ public:
 
 };
 
-#if defined(__linux) || defined(__APPLE__)
+#if defined(__unix__) || defined(__APPLE__)
 
 #include <map>
 
diff --git a/software/tulip/src/TulipApp.cpp b/software/tulip/src/TulipApp.cpp
index 6b2dd69..92b1ecb 100755
--- a/software/tulip/src/TulipApp.cpp
+++ b/software/tulip/src/TulipApp.cpp
@@ -238,7 +238,7 @@ void TulipApp::startTulip() {
   assistantProcess= new QProcess(this);
   std::string assistantPath(tlp::TulipLibDir);
   assistantPath += string("../");
-#if defined(__linux__)
+#if defined(__unix__)
   assistantPath += string("bin");
 
   // check if we are in a bundle
-- 
1.7.10

