mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Fix two more Windows/MinGW compile errors
- net_platform.hpp: guard ssize_t typedef with !__MINGW32__ since MinGW-w64 already defines ssize_t as __int64 in corecrt.h - logger.hpp: push/pop ERROR macro around LogLevel enum (same wingdi.h clash as world_packets.hpp)
This commit is contained in:
parent
254486d428
commit
456aa90eda
2 changed files with 10 additions and 1 deletions
|
|
@ -9,6 +9,10 @@
|
||||||
namespace wowee {
|
namespace wowee {
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#pragma push_macro("ERROR")
|
||||||
|
#undef ERROR
|
||||||
|
#endif
|
||||||
enum class LogLevel {
|
enum class LogLevel {
|
||||||
DEBUG,
|
DEBUG,
|
||||||
INFO,
|
INFO,
|
||||||
|
|
@ -16,6 +20,9 @@ enum class LogLevel {
|
||||||
ERROR,
|
ERROR,
|
||||||
FATAL
|
FATAL
|
||||||
};
|
};
|
||||||
|
#ifdef _WIN32
|
||||||
|
#pragma pop_macro("ERROR")
|
||||||
|
#endif
|
||||||
|
|
||||||
class Logger {
|
class Logger {
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@
|
||||||
#pragma comment(lib, "ws2_32.lib")
|
#pragma comment(lib, "ws2_32.lib")
|
||||||
|
|
||||||
using socket_t = SOCKET;
|
using socket_t = SOCKET;
|
||||||
using ssize_t = int; // recv/send return int on Windows
|
#ifndef __MINGW32__
|
||||||
|
using ssize_t = int; // recv/send return int on MSVC
|
||||||
|
#endif
|
||||||
|
|
||||||
inline constexpr socket_t INVALID_SOCK = INVALID_SOCKET;
|
inline constexpr socket_t INVALID_SOCK = INVALID_SOCKET;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue