defines for building on Hurd and BSD kernels
This commit is contained in:
committed by
Robert Osfield
parent
a4c9cac2a8
commit
af9d8889c8
@@ -43,8 +43,10 @@
|
||||
#endif
|
||||
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MACH__)
|
||||
#include <sys/types.h>
|
||||
#if !defined (__GNU__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#ifndef PAGE_SIZE
|
||||
@@ -1012,7 +1014,7 @@ int Thread::microSleep(unsigned int microsec)
|
||||
//
|
||||
int OpenThreads::GetNumberOfProcessors()
|
||||
{
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || defined(__GNU__)
|
||||
long ret = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (ret == -1)
|
||||
return 0;
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
using std::tolower;
|
||||
#endif
|
||||
|
||||
#if defined(__GNU__) && !defined(PATH_MAX)
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const char * const PATH_SEPARATORS = "/\\";
|
||||
|
||||
Reference in New Issue
Block a user