fix build (client): Change 'WIN32' macros to '_WIN32'
Not sure exactly how this broke, but the WIN32 macro is no longer defined.
This commit is contained in:
1 parent
35371fe971
commit
3b1a2357cc
27 files changed
+43
-43
No files matched your search
@@ -7,7 +7,7 @@
|
||||
#include <boost/regex.hpp>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ config::ThreadGroupCfg get_thread_cfg(std::string const &name) {
|
||||
|
||||
std::vector<uint32_t> get_affinity(std::string const &name) {
|
||||
std::vector<uint32_t> result;
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
auto cfg = get_thread_cfg(name);
|
||||
if (cfg.exclude()) {
|
||||
auto total_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
@@ -42,7 +42,7 @@ std::vector<uint32_t> get_affinity(std::string const &name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
void configure_thread(
|
||||
std::string const &name, config::ThreadGroupCfg const &cfg, pthread_t t) {
|
||||
if (cfg.core().size()) {
|
||||
@@ -72,7 +72,7 @@ void configure_thread(
|
||||
#endif
|
||||
|
||||
void configure_current_thread(std::string const &name) {
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
configure_thread(name, get_thread_cfg(name), pthread_self());
|
||||
#endif
|
||||
os::set_thread_name(name);
|
||||
@@ -80,7 +80,7 @@ void configure_current_thread(std::string const &name) {
|
||||
|
||||
void configure_current_thread(
|
||||
std::string const &name, config::ThreadGroupCfg const &cfg) {
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
configure_thread(name, cfg, pthread_self());
|
||||
#endif
|
||||
os::set_thread_name(name);
|
||||
@@ -93,7 +93,7 @@ std::thread make_thread_from_function(
|
||||
c();
|
||||
});
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
configure_thread(name, get_thread_cfg(name), result.native_handle());
|
||||
#endif
|
||||
return result;
|
||||
@@ -107,7 +107,7 @@ std::thread make_thread_from_function(
|
||||
os::set_thread_name(name);
|
||||
c();
|
||||
});
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
configure_thread(name, cfg, result.native_handle());
|
||||
#endif
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user