lanurmi: Fixed threads handling when using Sun compiler
This commit is contained in:
parent
b9f09679c7
commit
cca39ac1b7
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue