From cca39ac1b71bbffecaa64102d4c0d3c584b5f7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 14 Jan 2010 22:01:33 +0100 Subject: [PATCH] lanurmi: Fixed threads handling when using Sun compiler --- cli/threadexecutor.cpp | 6 +++--- cli/threadexecutor.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 8024fa362..7ac40f2ce 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -20,7 +20,7 @@ #include "cppcheck.h" #include #include -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) #include #include #include @@ -41,10 +41,10 @@ ThreadExecutor::~ThreadExecutor() } /////////////////////////////////////////////////////////////////////////////// -////// This code is for __GNUC__ only ///////////////////////////////////////// +////// This code is for __GNUC__ and __sun only /////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) bool ThreadExecutor::handleRead(unsigned int &result) { diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 4679cf979..0a1ea8201 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -45,7 +45,7 @@ private: ErrorLogger &_errorLogger; unsigned int _fileCount; -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) private: bool handleRead(unsigned int &result); void writeToPipe(char type, const std::string &data);