lanurmi: Fixed threads handling when using Sun compiler

This commit is contained in:
Daniel Marjamäki 2010-01-14 22:01:33 +01:00
parent b9f09679c7
commit cca39ac1b7
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@
#include "cppcheck.h" #include "cppcheck.h"
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
#if defined(__GNUC__) && !defined(__MINGW32__) #if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
@ -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) bool ThreadExecutor::handleRead(unsigned int &result)
{ {

View File

@ -45,7 +45,7 @@ private:
ErrorLogger &_errorLogger; ErrorLogger &_errorLogger;
unsigned int _fileCount; unsigned int _fileCount;
#if defined(__GNUC__) && !defined(__MINGW32__) #if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)
private: private:
bool handleRead(unsigned int &result); bool handleRead(unsigned int &result);
void writeToPipe(char type, const std::string &data); void writeToPipe(char type, const std::string &data);