summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergiu Deitsch <sergiu.deitsch@gmail.com>2017-01-17 11:47:11 (GMT)
committerSergiu Deitsch <sergiu.deitsch@gmail.com>2017-01-17 11:47:11 (GMT)
commit96a09ae01a3e0a68e03f27e1df8d911b04eaa348 (patch)
treed9debca12576db5f10d582c0a0f0d045a199cb06 /src
parentb6a5e0524c28178985f0d228e9eaa43808dbec3c (diff)
downloadglog-96a09ae01a3e0a68e03f27e1df8d911b04eaa348.zip
glog-96a09ae01a3e0a68e03f27e1df8d911b04eaa348.tar.gz
glog-96a09ae01a3e0a68e03f27e1df8d911b04eaa348.tar.bz2
fixed cygwin compilation errors
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 5c88e58..133e708 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -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().