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:
John Colvin committed 2022-10-12 20:13:18 -04:00
1 parent 24059df312
commit 9d79490a20
27 files changed
+43 -43

No files matched your search

+2 -2
View File
@@ -13,7 +13,7 @@
#include "lib/config/protos/quickbus_cfg.pb.h"
#include "lib/config/protos/system.pb.h"
#ifdef WIN32
#ifdef _WIN32
#include <excpt.h>
#endif
@@ -59,7 +59,7 @@ CAPI Quickbus *api_create_quickbus(const char *qbconfig, long length) {
}
CAPI void api_destroy_quickbus(Quickbus *qbus) {
#ifndef WIN32
#ifndef _WIN32
if (qbus != nullptr) {
delete qbus;
}
+2 -2
View File
@@ -29,7 +29,7 @@
#include "lib/config_defaults.h"
#include "lib/config_proto_files.h"
#ifdef WIN32
#ifdef _WIN32
#include <Winsock2.h>
#include <d2d1.h>
#else
@@ -566,7 +566,7 @@ void ConfigurationState::generate_all_config_proto(
&bts_config_dp, config_message, message_desc, ++field_number);
}
} else {
#ifdef WIN32
#ifdef _WIN32
// on linux the linker might throw away config protos that
// are not used in sparkd. On windows we build a dll so that
// should not happen
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#ifndef WIN32
#ifndef _WIN32
#include <bits/stdint-uintn.h>
#endif
#include <cstdint>
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "OutFIX.h"
namespace bts {
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "AsyncReader.h"
#include "IConnection.h"
+1 -1
View File
@@ -1,3 +1,3 @@
#ifndef WIN32
#ifndef _WIN32
#include "IConnection.h"
#endif
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "JetFIXGateway.h"
namespace bts {
+1 -1
View File
@@ -34,7 +34,7 @@ struct LogRec {
};
GCC_DIAG_RESTORE()
#ifndef WIN32
#ifndef _WIN32
// static_assert(sizeof(LogRec) == 256, "LogRec should be 128 bytes");
#endif
+3 -3
View File
@@ -13,7 +13,7 @@
#include <fstream>
#include <iostream>
#ifndef WIN32
#ifndef _WIN32
#include <syslog.h>
#endif
@@ -22,7 +22,7 @@ namespace log {
struct InitSysLog {
InitSysLog() {
#ifndef WIN32
#ifndef _WIN32
openlog("spark", 0, LOG_USER);
#endif
}
@@ -72,7 +72,7 @@ Sink console_sink(LoggingConfig const &) {
}
Sink syslog_sink(LoggingConfig const &cfg) {
#ifdef WIN32
#ifdef _WIN32
return null_sink();
#else
auto f = formatter(cfg);
+1 -1
View File
@@ -134,7 +134,7 @@ MDProducer::MDProducer(Platform platform, MDProducerFlags flags)
: _mutex(new std::mutex()), _producers(), _id_recorder(),
_platform(platform), _flags(flags),
_smapper(flags & MDProducerFlags::SecurityMapper) {}
#ifndef WIN32
#ifndef _WIN32
MDProducer::MDProducer(
Platform platform, SecurityIDRecorder recorder, MDProducerFlags flags)
: _mutex(new std::mutex()), _producers(),
+1 -1
View File
@@ -1,6 +1,6 @@
#include "SecurityDB.h"
#include "lib/logging/logging.h"
#ifndef WIN32
#ifndef _WIN32
#include <SQLiteCpp/SQLiteCpp.h>
#include <sqlite/sqlite3.h>
+1 -1
View File
@@ -1,5 +1,5 @@
#include "lib/domain_model/Security.h"
#ifndef WIN32
#ifndef _WIN32
#include "SecurityIDRecorder.h"
#include "lib/config/config.h"
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#ifndef WIN32
#ifndef _WIN32
#include "MDProducerHandle.h"
#include "common.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "SettlementRecorder.h"
#include "lib/config/config.h"
#include "lib/config/protos/system.pb.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "SyntheticSecurityService.h"
#include "lib/api/public/ServiceContext.h"
+4 -4
View File
@@ -165,7 +165,7 @@ class Co2Tests {
"}");
}
#ifndef WIN32
#ifndef _WIN32
void test_security_id_recorder(const std::string &db_name) {
// Verify callbacks happen after work complete
auto db1 = sqlite::open_db(db_name.c_str());
@@ -1037,7 +1037,7 @@ class Co2Tests {
REQUIRE(security_count == 5);
}
#ifndef WIN32
#ifndef _WIN32
void test_settlement_recorder() {
using namespace datetime;
security_key k1 = 401, k2 = 402;
@@ -1136,7 +1136,7 @@ TEST_CASE("CO2Tests", "[md]") {
co2_tests->setup();
#ifndef WIN32
#ifndef _WIN32
SECTION("test_security_id_recorder") {
co2_tests->test_security_id_recorder(":memory:");
co2_tests->test_security_id_recorder("file::memory:?cache=shared");
@@ -1175,7 +1175,7 @@ TEST_CASE("CO2Tests", "[md]") {
SECTION("test_retry_unresolved_spread") {
co2_tests->test_retry_unresolved_spread();
}
#ifndef WIN32
#ifndef _WIN32
SECTION("test_settlement_recorder") {
co2_tests->test_settlement_recorder();
}
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "OnixsUtils.h"
#include "lib/config/config.h"
#include "lib/config/protos/market_data.pb.h"
+3 -3
View File
@@ -51,7 +51,7 @@
#include <boost/filesystem.hpp>
#ifdef WIN32
#ifdef _WIN32
#pragma comment(lib, "wbemuuid.lib")
#endif
@@ -616,7 +616,7 @@ std::string get_qualifier() {
}
void enable_core_dumps() {
#ifndef WIN32
#ifndef _WIN32
struct rlimit core_limits;
core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY;
setrlimit(RLIMIT_CORE, &core_limits);
@@ -629,7 +629,7 @@ int get_random_port() {
}
int num_cores() {
#ifdef WIN32
#ifdef _WIN32
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
+1 -1
View File
@@ -95,7 +95,7 @@ void TablePublisher::disconnect() {
}
}
#ifndef WIN32
#ifndef _WIN32
void TablePublisher::publish(std::initializer_list<Change> const &changes) {
publish(std::vector<Change>(changes));
}
+1 -1
View File
@@ -29,7 +29,7 @@ class BTS_EXPORT TablePublisher {
TablePublisher &operator=(TablePublisher &&src);
bool is_null() const;
#ifndef WIN32
#ifndef _WIN32
void publish(std::initializer_list<Change> const &changes);
#endif
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#ifndef NO_CPP0X
#ifndef __clang__
#pragma GCC diagnostic push
+2 -2
View File
@@ -4,7 +4,7 @@
#include <google/protobuf/timestamp.pb.h>
#include <string>
#ifndef WIN32
#ifndef _WIN32
#include <sys/time.h>
#endif
@@ -37,7 +37,7 @@ template <class T> T from_string(const std::string &str) {
return result;
}
#ifndef WIN32
#ifndef _WIN32
inline google::protobuf::Timestamp pb_now() {
::google::protobuf::Timestamp result;
struct timeval tv;
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef WIN32
#ifndef _WIN32
#include "Sqlite_utils.h"
#include "bts_assert.h"
#include <cstring>
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#ifndef WIN32
#ifndef _WIN32
#include "lib/utils/bts_assert.h"
#include <memory>
#include <sqlite/sqlite3.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#include <sys/stat.h>
inline bool is_debugger_present() {
#ifdef WIN32
#ifdef _WIN32
return IsDebuggerPresent();
#else
char buf[1024];
+1 -1
View File
@@ -231,7 +231,7 @@ void FIX_timestamp(PTime const &t, std::string *out) {
int frac_ms = t.time_of_day().total_milliseconds() - whole_ms;
out->resize(sizeof("20121204-14:44:02.000"));
#ifdef WIN32
#ifdef _WIN32
_snprintf(
&(*out)[0], out->size(), "%04d%02d%02d-%02d:%02d:%02d.%03d",
(int)t.date().year(), t.date().month().as_number(),
+7 -7
View File
@@ -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;