Skip to content

Commit

Permalink
Remove last references of ACE in code and CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
0blu committed Aug 29, 2024
1 parent d4e6a69 commit cc3307a
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 116 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ endif()

if(USE_LIBCURL)
find_package(CURL REQUIRED)
#add_definitions(-D_HAS_AUTO_PTR_ETC) # for VS2017 ACE support, won't do any harm to other compilers
#set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
endif()
Expand Down Expand Up @@ -161,19 +160,6 @@ set(CMAKE_INSTALL_RPATH ${LIBS_DIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)

# Find needed packages and if necessery abort if something important is missing
unset(ACE_INCLUDE_DIR CACHE)
unset(ACE_LIBRARIES CACHE)
unset(ACE_LIBRARIES_DIR CACHE)
unset(ACE_INCLUDE_DIR)
unset(ACE_LIBRARIES)
unset(ACE_LIBRARIES_DIR)

find_package(ACE)
if(NOT ACE_FOUND)
message(FATAL_ERROR
"This project requires ACE installed. Please download the ACE Micro Release Kit from http://download.dre.vanderbilt.edu/ and install it. If this script didn't find ACE and it was correctly installed please set ACE_ROOT to the correct path."
)
endif()

if(NOT USE_STD_MALLOC)
unset(TBB_INCLUDE_DIRS CACHE)
Expand Down
81 changes: 0 additions & 81 deletions cmake/FindACE.cmake

This file was deleted.

5 changes: 0 additions & 5 deletions contrib/mmap/src/MMapCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
#ifndef _MMAP_COMMON_H
#define _MMAP_COMMON_H

// stop warning spam from ACE includes
#ifdef _WIN32
# pragma warning( disable : 4996 )
#endif

#include <string>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion contrib/mmap/src/MapBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "json.hpp"

using namespace VMAP;
// G3D namespace typedefs conflicts with ACE typedefs

using json = nlohmann::json;

Expand Down
2 changes: 0 additions & 2 deletions src/framework/Platform/Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
# endif //ACE_BYTE_ORDER
#endif //MANGOS_ENDIAN

#define MANGOS_PATH_MAX PATH_MAX // ace/os_include/os_limits.h -> ace/Basic_Types.h

#if PLATFORM == PLATFORM_WINDOWS
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
Expand Down
2 changes: 1 addition & 1 deletion src/game/WorldSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\ingroup u2w
*/

#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
#include "WorldSocket.h"
#include "Common.h"
#include "Database/DatabaseEnv.h"
#include "Log.h"
Expand Down
4 changes: 2 additions & 2 deletions src/game/pchdef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//add here most rarely modified headers to speed up debug build compilation
#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
#include "WorldSocket.h"
#include "Common.h"

#include "MapManager.h"
Expand All @@ -11,4 +11,4 @@
#include "SharedDefines.h"
#include "GuildMgr.h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "ScriptMgr.h"
1 change: 0 additions & 1 deletion src/mangosd/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ uint32 realmID; // Id of the realm
char const* g_mainLogFileName = "Server.log";

// Launch the mangos server
#undef main // TODO Remove me when ACE is removed
extern int main(int argc, char **argv)
{
ServerStartupArguments args;
Expand Down
1 change: 0 additions & 1 deletion src/realmd/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ volatile bool stopEvent = false; // Setting it to true stops the
DatabaseType LoginDatabase; // Accessor to the realm server database

// Launch the realm server
#undef main // TODO Remove me when ACE is removed
extern int main(int argc, char** argv)
{
ServerStartupArguments args;
Expand Down
4 changes: 2 additions & 2 deletions src/shared/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ if(UNIX)
target_link_libraries(shared ${ACE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif(UNIX)

if(MINGW)
target_link_libraries(shared ${ACE_LIBRARIES} -lws2_32)
if(WIN32)
target_link_libraries(shared ws2_32 mswsock)
endif()

target_link_libraries(shared cpptrace::cpptrace)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/IO/Networking/Internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ IO::Networking::IpAddress IO::Networking::Internal::inet_ntop(in_addr const* nat
// We cant use ::inet_ntoa(...) because it's not thread safe. We cant use ::inet_ntop(...) because it's not WinXP compatible, so we have to do it ourselves.
int constexpr MAX_IPV4_LENGTH = 16; // "255.255.255.255" = length 15 + 1 for null-terminator
char ipv4AddressString[MAX_IPV4_LENGTH];
{ // impl was taken from ACE, should be universal
{ // This implementation was taken from ACE, should be universal
uint8_t const* p = reinterpret_cast<uint8_t const*>(nativeAddress);
snprintf(ipv4AddressString, MAX_IPV4_LENGTH, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
}
Expand Down
5 changes: 0 additions & 5 deletions src/shared/ServiceWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
#endif
#endif


#ifdef main
#undef main // TODO Remove me when ACE is removed
#endif

extern int main(int argc, char** argv);
extern char serviceLongName[];
extern char serviceName[];
Expand Down

0 comments on commit cc3307a

Please sign in to comment.