summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2017-07-06 06:00:06 (GMT)
committerGitHub <noreply@github.com>2017-07-06 06:00:06 (GMT)
commita808e435b72f431120554dda86a1bc1a6ec71bae (patch)
tree11a15aaa5a00b3c0ce66d46408bd7242cf2ba1b1 /src
parenta835da8e088273066c32c3cb0e8ff69d54071217 (diff)
parent96a09ae01a3e0a68e03f27e1df8d911b04eaa348 (diff)
downloadglog-a808e435b72f431120554dda86a1bc1a6ec71bae.zip
glog-a808e435b72f431120554dda86a1bc1a6ec71bae.tar.gz
glog-a808e435b72f431120554dda86a1bc1a6ec71bae.tar.bz2
Merge pull request #157 from sergiud/cygwin-support
Cygwin support
Diffstat (limited to 'src')
-rw-r--r--src/googletest.h4
-rw-r--r--src/utilities.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/googletest.h b/src/googletest.h
index b4677b2..12ea454 100644
--- a/src/googletest.h
+++ b/src/googletest.h
@@ -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
diff --git a/src/utilities.cc b/src/utilities.cc
index e73cee0..9d5b123 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -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().