fixed cygwin compilation errors

This commit is contained in:
Sergiu Deitsch 2017-01-17 12:47:11 +01:00
parent b6a5e0524c
commit 96a09ae01a
2 changed files with 3 additions and 3 deletions

View File

@ -521,7 +521,7 @@ class Thread {
virtual ~Thread() {}
void SetJoinable(bool) {}
#if defined(OS_WINDOWS) || defined(OS_CYGWIN)
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
void Start() {
handle_ = CreateThread(NULL,
0,
@ -554,7 +554,7 @@ class Thread {
return NULL;
}
#if defined(OS_WINDOWS) || defined(OS_CYGWIN)
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
HANDLE handle_;
DWORD th_;
#else

View File

@ -266,7 +266,7 @@ pid_t GetTID() {
// If gettid() could not be used, we use one of the following.
#if defined OS_LINUX
return getpid(); // Linux: getpid returns thread ID when gettid is absent
#elif defined OS_WINDOWS || defined OS_CYGWIN
#elif defined OS_WINDOWS && !defined OS_CYGWIN
return GetCurrentThreadId();
#else
// If none of the techniques above worked, we use pthread_self().