From 4ae0f2a1d71ca8535dff9ed51e02c4f186c81e45 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 22 Jun 2019 16:00:06 -0700 Subject: [PATCH] Remove old non-compliant win32 defines. --- CMakeLists.txt | 136 +++++------------------------ client_files/CMakeLists.txt | 2 +- client_files/export/CMakeLists.txt | 2 +- client_files/import/CMakeLists.txt | 2 +- common/CMakeLists.txt | 3 +- common/StackWalker/StackWalker.cpp | 2 +- common/StackWalker/StackWalker.h | 2 +- common/base_packet.h | 2 +- common/condition.cpp | 2 +- common/condition.h | 4 +- common/crash.cpp | 2 +- common/database.cpp | 2 +- common/database.h | 10 --- common/database_conversions.cpp | 2 +- common/database_instances.cpp | 2 +- common/dbcore.cpp | 4 +- common/dbcore.h | 2 +- common/eqemu_config.cpp | 2 +- common/eqemu_logsys.cpp | 6 +- common/global_define.h | 4 +- common/guilds.cpp | 4 +- common/ipc_mutex.cpp | 12 +-- common/memory_mapped_file.cpp | 10 +-- common/misc.cpp | 8 +- common/misc.h | 2 +- common/misc_functions.cpp | 20 ++--- common/misc_functions.h | 2 +- common/mutex.cpp | 14 +-- common/mutex.h | 4 +- common/mysql_request_result.h | 2 +- common/mysql_request_row.h | 2 +- common/packet_dump_file.cpp | 2 +- common/packet_functions.cpp | 2 +- common/proc_launcher.cpp | 16 ++-- common/proc_launcher.h | 6 +- common/ptimer.cpp | 2 +- common/rulesys.h | 7 +- common/serverinfo.cpp | 2 +- common/serverinfo.h | 2 +- common/spdat.cpp | 2 +- common/string_util.cpp | 2 +- common/timer.cpp | 4 +- common/timer.h | 2 +- common/types.h | 10 +-- common/unix.cpp | 2 +- common/unix.h | 2 +- common/useperl.h | 6 +- common/version.h | 2 +- eqlaunch/CMakeLists.txt | 2 +- eqlaunch/eqlaunch.cpp | 2 +- hc/CMakeLists.txt | 2 +- libs/libuv/CMakeLists.txt | 2 +- libs/luabind/CMakeLists.txt | 2 +- libs/recast/CMakeLists.txt | 2 +- loginserver/CMakeLists.txt | 8 +- loginserver/main.cpp | 2 +- queryserv/CMakeLists.txt | 2 +- queryserv/database.cpp | 2 +- queryserv/queryserv.cpp | 2 +- shared_memory/CMakeLists.txt | 2 +- shared_memory/main.cpp | 4 +- tests/CMakeLists.txt | 2 +- tests/cppunit/CMakeLists.txt | 2 +- ucs/CMakeLists.txt | 2 +- ucs/database.cpp | 2 +- ucs/ucs.cpp | 2 +- world/CMakeLists.txt | 2 +- world/client.cpp | 2 +- world/net.cpp | 8 +- world/net.h | 2 +- zone/CMakeLists.txt | 2 +- zone/attack.cpp | 2 +- zone/basic_functions.h | 2 +- zone/beacon.cpp | 2 +- zone/bonuses.cpp | 2 +- zone/bot_command.cpp | 2 +- zone/client.cpp | 2 +- zone/client.h | 2 +- zone/client_packet.cpp | 2 +- zone/client_process.cpp | 2 +- zone/command.cpp | 8 +- zone/corpse.cpp | 2 +- zone/embperl.h | 6 +- zone/embxs.h | 4 +- zone/encounter.cpp | 2 +- zone/entity.cpp | 8 +- zone/fearpath.cpp | 2 +- zone/forage.cpp | 2 +- zone/loottables.cpp | 2 +- zone/net.cpp | 10 +-- zone/net.h | 2 +- zone/npc.cpp | 2 +- zone/npc.h | 2 +- zone/petitions.cpp | 4 +- zone/pets.cpp | 2 +- zone/spell_effects.cpp | 2 +- zone/spells.cpp | 2 +- zone/tasks.cpp | 2 +- zone/tradeskills.cpp | 2 +- zone/tribute.cpp | 2 +- zone/tune.cpp | 2 +- zone/worldserver.cpp | 2 +- zone/zone.cpp | 4 +- 103 files changed, 192 insertions(+), 306 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ad551966..ae3281be3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,33 +1,4 @@ -#EQEmu CMake -#Variables used: -#EQEMU_DISABLE_CRT_SECURE_WARNINGS -#EQEMU_FAST_FLOATINGPOINT -#EQEMU_ENABLE_CRASH_LOGGING -#EQEMU_DISABLE_SAFESEH -#EQEMU_BUILD_MSVC_MP -#EQEMU_DEBUG_LEVEL -#EQEMU_LOG_LEVEL_STATUS -#EQEMU_LOG_LEVEL_NORMAL -#EQEMU_LOG_LEVEL_ERROR -#EQEMU_LOG_LEVEL_DEBUG -#EQEMU_LOG_LEVEL_QUEST -#EQEMU_LOG_LEVEL_COMMANDS -#EQEMU_LOG_LEVEL_CRASH -#EQEMU_DEPOP_INVALIDATES_CACHE -#EQEMU_ENABLE_BOTS -#EQEMU_DISABLE_LOGSYS -#EQEMU_COMMANDS_LOGGING -#EQEMU_BUILD_SERVER -#EQEMU_BUILD_LOGIN -#EQEMU_BUILD_TESTS -#EQEMU_BUILD_PERL -#EQEMU_BUILD_LUA -#EQEMU_SANITIZE_LUA_LIBS -#EQEMU_BUILD_CLIENT_FILES -#EQEMU_USE_MAP_MMFS -#EQEMU_MAP_DIR - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) IF(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) ENDIF() @@ -45,56 +16,12 @@ ENDIF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/dependencies" "${CMAKE_PREFIX_PATH}") -#Add our various windows definitions -IF(MSVC OR MINGW) - ADD_DEFINITIONS(-D_WINDOWS) - IF(CMAKE_CL_64) - ADD_DEFINITIONS(-DWIN64) - ELSE(CMAKE_CL_64) - ADD_DEFINITIONS(-DWIN32) - ENDIF(CMAKE_CL_64) -ENDIF(MSVC OR MINGW) +SET(CMAKE_CXX_STANDARD 11) +SET(CMAKE_CXX_STANDARD_REQUIRED ON) +SET(CMAKE_CXX_EXTENSIONS OFF) IF(MSVC) - IF(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64") - SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64") - SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64") - SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64") - SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") - IF(MSVC_VERSION GREATER 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v140/dynamic") - ELSEIF(MSVC_VERSION EQUAL 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v120/dynamic") - ELSE() - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v110/dynamic") - ENDIF() - ELSE(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86") - SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86") - SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86") - SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") - SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x86") - IF(MSVC_VERSION GREATER 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v140/dynamic") - ELSEIF(MSVC_VERSION EQUAL 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v120/dynamic") - ELSE() - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v110/dynamic") - ENDIF() - ENDIF(CMAKE_CL_64) - - #disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere - OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON) - IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) - ENDIF(EQEMU_DISABLE_CRT_SECURE_WARNINGS) - - #fast FP if you'd like it - OPTION(EQEMU_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON) - IF(EQEMU_FAST_FLOATINGPOINT) - ADD_DEFINITIONS(/fp:fast) - ENDIF(EQEMU_FAST_FLOATINGPOINT) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) #crash logging currently only works on windows x86/x64 OPTION(EQEMU_ENABLE_CRASH_LOGGING "Enable crash logging" ON) @@ -107,13 +34,6 @@ IF(MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") ENDIF(EQEMU_BUILD_MSVC_MP) - #We want to compile /MT not /MD so we change that - FOREACH(flag_var CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO) - IF(${flag_var} MATCHES "/MD") - STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - ENDIF(${flag_var} MATCHES "/MD") - ENDFOREACH(flag_var) - ADD_DEFINITIONS(-DNOMINMAX) ELSE(MSVC) #Normally set by perl but we don't use the perl flags anymore so we set it. @@ -242,21 +162,13 @@ ENDIF(EQEMU_ENABLE_BOTS) #What to build OPTION(EQEMU_BUILD_SERVER "Build the game server." ON) -OPTION(EQEMU_BUILD_LOGIN "Build the login server." OFF) +OPTION(EQEMU_BUILD_LOGIN "Build the login server." ON) OPTION(EQEMU_BUILD_HC "Build the headless client." OFF) OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF) OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON) OPTION(EQEMU_BUILD_LUA "Build Lua parser." ON) OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON) -#C++11 stuff -IF(NOT MSVC) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal") - ENDIF() -ENDIF(NOT MSVC) - #Various definitions IF(EQEMU_BUILD_PERL) ADD_DEFINITIONS(-DEMBPERL) @@ -266,12 +178,6 @@ IF(EQEMU_BUILD_LUA) ADD_DEFINITIONS(-DLUA_EQEMU) ENDIF(EQEMU_BUILD_LUA) -#Disabled until reevaluation performed -#OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF) -#IF(EQEMU_USE_MAP_MMFS) -# ADD_DEFINITIONS(-DUSE_MAP_MMFS) -#ENDIF(EQEMU_USE_MAP_MMFS) - SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.") ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL}) @@ -292,22 +198,23 @@ ADD_DEFINITIONS(-DGLM_ENABLE_EXPERIMENTAL) #Find everything we need FIND_PACKAGE(ZLIB REQUIRED) FIND_PACKAGE(MySQL REQUIRED) +FIND_PACKAGE(Boost REQUIRED) +FIND_PACKAGE(OpenSSL REQUIRED) +#FIND_PACKAGE(Sodium REQUIRED) + IF(EQEMU_BUILD_PERL) FIND_PACKAGE(PerlLibs REQUIRED) INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}") ENDIF(EQEMU_BUILD_PERL) -SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} libuv fmt recast_navigation) +SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} libuv fmt recast_navigation) -FIND_PACKAGE(Sodium REQUIRED) -IF(SODIUM_FOUND) - OPTION(EQEMU_ENABLE_SECURITY "Use Encryption For TCP Connections" ON) - IF(EQEMU_ENABLE_SECURITY) - INCLUDE_DIRECTORIES(SYSTEM "${SODIUM_INCLUDE_DIRS}") - ADD_DEFINITIONS(-DENABLE_SECURITY) - SET(SERVER_LIBS ${SERVER_LIBS} ${SODIUM_LIBRARIES}) - ENDIF() -ENDIF() +#OPTION(EQEMU_ENABLE_SECURITY "Use Encryption For TCP Connections" ON) +#IF(EQEMU_ENABLE_SECURITY) +# INCLUDE_DIRECTORIES(SYSTEM "${SODIUM_INCLUDE_DIRS}") +# ADD_DEFINITIONS(-DENABLE_SECURITY) +# SET(SERVER_LIBS ${SERVER_LIBS} ${SODIUM_LIBRARIES}) +#ENDIF() IF(WIN32) SET(SERVER_LIBS ${SERVER_LIBS} "ws2_32" "psapi" "iphlpapi" "userenv") @@ -323,13 +230,8 @@ ENDIF() IF(EQEMU_BUILD_LUA) FIND_PACKAGE(EQLua51 REQUIRED) - SET(Boost_USE_STATIC_LIBS OFF) - SET(Boost_USE_MULTITHREADED ON) - SET(Boost_USE_STATIC_RUNTIME OFF) - SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost") - FIND_PACKAGE(Boost REQUIRED) - INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}") + INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/luabind") OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON) @@ -340,6 +242,8 @@ ENDIF(EQEMU_BUILD_LUA) INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}") INCLUDE_DIRECTORIES(SYSTEM "${MySQL_INCLUDE_DIR}") +INCLUDE_DIRECTORIES(SYSTEM "${Boost_INCLUDE_DIRS}") +INCLUDE_DIRECTORIES(SYSTEM "${OPENSSL_INCLUDE_DIR}") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/common/glm") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/cereal") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/libuv/include" ) diff --git a/client_files/CMakeLists.txt b/client_files/CMakeLists.txt index 93d748dc6..a951e6d77 100644 --- a/client_files/CMakeLists.txt +++ b/client_files/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) add_subdirectory(import) add_subdirectory(export) diff --git a/client_files/export/CMakeLists.txt b/client_files/export/CMakeLists.txt index c24a01865..d3addda5d 100644 --- a/client_files/export/CMakeLists.txt +++ b/client_files/export/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(export_sources main.cpp diff --git a/client_files/import/CMakeLists.txt b/client_files/import/CMakeLists.txt index 0f779497c..03e8ec3fa 100644 --- a/client_files/import/CMakeLists.txt +++ b/client_files/import/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(import_sources main.cpp diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 3b4fbd870..4c4d16264 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,5 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(common_sources base_packet.cpp classes.cpp diff --git a/common/StackWalker/StackWalker.cpp b/common/StackWalker/StackWalker.cpp index d457a2231..2460d52b4 100644 --- a/common/StackWalker/StackWalker.cpp +++ b/common/StackWalker/StackWalker.cpp @@ -23,7 +23,7 @@ * 2005-08-05 v5 - Removed most Lint (http://www.gimpel.com/) errors... thanks to Okko Willeboordse! * **********************************************************************/ -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #include diff --git a/common/StackWalker/StackWalker.h b/common/StackWalker/StackWalker.h index 0c3236ffb..91ec9a8e7 100644 --- a/common/StackWalker/StackWalker.h +++ b/common/StackWalker/StackWalker.h @@ -9,7 +9,7 @@ * 2013-01-26 - Modified by KimLS(KLS) for EQEmu's purposes * **********************************************************************/ -#ifdef _WINDOWS +#ifdef _WIN32 // #pragma once is supported starting with _MCS_VER 1000, // so we need not to check the version (because we only support _MSC_VER >= 1100)! #pragma once diff --git a/common/base_packet.h b/common/base_packet.h index 4f47c919a..e3baf7916 100644 --- a/common/base_packet.h +++ b/common/base_packet.h @@ -23,7 +23,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #include diff --git a/common/condition.cpp b/common/condition.cpp index 334ce5d45..92cc51308 100644 --- a/common/condition.cpp +++ b/common/condition.cpp @@ -18,7 +18,7 @@ #include "condition.h" -#ifdef _WINDOWS +#ifdef _WIN32 Condition::Condition() { diff --git a/common/condition.h b/common/condition.h index 9c4cd9f7b..285a3d5d1 100644 --- a/common/condition.h +++ b/common/condition.h @@ -20,7 +20,7 @@ #include "global_define.h" #include "mutex.h" -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -30,7 +30,7 @@ class Condition { private: -#ifdef WIN32 +#ifdef _WIN32 enum { SignalEvent = 0, BroadcastEvent, diff --git a/common/crash.cpp b/common/crash.cpp index 522d5f171..8cf211ce8 100644 --- a/common/crash.cpp +++ b/common/crash.cpp @@ -2,7 +2,7 @@ #include "eqemu_logsys.h" #include "crash.h" -#if defined(_WINDOWS) && defined(CRASH_LOGGING) +#if defined(_WIN32) && defined(CRASH_LOGGING) #include "StackWalker.h" class EQEmuStackWalker : public StackWalker diff --git a/common/database.cpp b/common/database.cpp index 2c234aa64..a02196342 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -30,7 +30,7 @@ #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp diff --git a/common/database.h b/common/database.h index 307390edf..1507fcee3 100644 --- a/common/database.h +++ b/common/database.h @@ -82,17 +82,7 @@ struct VarCache_Struct { }; class PTimerList; - -#ifdef _WINDOWS -#if _MSC_VER > 1700 // greater than 2012 (2013+) # define _ISNAN_(a) std::isnan(a) -#else -# include -# define _ISNAN_(a) _isnan(a) -#endif -#else -# define _ISNAN_(a) std::isnan(a) -#endif class Database : public DBcore { public: diff --git a/common/database_conversions.cpp b/common/database_conversions.cpp index 9850dfac1..9eac894b4 100644 --- a/common/database_conversions.cpp +++ b/common/database_conversions.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp diff --git a/common/database_instances.cpp b/common/database_instances.cpp index 548a84bdb..f5600282d 100644 --- a/common/database_instances.cpp +++ b/common/database_instances.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp diff --git a/common/dbcore.cpp b/common/dbcore.cpp index 0468bdc77..a382b2b45 100644 --- a/common/dbcore.cpp +++ b/common/dbcore.cpp @@ -1,4 +1,4 @@ -#ifdef _WINDOWS +#ifdef _WIN32 #include #endif @@ -13,7 +13,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/common/dbcore.h b/common/dbcore.h index 6fd09218e..d02c5edc4 100644 --- a/common/dbcore.h +++ b/common/dbcore.h @@ -1,7 +1,7 @@ #ifndef DBCORE_H #define DBCORE_H -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #endif diff --git a/common/eqemu_config.cpp b/common/eqemu_config.cpp index cae737e98..c512f5047 100644 --- a/common/eqemu_config.cpp +++ b/common/eqemu_config.cpp @@ -152,7 +152,7 @@ void EQEmuConfig::parse_config() TerminateWait = atoi(_root["server"]["launcher"]["timers"].get("reterminate", "10000").asString().c_str()); InitialBootWait = atoi(_root["server"]["launcher"]["timers"].get("initial", "20000").asString().c_str()); ZoneBootInterval = atoi(_root["server"]["launcher"]["timers"].get("interval", "2000").asString().c_str()); -#ifdef WIN32 +#ifdef _WIN32 ZoneExe = _root["server"]["launcher"].get("exe", "zone.exe").asString(); #else ZoneExe = _root["server"]["launcher"].get("exe", "./zone").asString(); diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 89728c809..4a28d2b93 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -33,7 +33,7 @@ std::ofstream process_log; -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #include @@ -331,7 +331,7 @@ uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) */ void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message) { -#ifdef _WINDOWS +#ifdef _WIN32 HANDLE console_handle; console_handle = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_FONT_INFOEX info = { 0 }; @@ -413,7 +413,7 @@ void EQEmuLogSys::SetCurrentTimeStamp(char *time_stamp) */ void EQEmuLogSys::MakeDirectory(const std::string &directory_name) { -#ifdef _WINDOWS +#ifdef _WIN32 struct _stat st; if (_stat(directory_name.c_str(), &st) == 0) // exists return; diff --git a/common/global_define.h b/common/global_define.h index e27f313af..cd98c70d6 100644 --- a/common/global_define.h +++ b/common/global_define.h @@ -17,7 +17,7 @@ */ // WHY IS THIS UP HERE -#if defined(_DEBUG) && defined(WIN32) +#if defined(_DEBUG) && defined(_WIN32) #ifndef _CRTDBG_MAP_ALLOC #include #include @@ -27,7 +27,7 @@ #ifndef EQDEBUG_H #define EQDEBUG_H -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #endif diff --git a/common/guilds.cpp b/common/guilds.cpp index 408f28714..25cd243b1 100644 --- a/common/guilds.cpp +++ b/common/guilds.cpp @@ -23,6 +23,6 @@ #include "eq_packet_structs.h" -#ifndef WIN32 +#ifndef _WIN32 #include //for htonl -#endif \ No newline at end of file +#endif diff --git a/common/ipc_mutex.cpp b/common/ipc_mutex.cpp index 75e0a63a1..7b497e742 100644 --- a/common/ipc_mutex.cpp +++ b/common/ipc_mutex.cpp @@ -17,7 +17,7 @@ */ #include "ipc_mutex.h" -#ifdef _WINDOWS +#ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include #undef WIN32_LEAN_AND_MEAN @@ -33,7 +33,7 @@ namespace EQEmu { struct IPCMutex::Implementation { -#ifdef _WINDOWS +#ifdef _WIN32 HANDLE mut_; #else int fd_; @@ -42,7 +42,7 @@ namespace EQEmu { IPCMutex::IPCMutex(std::string name) : locked_(false) { imp_ = new Implementation; -#ifdef _WINDOWS +#ifdef _WIN32 auto Config = EQEmuConfig::get(); std::string final_name = Config->SharedMemDir + "EQEmuMutex_"; final_name += name; @@ -82,7 +82,7 @@ namespace EQEmu { } IPCMutex::~IPCMutex() { -#ifdef _WINDOWS +#ifdef _WIN32 if(locked_) { ReleaseMutex(imp_->mut_); } @@ -103,7 +103,7 @@ namespace EQEmu { return false; } -#ifdef _WINDOWS +#ifdef _WIN32 DWORD wait_result = WaitForSingleObject(imp_->mut_, INFINITE); if(wait_result != WAIT_OBJECT_0) { return false; @@ -121,7 +121,7 @@ namespace EQEmu { if(!locked_) { return false; } -#ifdef _WINDOWS +#ifdef _WIN32 if(!ReleaseMutex(imp_->mut_)) { return false; } diff --git a/common/memory_mapped_file.cpp b/common/memory_mapped_file.cpp index b8b5e2a4b..e274f3775 100644 --- a/common/memory_mapped_file.cpp +++ b/common/memory_mapped_file.cpp @@ -17,7 +17,7 @@ */ #include "memory_mapped_file.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include #else #include @@ -36,7 +36,7 @@ namespace EQEmu { struct MemoryMappedFile::Implementation { -#ifdef _WINDOWS +#ifdef _WIN32 HANDLE mapped_object_; #else int fd_; @@ -47,7 +47,7 @@ namespace EQEmu { : filename_(filename), size_(size) { imp_ = new Implementation; -#ifdef _WINDOWS +#ifdef _WIN32 DWORD total_size = size + sizeof(shared_memory_struct); HANDLE file = CreateFile(filename.c_str(), GENERIC_READ | GENERIC_WRITE, @@ -116,7 +116,7 @@ namespace EQEmu { size_ = size; fclose(f); -#ifdef _WINDOWS +#ifdef _WIN32 DWORD total_size = size + sizeof(shared_memory_struct); HANDLE file = CreateFile(filename.c_str(), GENERIC_READ | GENERIC_WRITE, @@ -172,7 +172,7 @@ namespace EQEmu { } MemoryMappedFile::~MemoryMappedFile() { -#ifdef _WINDOWS +#ifdef _WIN32 if(imp_->mapped_object_) { CloseHandle(imp_->mapped_object_); } diff --git a/common/misc.cpp b/common/misc.cpp index 792dfcbab..1b3b64f90 100644 --- a/common/misc.cpp +++ b/common/misc.cpp @@ -1,4 +1,4 @@ -#ifdef _WINDOWS +#ifdef _WIN32 // VS6 doesn't like the length of STL generated names: disabling #pragma warning(disable:4786) #endif @@ -10,7 +10,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -24,7 +24,7 @@ std::map DBFieldNames; -#ifndef WIN32 +#ifndef _WIN32 #if defined(FREEBSD) || defined(__CYGWIN__) int print_stacktrace() { @@ -526,7 +526,7 @@ std::string generate_key(int length) { std::string key; //TODO: write this for win32... -#ifndef WIN32 +#ifndef _WIN32 int i; timeval now; static const char *chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; diff --git a/common/misc.h b/common/misc.h index b33f2f32d..8324e3656 100644 --- a/common/misc.h +++ b/common/misc.h @@ -24,7 +24,7 @@ void decode(char *in, char *out); void encode_chunk(char *in, int len, char *out); void decode_chunk(char *in, char *out); -#ifndef WIN32 +#ifndef _WIN32 int print_stacktrace(); #endif diff --git a/common/misc_functions.cpp b/common/misc_functions.cpp index a85ca9c2b..b9c38e02d 100644 --- a/common/misc_functions.cpp +++ b/common/misc_functions.cpp @@ -22,19 +22,19 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #include #endif #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #endif #include "../common/timer.h" #include "../common/seperator.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf @@ -73,7 +73,7 @@ void CoutTimestamp(bool ms) { int32 filesize(FILE* fp) { -#ifdef _WINDOWS +#ifdef _WIN32 return _filelength(_fileno(fp)); #else struct stat file_stat; @@ -88,7 +88,7 @@ int32 filesize(FILE* fp) { } uint32 ResolveIP(const char* hostname, char* errbuf) { -#ifdef _WINDOWS +#ifdef _WIN32 static InitWinsock ws; #endif if (errbuf) @@ -99,14 +99,14 @@ uint32 ResolveIP(const char* hostname, char* errbuf) { return 0; } struct sockaddr_in server_sin; -#ifdef _WINDOWS +#ifdef _WIN32 PHOSTENT phostent = nullptr; #else struct hostent *phostent = nullptr; #endif server_sin.sin_family = AF_INET; if ((phostent = gethostbyname(hostname)) == nullptr) { -#ifdef _WINDOWS +#ifdef _WIN32 if (errbuf) snprintf(errbuf, ERRBUF_SIZE, "Unable to get the host name. Error: %i", WSAGetLastError()); #else @@ -115,7 +115,7 @@ uint32 ResolveIP(const char* hostname, char* errbuf) { #endif return 0; } -#ifdef _WINDOWS +#ifdef _WIN32 memcpy ((char FAR *)&(server_sin.sin_addr), phostent->h_addr, phostent->h_length); #else memcpy ((char*)&(server_sin.sin_addr), phostent->h_addr, phostent->h_length); @@ -136,7 +136,7 @@ bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf return false; } -#ifdef _WINDOWS +#ifdef _WIN32 InitWinsock::InitWinsock() { WORD version = MAKEWORD (1,1); WSADATA wsadata; @@ -157,7 +157,7 @@ const char * itoa(int num) { return temp; } -#ifndef WIN32 +#ifndef _WIN32 const char * itoa(int num, char* a,int b) { static char temp[_ITOA_BUFLEN]; memset(temp,0,_ITOA_BUFLEN); diff --git a/common/misc_functions.h b/common/misc_functions.h index d5d90d98f..a8f8bb39d 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -77,7 +77,7 @@ uint32 Catch22(uint32 mask); #define _ITOA_BUFLEN 25 const char *itoa(int num); //not thread safe -#ifndef _WINDOWS +#ifndef _WIN32 const char *itoa(int num, char* a,int b); #endif diff --git a/common/mutex.cpp b/common/mutex.cpp index 1dfacb5bb..1b15c8c11 100644 --- a/common/mutex.cpp +++ b/common/mutex.cpp @@ -25,7 +25,7 @@ #endif -#ifdef _WINDOWS +#ifdef _WIN32 bool IsTryLockSupported(); bool TrylockSupported = IsTryLockSupported(); @@ -69,7 +69,7 @@ Mutex::Mutex() { #if DEBUG_MUTEX_CLASS >= 7 std::cout << "Constructing Mutex" << std::endl; #endif -#ifdef _WINDOWS +#ifdef _WIN32 InitializeCriticalSection(&CSMutex); #else pthread_mutexattr_t attr; @@ -85,7 +85,7 @@ Mutex::Mutex() { } Mutex::~Mutex() { -#ifdef _WINDOWS +#ifdef _WIN32 DeleteCriticalSection(&CSMutex); #else #endif @@ -95,14 +95,14 @@ void Mutex::lock() { #if DEBUG_MUTEX_CLASS >= 5 if (!trylock()) { std::cout << "Locking Mutex: Having to wait" << std::endl; - #ifdef _WINDOWS + #ifdef _WIN32 EnterCriticalSection(&CSMutex); #else pthread_mutex_lock(&CSMutex); #endif } #else - #ifdef _WINDOWS + #ifdef _WIN32 EnterCriticalSection(&CSMutex); #else pthread_mutex_lock(&CSMutex); @@ -111,7 +111,7 @@ void Mutex::lock() { } bool Mutex::trylock() { -#ifdef _WINDOWS +#ifdef _WIN32 #if(_WIN32_WINNT >= 0x0400) if (TrylockSupported) return TryEnterCriticalSection(&CSMutex); @@ -129,7 +129,7 @@ bool Mutex::trylock() { } void Mutex::unlock() { -#ifdef _WINDOWS +#ifdef _WIN32 LeaveCriticalSection(&CSMutex); #else pthread_mutex_unlock(&CSMutex); diff --git a/common/mutex.h b/common/mutex.h index 48f58bcac..dd5003518 100644 --- a/common/mutex.h +++ b/common/mutex.h @@ -17,7 +17,7 @@ */ #ifndef MYMUTEX_H #define MYMUTEX_H -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #else @@ -36,7 +36,7 @@ public: bool trylock(); protected: private: -#if defined WIN32 || defined WIN64 +#if defined _WIN32 CRITICAL_SECTION CSMutex; #else pthread_mutex_t CSMutex; diff --git a/common/mysql_request_result.h b/common/mysql_request_result.h index ec9b3e57f..47157488a 100644 --- a/common/mysql_request_result.h +++ b/common/mysql_request_result.h @@ -1,7 +1,7 @@ #ifndef MYSQL_REQUEST_RESULT_H #define MYSQL_REQUEST_RESULT_H -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #endif diff --git a/common/mysql_request_row.h b/common/mysql_request_row.h index ddfbddee9..fd54f9f32 100644 --- a/common/mysql_request_row.h +++ b/common/mysql_request_row.h @@ -1,7 +1,7 @@ #ifndef MYSQL_REQUEST_ROW_H #define MYSQL_REQUEST_ROW_H -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #endif diff --git a/common/packet_dump_file.cpp b/common/packet_dump_file.cpp index ac468a639..b49eaadc3 100644 --- a/common/packet_dump_file.cpp +++ b/common/packet_dump_file.cpp @@ -29,7 +29,7 @@ //#endif #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/common/packet_functions.cpp b/common/packet_functions.cpp index dbd10f14f..5a336400b 100644 --- a/common/packet_functions.cpp +++ b/common/packet_functions.cpp @@ -23,7 +23,7 @@ #include "packet_dump.h" #include "packet_functions.h" -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/common/proc_launcher.cpp b/common/proc_launcher.cpp index b59f4e852..b8790387d 100644 --- a/common/proc_launcher.cpp +++ b/common/proc_launcher.cpp @@ -22,7 +22,7 @@ #include "global_define.h" #include "types.h" #include "proc_launcher.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include #else #include @@ -39,7 +39,7 @@ ProcLauncher ProcLauncher::s_launcher; -#ifdef _WINDOWS +#ifdef _WIN32 const ProcLauncher::ProcRef ProcLauncher::ProcError = 0xFFFFFFFF; #else const ProcLauncher::ProcRef ProcLauncher::ProcError = -1; @@ -47,7 +47,7 @@ const ProcLauncher::ProcRef ProcLauncher::ProcError = -1; ProcLauncher::ProcLauncher() { -#ifndef WIN32 +#ifndef _WIN32 if(signal(SIGCHLD, ProcLauncher::HandleSigChild) == SIG_ERR) fprintf(stderr, "Unable to register child signal handler. Thats bad."); m_signalCount = 0; @@ -55,7 +55,7 @@ ProcLauncher::ProcLauncher() } void ProcLauncher::Process() { -#ifdef _WINDOWS +#ifdef _WIN32 std::map::iterator cur, end, tmp; cur = m_running.begin(); end = m_running.end(); @@ -112,7 +112,7 @@ void ProcLauncher::ProcessTerminated(std::map::iterator &it) { if(it->second->handler != nullptr) it->second->handler->OnTerminate(it->first, it->second); -#ifdef _WINDOWS +#ifdef _WIN32 CloseHandle(it->second->proc_info.hProcess); #else //!WIN32 #endif //!WIN32 @@ -125,7 +125,7 @@ ProcLauncher::ProcRef ProcLauncher::Launch(Spec *&to_launch) { Spec *it = to_launch; to_launch = nullptr; -#ifdef _WINDOWS +#ifdef _WIN32 STARTUPINFO siStartInfo; BOOL bFuncRetn = FALSE; @@ -283,7 +283,7 @@ bool ProcLauncher::Terminate(const ProcRef &proc, bool graceful) { //we do not remove it from the list until we have been notified //that they have been terminated. -#ifdef _WINDOWS +#ifdef _WIN32 if(!TerminateProcess(res->second->proc_info.hProcess, 0)) { return(false); } @@ -325,7 +325,7 @@ void ProcLauncher::TerminateAll(bool final) { } -#ifndef WIN32 +#ifndef _WIN32 void ProcLauncher::HandleSigChild(int signum) { if(signum == SIGCHLD) { ProcLauncher::get()->m_signalCount++; diff --git a/common/proc_launcher.h b/common/proc_launcher.h index 6289579cd..f38f36493 100644 --- a/common/proc_launcher.h +++ b/common/proc_launcher.h @@ -33,7 +33,7 @@ public: static ProcLauncher *get() { return(&s_launcher); } static void ProcessInThisThread(); -#ifdef WIN32 +#ifdef _WIN32 typedef DWORD ProcRef; static const ProcRef ProcError; #else @@ -55,7 +55,7 @@ public: std::string logFile; //empty = do not redirect output. protected: //None of these fields get copied around -#ifdef WIN32 +#ifdef _WIN32 PROCESS_INFORMATION proc_info; #endif }; @@ -83,7 +83,7 @@ protected: private: static ProcLauncher s_launcher; -#ifndef WIN32 +#ifndef _WIN32 uint32 m_signalCount; static void HandleSigChild(int signum); #endif diff --git a/common/ptimer.cpp b/common/ptimer.cpp index 5a3d9617f..0b35ae489 100644 --- a/common/ptimer.cpp +++ b/common/ptimer.cpp @@ -23,7 +23,7 @@ #include "database.h" #include "string_util.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include #include int gettimeofday (timeval *tp, ...); diff --git a/common/rulesys.h b/common/rulesys.h index 710c6d612..9efb44972 100644 --- a/common/rulesys.h +++ b/common/rulesys.h @@ -121,11 +121,8 @@ private: int m_activeRuleset; std::string m_activeName; -#ifdef WIN64 - uint32 m_RuleIntValues [_IntRuleCount ]; -#else - int m_RuleIntValues [_IntRuleCount ]; -#endif + + int32 m_RuleIntValues [_IntRuleCount ]; float m_RuleRealValues[_RealRuleCount]; uint32 m_RuleBoolValues[_BoolRuleCount]; diff --git a/common/serverinfo.cpp b/common/serverinfo.cpp index aaa13e7ab..efd4e1396 100644 --- a/common/serverinfo.cpp +++ b/common/serverinfo.cpp @@ -21,7 +21,7 @@ // Implement preliminary support for *nix variants // misanthropicfiend -#ifdef _WINDOWS +#ifdef _WIN32 #include char Ver_name[100]; diff --git a/common/serverinfo.h b/common/serverinfo.h index 14425e6af..0c5932a09 100644 --- a/common/serverinfo.h +++ b/common/serverinfo.h @@ -18,7 +18,7 @@ #ifndef SERVERINFO_H #define SERVERINFO_H -#ifdef _WINDOWS +#ifdef _WIN32 extern char Ver_name[36]; extern DWORD Ver_build, Ver_min, Ver_maj, Ver_pid; int GetOS(); diff --git a/common/spdat.cpp b/common/spdat.cpp index 8006e377d..3559dae5f 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -77,7 +77,7 @@ #include "classes.h" #include "spdat.h" -#ifndef WIN32 +#ifndef _WIN32 #include #include "unix.h" #endif diff --git a/common/string_util.cpp b/common/string_util.cpp index 508304ce1..c4066ada3 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -17,7 +17,7 @@ #include "string_util.h" #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf diff --git a/common/timer.cpp b/common/timer.cpp index 120e3dea7..e1afba28f 100644 --- a/common/timer.cpp +++ b/common/timer.cpp @@ -18,7 +18,7 @@ // Disgrace: for windows compile -#ifndef WIN32 +#ifndef _WIN32 #include #else #include @@ -64,7 +64,7 @@ Timer::Timer(uint32 start, uint32 timer, bool iUseAcurateTiming = false) { } /* Reimplemented for MSVC - Bounce */ -#ifdef _WINDOWS +#ifdef _WIN32 int gettimeofday (timeval *tp, ...) { timeb tb; diff --git a/common/timer.h b/common/timer.h index 6678be952..5aecdda33 100644 --- a/common/timer.h +++ b/common/timer.h @@ -22,7 +22,7 @@ #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include "global_define.h" int gettimeofday (timeval *tp, ...); #endif diff --git a/common/types.h b/common/types.h index b3be97d32..311319487 100644 --- a/common/types.h +++ b/common/types.h @@ -29,7 +29,7 @@ typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; -#ifdef _WINDOWS +#ifdef _WIN32 #pragma warning( disable : 4200 ) #endif @@ -42,7 +42,7 @@ typedef unsigned short ushort; typedef unsigned char uchar; typedef const char Const_char; //for perl XS -#ifdef _WINDOWS +#ifdef _WIN32 #if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900)) #define snprintf _snprintf #endif @@ -61,7 +61,7 @@ typedef const char Const_char; //for perl XS #define H32(i) ((uint32) (i >> 32)) #define L16(i) ((uint16) i) -#ifndef WIN32 +#ifndef _WIN32 // More WIN32 compatability typedef unsigned long DWORD; typedef unsigned char BYTE; @@ -79,14 +79,14 @@ typedef const char Const_char; //for perl XS #endif -#ifdef _WINDOWS +#ifdef _WIN32 #define DLLFUNC extern "C" __declspec(dllexport) #else #define DLLFUNC extern "C" #endif // htonll and ntohll already defined on windows -#ifndef WIN32 +#ifndef _WIN32 # if defined(__linux__) # include # elif defined(__FreeBSD__) || defined(__NetBSD__) diff --git a/common/unix.cpp b/common/unix.cpp index 0e69a3b69..2a610c98a 100644 --- a/common/unix.cpp +++ b/common/unix.cpp @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _WINDOWS +#ifndef _WIN32 #include "unix.h" #include diff --git a/common/unix.h b/common/unix.h index d4155f946..48e4a60d1 100644 --- a/common/unix.h +++ b/common/unix.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _WINDOWS +#ifndef _WIN32 #ifndef __UNIX_H__ #define __UNIX_H__ #include diff --git a/common/useperl.h b/common/useperl.h index a6345df5d..c57866f64 100644 --- a/common/useperl.h +++ b/common/useperl.h @@ -10,16 +10,16 @@ // this doesn't do shit for C++ but libc++ and GCC 6.1+ use it to define some macros #include -#ifndef WIN32 +#ifndef _WIN32 extern "C" { //the perl headers dont do this for us... #endif #include #include -#ifndef WIN32 +#ifndef _WIN32 }; #endif -#ifdef WIN32 +#ifdef _WIN32 #ifndef snprintf #define snprintf _snprintf #endif diff --git a/common/version.h b/common/version.h index 2d3df779d..e5cf9e315 100644 --- a/common/version.h +++ b/common/version.h @@ -40,7 +40,7 @@ #endif #define COMPILE_DATE __DATE__ #define COMPILE_TIME __TIME__ -#ifndef WIN32 +#ifndef _WIN32 #define LAST_MODIFIED __TIME__ #else #define LAST_MODIFIED __TIMESTAMP__ diff --git a/eqlaunch/CMakeLists.txt b/eqlaunch/CMakeLists.txt index 260a2b5bc..fbf3d9ec3 100644 --- a/eqlaunch/CMakeLists.txt +++ b/eqlaunch/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(eqlaunch_sources eqlaunch.cpp diff --git a/eqlaunch/eqlaunch.cpp b/eqlaunch/eqlaunch.cpp index 4cb7f7b9c..ef8e5603f 100644 --- a/eqlaunch/eqlaunch.cpp +++ b/eqlaunch/eqlaunch.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) { Log(Logs::Detail, Logs::Launcher, "Could not set signal handler"); return 1; } - #ifndef WIN32 + #ifndef _WIN32 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { Log(Logs::Detail, Logs::Launcher, "Could not set signal handler"); return 1; diff --git a/hc/CMakeLists.txt b/hc/CMakeLists.txt index 1aa5805d5..ec43340dd 100644 --- a/hc/CMakeLists.txt +++ b/hc/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(hc_sources eq.cpp diff --git a/libs/libuv/CMakeLists.txt b/libs/libuv/CMakeLists.txt index 149cd80f4..ed72dcd89 100644 --- a/libs/libuv/CMakeLists.txt +++ b/libs/libuv/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.10) project(libuv) set(libuv_sources diff --git a/libs/luabind/CMakeLists.txt b/libs/luabind/CMakeLists.txt index de3b60c61..463d94557 100644 --- a/libs/luabind/CMakeLists.txt +++ b/libs/luabind/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(lb_sources src/class.cpp diff --git a/libs/recast/CMakeLists.txt b/libs/recast/CMakeLists.txt index 7f91efb38..74a54258b 100644 --- a/libs/recast/CMakeLists.txt +++ b/libs/recast/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(recast_navigation_sources detour/src/DetourAlloc.cpp diff --git a/loginserver/CMakeLists.txt b/loginserver/CMakeLists.txt index df06e7572..376513da0 100644 --- a/loginserver/CMakeLists.txt +++ b/loginserver/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(eqlogin_sources client.cpp @@ -27,14 +27,10 @@ SET(eqlogin_headers world_server.h ) -FIND_PACKAGE(OpenSSL REQUIRED) - -INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) - ADD_EXECUTABLE(loginserver ${eqlogin_sources} ${eqlogin_headers}) INSTALL(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -TARGET_LINK_LIBRARIES(loginserver ${SERVER_LIBS} ${OPENSSL_LIBRARIES}) +TARGET_LINK_LIBRARIES(loginserver ${SERVER_LIBS}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) diff --git a/loginserver/main.cpp b/loginserver/main.cpp index a77ec395f..fde9e549f 100644 --- a/loginserver/main.cpp +++ b/loginserver/main.cpp @@ -167,7 +167,7 @@ int main() return 1; } -#ifdef WIN32 +#ifdef _WIN32 #ifdef UNICODE SetConsoleTitle(L"EQEmu Login Server"); #else diff --git a/queryserv/CMakeLists.txt b/queryserv/CMakeLists.txt index 393747a91..79d7463d3 100644 --- a/queryserv/CMakeLists.txt +++ b/queryserv/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(qserv_sources database.cpp diff --git a/queryserv/database.cpp b/queryserv/database.cpp index fcda884e4..11c4fe1e9 100644 --- a/queryserv/database.cpp +++ b/queryserv/database.cpp @@ -33,7 +33,7 @@ #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp diff --git a/queryserv/queryserv.cpp b/queryserv/queryserv.cpp index cef6e40e3..326b80b3a 100644 --- a/queryserv/queryserv.cpp +++ b/queryserv/queryserv.cpp @@ -106,7 +106,7 @@ int main() { } void UpdateWindowTitle(char* iNewTitle) { -#ifdef _WINDOWS +#ifdef _WIN32 char tmp[500]; if (iNewTitle) { snprintf(tmp, sizeof(tmp), "QueryServ: %s", iNewTitle); diff --git a/shared_memory/CMakeLists.txt b/shared_memory/CMakeLists.txt index 1844df758..826a14628 100644 --- a/shared_memory/CMakeLists.txt +++ b/shared_memory/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(shared_memory_sources base_data.cpp diff --git a/shared_memory/main.cpp b/shared_memory/main.cpp index 63280adc0..0b25002a7 100644 --- a/shared_memory/main.cpp +++ b/shared_memory/main.cpp @@ -36,7 +36,7 @@ EQEmuLogSys LogSys; -#ifdef _WINDOWS +#ifdef _WIN32 #include #else #include @@ -45,7 +45,7 @@ EQEmuLogSys LogSys; inline bool MakeDirectory(const std::string &directory_name) { -#ifdef _WINDOWS +#ifdef _WIN32 struct _stat st; if (_stat(directory_name.c_str(), &st) == 0) { return false; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b404bab99..e6514d331 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) ADD_SUBDIRECTORY(cppunit) diff --git a/tests/cppunit/CMakeLists.txt b/tests/cppunit/CMakeLists.txt index e60e2134f..6247717e5 100644 --- a/tests/cppunit/CMakeLists.txt +++ b/tests/cppunit/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(cppunit_sources collectoroutput.cpp diff --git a/ucs/CMakeLists.txt b/ucs/CMakeLists.txt index e09e12781..a1a46efc2 100644 --- a/ucs/CMakeLists.txt +++ b/ucs/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(ucs_sources chatchannel.cpp diff --git a/ucs/database.cpp b/ucs/database.cpp index 5104c851d..bd6ff2c32 100644 --- a/ucs/database.cpp +++ b/ucs/database.cpp @@ -32,7 +32,7 @@ #include // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index bd36c47e6..60a7b727b 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -167,7 +167,7 @@ int main() { } void UpdateWindowTitle(char* iNewTitle) { -#ifdef _WINDOWS +#ifdef _WIN32 char tmp[500]; if (iNewTitle) { snprintf(tmp, sizeof(tmp), "UCS: %s", iNewTitle); diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index e8b999107..8afa7b4cb 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(world_sources adventure.cpp diff --git a/world/client.cpp b/world/client.cpp index bc044dae5..92c119bfc 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -60,7 +60,7 @@ //#define IPBASED_AUTH_HACK // Disgrace: for windows compile -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #else diff --git a/world/net.cpp b/world/net.cpp index e95ebb5bc..7265009aa 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -41,7 +41,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/crash.h" #include "client.h" #include "worlddb.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf #define strncasecmp _strnicmp @@ -108,7 +108,7 @@ void CatchSignal(int sig_num); void CheckForServerScript(bool force_download = false); inline void UpdateWindowTitle(std::string new_title) { -#ifdef _WINDOWS +#ifdef _WIN32 SetConsoleTitle(new_title.c_str()); #endif } @@ -160,7 +160,7 @@ int main(int argc, char** argv) { return 1; } -#ifndef WIN32 +#ifndef _WIN32 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { Log(Logs::General, Logs::World_Server, "Could not set signal handler"); return 1; @@ -604,7 +604,7 @@ void CatchSignal(int sig_num) { } void UpdateWindowTitle(char* iNewTitle) { -#ifdef _WINDOWS +#ifdef _WIN32 char tmp[500]; if (iNewTitle) { snprintf(tmp, sizeof(tmp), "World: %s", iNewTitle); diff --git a/world/net.h b/world/net.h index 06e918a5c..9227d8198 100644 --- a/world/net.h +++ b/world/net.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef WIN32 +#ifndef _WIN32 #include #include #include diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index c92102a2d..e47d5b8b9 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(zone_sources aa.cpp diff --git a/zone/attack.cpp b/zone/attack.cpp index a51cd3163..a41d2f620 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -49,7 +49,7 @@ extern QueryServ* QServ; extern WorldServer worldserver; extern FastMath g_Math; -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/zone/basic_functions.h b/zone/basic_functions.h index 3fa8ba523..70b3ac342 100644 --- a/zone/basic_functions.h +++ b/zone/basic_functions.h @@ -109,7 +109,7 @@ int GetArgs(char * string) char *buffer = com_list; memset(temp,0x0,255); //memset(buffer,0x0,512); - //#ifdef WIN32 + //#ifdef _WIN32 //strcpy(buffer,com_list); //#else //strncpy(buffer,com_list,sizeof(buffer)-1); diff --git a/zone/beacon.cpp b/zone/beacon.cpp index 81b964290..2bb837215 100644 --- a/zone/beacon.cpp +++ b/zone/beacon.cpp @@ -25,7 +25,7 @@ target to center around. class Zone; -#ifdef _WINDOWS +#ifdef _WIN32 #if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900)) #define snprintf _snprintf #define vsnprintf _vsnprintf diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 9b7354190..0589075db 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -33,7 +33,7 @@ #include "quest_parser_collection.h" -#ifndef WIN32 +#ifndef _WIN32 #include #include "../common/unix.h" #endif diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 085a730ea..77d812f62 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -41,7 +41,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define strcasecmp _stricmp #endif diff --git a/zone/client.cpp b/zone/client.cpp index 2d126598f..0b98be7a3 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -22,7 +22,7 @@ #include // for windows compile -#ifndef _WINDOWS +#ifndef _WIN32 #include #include #include diff --git a/zone/client.h b/zone/client.h index dfdfa8f8f..ff5a761cf 100644 --- a/zone/client.h +++ b/zone/client.h @@ -59,7 +59,7 @@ namespace EQEmu #include "zone.h" #include "zonedb.h" -#ifdef _WINDOWS +#ifdef _WIN32 // since windows defines these within windef.h (which windows.h include) // we are required to undefine these to use min and max from #undef min diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 554cbeba7..51ce03e6f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 5c750f03a..2ea0b5cfb 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -25,7 +25,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #define snprintf _snprintf diff --git a/zone/command.cpp b/zone/command.cpp index ad0b1c989..a0aec8975 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -39,7 +39,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define strcasecmp _stricmp #endif @@ -844,7 +844,7 @@ void command_setanim(Client *c, const Seperator *sep) void command_serverinfo(Client *c, const Seperator *sep) { -#ifdef _WINDOWS +#ifdef _WIN32 char intbuffer [sizeof(unsigned long)]; c->Message(0, "Operating system information."); c->Message(0, " %s", Ver_name); @@ -11815,7 +11815,7 @@ void command_hotfix(Client *c, const Seperator *sep) { c->Message(0, "Creating and applying hotfix"); std::thread t1([c,hotfix_name]() { -#ifdef WIN32 +#ifdef _WIN32 if(hotfix_name.length() > 0) { system(StringFormat("shared_memory -hotfix=%s", hotfix_name.c_str()).c_str()); } else { @@ -11856,7 +11856,7 @@ void command_load_shared_memory(Client *c, const Seperator *sep) { hotfix_name = sep->arg[1]; c->Message(0, "Loading shared memory segment %s", hotfix_name.c_str()); std::thread t1([c,hotfix_name]() { -#ifdef WIN32 +#ifdef _WIN32 if(hotfix_name.length() > 0) { system(StringFormat("shared_memory -hotfix=%s", hotfix_name.c_str()).c_str()); } else { diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 1465064f3..3ae12ede0 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -21,7 +21,7 @@ Child of the Mob class. -Quagmire */ -#ifdef _WINDOWS +#ifdef _WIN32 #if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900)) #define snprintf _snprintf #define vsnprintf _vsnprintf diff --git a/zone/embperl.h b/zone/embperl.h index ebd76fa0e..c3838e382 100644 --- a/zone/embperl.h +++ b/zone/embperl.h @@ -22,15 +22,15 @@ Eglin #include #define WIN32IO_IS_STDIO -#ifndef WIN32 +#ifndef _WIN32 extern "C" { //the perl headers dont do this for us... #endif #include #include -#ifndef WIN32 +#ifndef _WIN32 }; #endif -#ifdef WIN32 +#ifdef _WIN32 #define snprintf _snprintf #endif diff --git a/zone/embxs.h b/zone/embxs.h index 67a37a6da..297bea81e 100644 --- a/zone/embxs.h +++ b/zone/embxs.h @@ -5,12 +5,12 @@ #include #define WIN32IO_IS_STDIO -#ifndef WIN32 +#ifndef _WIN32 extern "C" { //the perl headers dont do this for us... #endif #include #include -#ifndef WIN32 +#ifndef _WIN32 }; #endif diff --git a/zone/encounter.cpp b/zone/encounter.cpp index e0ec83d90..70f174084 100644 --- a/zone/encounter.cpp +++ b/zone/encounter.cpp @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef _WINDOWS +#ifdef _WIN32 #if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900)) #define snprintf _snprintf #define vsnprintf _vsnprintf diff --git a/zone/entity.cpp b/zone/entity.cpp index d1ecfc990..b488e2f99 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -22,7 +22,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #else #include @@ -43,7 +43,7 @@ #include "npc_scale_manager.h" #include "../common/say_link.h" -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp @@ -532,7 +532,7 @@ void EntityList::MobProcess() entity_list.RemoveNPC(id); } else { -#ifdef _WINDOWS +#ifdef _WIN32 struct in_addr in; in.s_addr = mob->CastToClient()->GetIP(); Log(Logs::General, Logs::Zone_Server, "Dropping client: Process=false, ip=%s port=%u", inet_ntoa(in), mob->CastToClient()->GetPort()); @@ -2688,7 +2688,7 @@ char *EntityList::MakeNameUnique(char *name) } for (int i=0; i < 300; i++) { if (!used[i]) { - #ifdef _WINDOWS + #ifdef _WIN32 snprintf(name, 64, "%s%03d", name, i); #else //glibc clears destination of snprintf diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 3f14b059a..1baff5708 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -21,7 +21,7 @@ #include "map.h" #include "zone.h" -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #endif diff --git a/zone/forage.cpp b/zone/forage.cpp index 3bdb87d7a..7fdbc2f6b 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -33,7 +33,7 @@ #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #endif diff --git a/zone/loottables.cpp b/zone/loottables.cpp index e7c9624f1..c03965650 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -31,7 +31,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #endif diff --git a/zone/net.cpp b/zone/net.cpp index 522512f51..3970fd922 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -84,7 +84,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define new new(_NORMAL_BLOCK, __FILE__, __LINE__) #endif -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #else @@ -279,7 +279,7 @@ int main(int argc, char** argv) { Log(Logs::General, Logs::Error, "Could not set signal handler"); return 1; } -#ifndef WIN32 +#ifndef _WIN32 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { Log(Logs::General, Logs::Error, "Could not set signal handler"); return 1; @@ -442,7 +442,7 @@ int main(int argc, char** argv) { EQStreamIdentifier stream_identifier; RegisterAllPatches(stream_identifier); -#ifndef WIN32 +#ifndef _WIN32 Log(Logs::Detail, Logs::None, "Main thread running with thread id %d", pthread_self()); #endif @@ -602,7 +602,7 @@ int main(int argc, char** argv) { } void CatchSignal(int sig_num) { -#ifdef _WINDOWS +#ifdef _WIN32 Log(Logs::General, Logs::Zone_Server, "Recieved signal: %i", sig_num); #endif RunLoops = false; @@ -672,7 +672,7 @@ NetConnection::~NetConnection() { /* Update Window Title with relevant information */ void UpdateWindowTitle(char* iNewTitle) { -#ifdef _WINDOWS +#ifdef _WIN32 char tmp[500]; if (iNewTitle) { snprintf(tmp, sizeof(tmp), "%i: %s", ZoneConfig::get()->ZonePort, iNewTitle); diff --git a/zone/net.h b/zone/net.h index 4d44b6058..5cf271f36 100644 --- a/zone/net.h +++ b/zone/net.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #else diff --git a/zone/npc.cpp b/zone/npc.cpp index b0367f469..cd225b5de 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -46,7 +46,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/zone/npc.h b/zone/npc.h index 1957b8e63..ea6b3e460 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -29,7 +29,7 @@ #include -#ifdef _WINDOWS +#ifdef _WIN32 #define M_PI 3.141592 #endif diff --git a/zone/petitions.cpp b/zone/petitions.cpp index 4ba73332d..3e5cc510c 100644 --- a/zone/petitions.cpp +++ b/zone/petitions.cpp @@ -18,13 +18,13 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org) #include "../common/global_define.h" #include "../common/eqemu_logsys.h" #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #else #include #endif -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/zone/pets.cpp b/zone/pets.cpp index ab1f13bce..446fffbc4 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -34,7 +34,7 @@ #include "bot.h" #endif -#ifndef WIN32 +#ifndef _WIN32 #include #include "../common/unix.h" #endif diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index e4c0badd5..57a396119 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -33,7 +33,7 @@ #include -#ifndef WIN32 +#ifndef _WIN32 #include #include "../common/unix.h" #endif diff --git a/zone/spells.cpp b/zone/spells.cpp index 8b1a08d19..1f938500e 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -87,7 +87,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org) #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #include "../common/unix.h" #endif diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 7761747f9..da914dd68 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -22,7 +22,7 @@ Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net) #include -#ifdef _WINDOWS +#ifdef _WIN32 #define strcasecmp _stricmp #endif diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index 72cb51795..3059ce299 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -21,7 +21,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include //for htonl #endif diff --git a/zone/tribute.cpp b/zone/tribute.cpp index ce1eb5f6d..49ab7911c 100644 --- a/zone/tribute.cpp +++ b/zone/tribute.cpp @@ -24,7 +24,7 @@ #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #include #include diff --git a/zone/tune.cpp b/zone/tune.cpp index c0510f94a..c33580549 100644 --- a/zone/tune.cpp +++ b/zone/tune.cpp @@ -45,7 +45,7 @@ extern QueryServ* QServ; extern WorldServer worldserver; -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index c2e094ee9..57c83d033 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #include #define snprintf _snprintf diff --git a/zone/zone.cpp b/zone/zone.cpp index 923e37a39..96cd6c68e 100755 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -22,7 +22,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define vsnprintf _vsnprintf #else @@ -60,7 +60,7 @@ #include #include -#ifdef _WINDOWS +#ifdef _WIN32 #define snprintf _snprintf #define strncasecmp _strnicmp #define strcasecmp _stricmp