From 932ab0d61d65b0077f6fee35012129dc3d6d50fb Mon Sep 17 00:00:00 2001
From: Yann Dirson <ydirson@free.fr>
Date: Sun, 22 Sep 2013 21:12:18 +0200
Subject: [PATCH] Check for __unix__ instead of __linux and __linux__

---
 library/tulip-core/include/tulip/SystemDefinition.h | 2 +-
 library/tulip-python/bindings/tulip-gui/Module.sip  | 2 +-
 thirdparty/OGDF/include/coin/CoinSignal.hpp         | 2 +-
 thirdparty/OGDF/test/gtest/gtest.h                  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/library/tulip-core/include/tulip/SystemDefinition.h b/library/tulip-core/include/tulip/SystemDefinition.h
index e30d2af..c0adec1 100644
--- a/library/tulip-core/include/tulip/SystemDefinition.h
+++ b/library/tulip-core/include/tulip/SystemDefinition.h
@@ -25,7 +25,7 @@
 #define OS_PLATFORM "win"
 #elif defined(__APPLE__)
 #define OS_PLATFORM "mac"
-#elif defined(__linux__)
+#elif defined(__unix__)
 #define OS_PLATFORM "linux"
 #else
 #define OS_PLATFORM "other"
diff --git a/library/tulip-python/bindings/tulip-gui/Module.sip b/library/tulip-python/bindings/tulip-gui/Module.sip
index f2d69af..9cb80d2 100644
--- a/library/tulip-python/bindings/tulip-gui/Module.sip
+++ b/library/tulip-python/bindings/tulip-gui/Module.sip
@@ -25,7 +25,7 @@ bool initQt = true;
 
 // test if there is an X server running on linux
 // special case for PPA build, otherwise Python documentation is not generated
-#if defined(__linux)
+#if defined(__unix__)
 char *display = getenv("DISPLAY");
 initQt = (display != NULL);
 #endif
diff --git a/thirdparty/OGDF/include/coin/CoinSignal.hpp b/thirdparty/OGDF/include/coin/CoinSignal.hpp
index 2deae78..7952669 100644
--- a/thirdparty/OGDF/include/coin/CoinSignal.hpp
+++ b/thirdparty/OGDF/include/coin/CoinSignal.hpp
@@ -22,7 +22,7 @@
 
 //-----------------------------------------------------------------------------
 
-#if (defined(__GNUC__) && defined(__linux__))
+#if (defined(__GNUC__) && defined(__unix__))
   typedef sighandler_t CoinSighandler_t;
 # define CoinSighandler_t_defined
 #endif
diff --git a/thirdparty/OGDF/test/gtest/gtest.h b/thirdparty/OGDF/test/gtest/gtest.h
index 3143bd6..960b248 100644
--- a/thirdparty/OGDF/test/gtest/gtest.h
+++ b/thirdparty/OGDF/test/gtest/gtest.h
@@ -322,7 +322,7 @@
 # endif  // _WIN32_WCE
 #elif defined __APPLE__
 # define GTEST_OS_MAC 1
-#elif defined __linux__
+#elif defined __unix__
 # define GTEST_OS_LINUX 1
 # ifdef ANDROID
 #  define GTEST_OS_LINUX_ANDROID 1
-- 
2.6.2

