diff options
author | Shauren <none@none> | 2010-08-11 16:59:36 +0200 |
---|---|---|
committer | Shauren <none@none> | 2010-08-11 16:59:36 +0200 |
commit | 24031cd6b98925c744c633348abebcb3225c46b5 (patch) | |
tree | ae0038c789e94e021506f17d44016021da7a72c8 | |
parent | c53bec73f1a5f984392dfc55c704ca469d7ec980 (diff) |
Buildsystem: Removed unused MemoryLeaks files
Buildsystem/Windows: WheatyExceptionReport is now build in worldserver and authserver instead of shared (fixes crash reports not being generated)
--HG--
branch : trunk
-rw-r--r-- | externals/vld/vld.h | 105 | ||||
-rw-r--r-- | src/server/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/server/authserver/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/server/shared/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/server/shared/Debugging/MemoryLeaks.cpp | 29 | ||||
-rw-r--r-- | src/server/shared/Debugging/MemoryLeaks.h | 49 | ||||
-rw-r--r-- | src/server/shared/Debugging/WheatyExceptionReport.cpp | 4 | ||||
-rw-r--r-- | src/server/shared/Debugging/WheatyExceptionReport.h | 2 | ||||
-rw-r--r-- | src/server/worldserver/CMakeLists.txt | 1 |
9 files changed, 10 insertions, 188 deletions
diff --git a/externals/vld/vld.h b/externals/vld/vld.h deleted file mode 100644 index 72bebd8c4f6..00000000000 --- a/externals/vld/vld.h +++ /dev/null @@ -1,105 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// $Id: vld.h,v 1.27 2006/11/12 18:09:20 dmouldin Exp $ -// -// Visual Leak Detector (Version 1.9d) - Import Library Header -// Copyright (c) 2006 Dan Moulding -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// See COPYING.txt for the full terms of the GNU Lesser General Public License. -// -//////////////////////////////////////////////////////////////////////////////// - -//#pragma once -#ifndef _VLD_H_ -#define _VLD_H_ - -#ifdef _DEBUG - -#pragma comment(lib, "vld.lib") - -// Force a symbolic reference to the global VisualLeakDetector class object from -// the DLL. This enusres that the DLL is loaded and linked with the program, -// even if no code otherwise imports any of the DLL's exports. -#pragma comment(linker, "/include:__imp_?vld@@3VVisualLeakDetector@@A") - -//////////////////////////////////////////////////////////////////////////////// -// -// Visual Leak Detector APIs -// - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// VLDDisable - Disables Visual Leak Detector's memory leak detection at -// runtime. If memory leak detection is already disabled, then calling this -// function has no effect. -// -// Note: In multithreaded programs, this function operates on a per-thread -// basis. In other words, if you call this function from one thread, then -// memory leak detection is only disabled for that thread. If memory leak -// detection is enabled for other threads, then it will remain enabled for -// those other threads. It was designed to work this way to insulate you, -// the programmer, from having to ensure thread synchronization when calling -// VLDEnable() and VLDDisable(). Without this, calling these two functions -// unsychronized could result in unpredictable and unintended behavior. -// But this also means that if you want to disable memory leak detection -// process-wide, then you need to call this function from every thread in -// the process. -// -// Return Value: -// -// None. -// - -__declspec(dllimport) void VLDDisable (); - -// VLDEnable - Enables Visual Leak Detector's memory leak detection at runtime. -// If memory leak detection is already enabled, which it is by default, then -// calling this function has no effect. -// -// Note: In multithreaded programs, this function operates on a per-thread -// basis. In other words, if you call this function from one thread, then -// memory leak detection is only enabled for that thread. If memory leak -// detection is disabled for other threads, then it will remain disabled for -// those other threads. It was designed to work this way to insulate you, -// the programmer, from having to ensure thread synchronization when calling -// VLDEnable() and VLDDisable(). Without this, calling these two functions -// unsychronized could result in unpredictable and unintended behavior. -// But this also means that if you want to enable memory leak detection -// process-wide, then you need to call this function from every thread in -// the process. -// -// Return Value: -// -// None. -// - -__declspec(dllimport) void VLDEnable (); - -#ifdef __cplusplus -} -#endif // __cplusplus - -#else // !_DEBUG - -#define VLDEnable() -#define VLDDisable() - -#endif // _DEBUG - -#endif // _VLD_H_ - diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index d37d2fe80f3..439645bf5cb 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -17,6 +17,10 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif() if( SERVERS ) + set(sources_Debugging + ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging/WheatyExceptionReport.cpp + ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging/WheatyExceptionReport.h + ) add_subdirectory(shared) add_subdirectory(game) add_subdirectory(collision) diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index 9af38dd89f6..6dc0089dddc 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -25,6 +25,7 @@ set(authserver_SRCS if( WIN32 ) set(authserver_SRCS ${authserver_SRCS} + ${sources_Debugging} authserver.rc ) endif() diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index eab3ebee95d..cd053f35bbf 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -12,7 +12,6 @@ file(GLOB_RECURSE sources_Configuration Configuration/*.cpp Configuration/*.h) file(GLOB_RECURSE sources_Cryptography Cryptography/*.cpp Cryptography/*.h) file(GLOB_RECURSE sources_Database Database/*.cpp Database/*.h) file(GLOB_RECURSE sources_DataStores DataStores/*.cpp DataStores/*.h) -file(GLOB_RECURSE sources_Debugging Debugging/*.cpp Debugging/*.h) file(GLOB_RECURSE sources_Dynamic Dynamic/*.cpp Dynamic/*.h) file(GLOB_RECURSE sources_Logging Logging/*.cpp Logging/*.h) file(GLOB_RECURSE sources_Packets Packets/*.cpp Packets/*.h) @@ -30,13 +29,13 @@ set(shared_STAT_SRCS ${sources_Cryptography} ${sources_Database} ${sources_DataStores} - ${sources_Debugging} ${sources_Dynamic} ${sources_Logging} ${sources_Packets} ${sources_Threading} ${sources_Utilities} ${sources_localdir} + Debugging/Errors.h ) include_directories( diff --git a/src/server/shared/Debugging/MemoryLeaks.cpp b/src/server/shared/Debugging/MemoryLeaks.cpp deleted file mode 100644 index c591dabb866..00000000000 --- a/src/server/shared/Debugging/MemoryLeaks.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "MemoryLeaks.h" - -MemoryManager::MemoryManager( ) -{ - #if COMPILER == MICROSOFT - // standard leak check initialization - //_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); - // uncomment to disable Visual Leak Detector from code - //VLDDisable(); - #endif -} diff --git a/src/server/shared/Debugging/MemoryLeaks.h b/src/server/shared/Debugging/MemoryLeaks.h deleted file mode 100644 index 4b13e4d3d90..00000000000 --- a/src/server/shared/Debugging/MemoryLeaks.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef TRINITYSERVER_MEMORY_H -#define TRINITYSERVER_MEMORY_H - -#include "shared/CompilerDefs.h" - -#if COMPILER == COMPILER_MICROSOFT - -#ifndef _WIN64 -// Visual Leak Detector support enabled -//#include <vld/vld.h> -// standard Visual Studio leak check disabled, -//# define _CRTDBG_MAP_ALLOC -//# include <stdlib.h> -//# include <crtdbg.h> -#else -//# define _CRTDBG_MAP_ALLOC -//# include <stdlib.h> -//# include <crtdbg.h> -#endif - -#endif - - -#include "ace/Singleton.h" - -struct MemoryManager -{ - MemoryManager(); -}; -#define sMemoryManager ACE_Singleton<MemoryManager, ACE_Null_Mutex>::instance() -#endif diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index ebc6a701996..7a3eae0f408 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -3,7 +3,7 @@ // MSDN Magazine, 2002 // FILE: WheatyExceptionReport.CPP //========================================== -#ifdef _WIN32 +#if PLATFORM == PLATFORM_WINDOWS #define WIN32_LEAN_AND_MEAN #pragma warning(disable:4996) #pragma warning(disable:4312) @@ -18,7 +18,7 @@ #include "SystemConfig.h" #include "revision.h" #define CrashFolder _T("Crashes") -//#pragma comment(linker, "/defaultlib:dbghelp.lib") +#pragma comment(linker, "/DEFAULTLIB:dbghelp.lib") inline LPTSTR ErrorMessage(DWORD dw) { diff --git a/src/server/shared/Debugging/WheatyExceptionReport.h b/src/server/shared/Debugging/WheatyExceptionReport.h index e9af3f21d24..228d260e57d 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.h +++ b/src/server/shared/Debugging/WheatyExceptionReport.h @@ -1,7 +1,7 @@ #ifndef _WHEATYEXCEPTIONREPORT_ #define _WHEATYEXCEPTIONREPORT_ -#ifdef _WIN32 +#if PLATFORM == PLATFORM_WINDOWS #include <dbghelp.h> diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index d73a25f2354..eed999ccba7 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -25,6 +25,7 @@ set(worldserver_SRCS if( WIN32 ) set(worldserver_SRCS ${worldserver_SRCS} + ${sources_Debugging} worldserver.rc ) endif() |