aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-03-11 20:13:40 +0200
committerRiccardo Spagni <ric@spagni.net>2016-03-11 20:13:40 +0200
commitc276483dbb7ca595eddc553cfaf168440d61d380 (patch)
tree0358d4709d6ba9f29faf113c2b87dacbd4028103 /contrib
parentMerge pull request #710 (diff)
parentWIN32 thread_id is OS-dependent not compiler-dependent (diff)
downloadmonero-c276483dbb7ca595eddc553cfaf168440d61d380.tar.xz
Merge pull request #711
52056dc WIN32 thread_id is OS-dependent not compiler-dependent (Howard Chu) 87d39f3 WIN32: Need getpid() declaration (Howard Chu)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/include/misc_os_dependent.h8
-rw-r--r--contrib/otshell_utils/utils.cpp1
2 files changed, 8 insertions, 1 deletions
diff --git a/contrib/epee/include/misc_os_dependent.h b/contrib/epee/include/misc_os_dependent.h
index 4d9c991e4..2abca0446 100644
--- a/contrib/epee/include/misc_os_dependent.h
+++ b/contrib/epee/include/misc_os_dependent.h
@@ -52,6 +52,12 @@ namespace misc_utils
{
#if defined(_MSC_VER)
return ::GetTickCount64();
+#elif defined(WIN32)
+# if defined(WIN64)
+ return GetTickCount64();
+# else
+ return GetTickCount();
+# endif
#elif defined(__MACH__)
clock_serv_t cclock;
mach_timespec_t mts;
@@ -98,7 +104,7 @@ namespace misc_utils
inline std::string get_thread_string_id()
{
-#if defined(_MSC_VER)
+#if defined(_WIN32)
return boost::lexical_cast<std::string>(GetCurrentThreadId());
#elif defined(__GNUC__)
return boost::lexical_cast<std::string>(pthread_self());
diff --git a/contrib/otshell_utils/utils.cpp b/contrib/otshell_utils/utils.cpp
index e1d7d9a14..bbae7c654 100644
--- a/contrib/otshell_utils/utils.cpp
+++ b/contrib/otshell_utils/utils.cpp
@@ -32,6 +32,7 @@
#if defined(OS_TYPE_WINDOWS)
#include <windows.h>
+ #include <process.h>
#elif defined(OS_TYPE_POSIX)
#include <sys/types.h>
#include <sys/stat.h>