Author: loonycyborg
Date: Wed Dec 3 14:30:30 2008
New Revision: 31244
URL: http://svn.gna.org/viewcvs/wesnoth?rev=31244&view=rev
Log:
Added an option to disable custom pool malloc to scons and disabled it on
windows.
Modified:
trunk/SConstruct
trunk/src/SConscript
trunk/src/game.cpp
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=31244&r1=31243&r2=31244&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed Dec 3 14:30:30 2008
@@ -71,6 +71,7 @@
BoolOption('python', 'Enable in-game python extensions.', True),
BoolOption('raw_sockets', 'Set to use raw receiving sockets in the
multiplayer network layer rather than the SDL_net facilities', False),
BoolOption('forum_user_handler', 'Enable forum user handler in wesnothd',
False),
+ BoolOption('pool_alloc', 'Enable custom pool malloc', True),
('server_gid', 'group id of the user who runs wesnothd', ""),
('server_uid', 'user id of the user who runs wesnothd', ""),
EnumOption('gui', 'Set for GUI reductions for resolutions down to 320x240
(PDAs)', "normal", ["normal", "tiny"]),
@@ -316,6 +317,9 @@
if not env["editor"]:
env.Append(CPPDEFINES = "DISABLE_EDITOR2")
+ if env["PLATFORM"] == "win32":
+ env["pool_alloc"] = False
+
if have_X:
env.Append(CPPDEFINES = "_X11")
Modified: trunk/src/SConscript
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=31244&r1=31243&r2=31244&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Wed Dec 3 14:30:30 2008
@@ -19,8 +19,6 @@
config.cpp
gettext.cpp
log.cpp
- malloc.c
- poolalloc.c
map.cpp
map_location.cpp
md5.cpp
@@ -35,6 +33,11 @@
serialization/string_utils.cpp
serialization/tokenizer.cpp
""")
+if env["pool_alloc"]:
+ libwesnoth_core_sources.extend(Split("""
+ malloc.c
+ poolalloc.c
+ """))
libwesnoth_core_sources.extend(env.Object("network_worker.cpp", EXTRA_DEFINE =
env['raw_sockets'] and "NETWORK_USE_RAW_SOCKETS" or None))
@@ -298,7 +301,7 @@
from SCons.Script.SConscript import SConsEnvironment
SConsEnvironment.WesnothProgram = WesnothProgram
-game_cpp = python_env.Object("game.cpp");
+game_cpp = python_env.Object("game.cpp", EXTRA_DEFINE = not env["pool_alloc"]
and "DISABLE_POOL_ALLOC" or None);
env.WesnothProgram("wesnoth", [game_cpp] + [libwesnoth_extras,
libwesnoth_core, libwesnoth_sdl, libwesnoth, libcampaignd, env["wesnoth_res"]],
have_client_prereqs)
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=31244&r1=31243&r2=31244&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Wed Dec 3 14:30:30 2008
@@ -2148,7 +2148,9 @@
int main(int argc, char** argv)
{
+#ifndef DISABLE_POOL_ALLOC
init_custom_malloc();
+#endif
if(SDL_Init(SDL_INIT_TIMER) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n",
SDL_GetError());
return(1);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits