Commit a808e435 authored by Shinichiro Hamaji's avatar Shinichiro Hamaji Committed by GitHub

Merge pull request #157 from sergiud/cygwin-support

Cygwin support
parents a835da8e 96a09ae0
......@@ -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
......
......@@ -268,7 +268,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().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment