tag 417760 patch
thanks

Martin Michlmayr <[EMAIL PROTECTED]> (27/01/2008):
> Unfortunately, some more headers got cleaned up after I reported my
> original bug report with patch.  The good news is that there won't be
> any further changes from the side of GCC, so please compile your
> package with gcc-4.3 or gcc-snapshot from unstable to see what
> remaining issues there are.  Thanks.

Hi,

please find attached a patch (I started from scratch). Mostly missing
#includes, a PATH_MAX workaround, and a “foo(bar baz, bar baz)” replaced
with “foo(bar baz1, bar baz2)”.

It then chokes on -lintl being not found, but I guess that it happens
because of the way I force the use of gcc/g++ 4.3 (scons, amongst
others, don't honour CC & CXX, and can even not care about PATH and use
/usr/bin/g* no matter what. So I replaced the gcc/g++ symlinks to point
to g*-4.3 instead of g*-4.2).

Since the #includes stuff is solved at least, tagging patch again. I'll
try and see if some work is needed to fix the -lintl linking.

Cheers,

-- 
Cyril Brulebois
--- a/src/editor_game_base.cc
+++ b/src/editor_game_base.cc
@@ -40,6 +40,7 @@
 #include "ui_progresswindow.h"
 
 #include <set>
+#include <algorithm>
 
 extern Map_Object_Descr g_road_descr;
 
--- a/src/main.cc
+++ b/src/main.cc
@@ -29,6 +29,7 @@
 
 #include <SDL_main.h>
 
+#include <typeinfo>
 
 using std::cerr;
 using std::endl;
--- a/src/map_event_manager.cc
+++ b/src/map_event_manager.cc
@@ -22,6 +22,7 @@
 #include "events/event.h"
 
 #include <vector>
+#include <cstring>
 
 
 MapEventManager::MapEventManager() {}
--- a/src/map_eventchain_manager.cc
+++ b/src/map_eventchain_manager.cc
@@ -22,6 +22,7 @@
 #include "trigger/trigger_conditional.h"
 
 #include <vector>
+#include <cstring>
 
 
 MapEventChainManager::MapEventChainManager() {}
--- a/src/editor/tools/multi_select.h
+++ b/src/editor/tools/multi_select.h
@@ -23,6 +23,8 @@
 #include "error.h"
 
 #include <vector>
+#include <cstdlib>
+#include <climits>
 
 /*
 =============================
--- a/src/filesystem/filesystem.cc
+++ b/src/filesystem/filesystem.cc
@@ -49,6 +49,16 @@
 #endif
 #include <unistd.h>
 
+#include <cstdlib>
+#include <cstring>
+
+/* UGLY workaround: it's way better not to assume any PATH_MAX limitation,
+ * and to use a loop with dynamic realloc until the path has been copied
+ * successfully. */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 FileSystem::FileSystem()
 {
 #ifdef __WIN32__
--- a/src/filesystem/zip_filesystem.cc
+++ b/src/filesystem/zip_filesystem.cc
@@ -26,6 +26,9 @@
 
 #include <string>
 
+#include <cstdlib>
+#include <cstring>
+
 
 /**
  * Initialize the real file-system
--- a/src/map_objective_manager.cc
+++ b/src/map_objective_manager.cc
@@ -20,6 +20,7 @@
 #include "map_objective_manager.h"
 
 #include <vector>
+#include <cstring>
 
 
 MapObjectiveManager::MapObjectiveManager() {}
--- a/src/map_trigger_manager.cc
+++ b/src/map_trigger_manager.cc
@@ -22,6 +22,7 @@
 #include "trigger/trigger.h"
 
 #include <vector>
+#include <cstring>
 
 
 MapTriggerManager::MapTriggerManager() {}
--- a/src/map_variable_manager.cc
+++ b/src/map_variable_manager.cc
@@ -22,6 +22,7 @@
 #include "i18n.h"
 
 #include <vector>
+#include <cstring>
 
 
 MapVariableManager::MapVariableManager() {
--- a/src/text_parser.cc
+++ b/src/text_parser.cc
@@ -26,6 +26,7 @@
 
 #include <vector>
 #include <string>
+#include <algorithm>
 
 Richtext_Block::Richtext_Block() {
 	m_image_align = Align_Left;
--- a/src/transport.cc
+++ b/src/transport.cc
@@ -50,6 +50,8 @@
 
 #include <stdio.h>
 
+#include <algorithm>
+
 
 Map_Object_Descr g_flag_descr;
 
--- a/src/ui/ui_basic/ui_window.cc
+++ b/src/ui/ui_basic/ui_window.cc
@@ -25,6 +25,7 @@
 #include "constants.h"
 #include "keycodes.h"
 #include "wlapplication.h"
+#include <cstdlib>
 
 namespace UI {
 //  Width the horizontal border grapichs must have.
--- a/src/ui/ui_fs_menus/fullscreen_menu_inet_lobby.h
+++ b/src/ui/ui_fs_menus/fullscreen_menu_inet_lobby.h
@@ -44,7 +44,7 @@
 
       void server_message(std::string str);
       void user_entered(std::string name, std::string room, bool enters) ;
-      void user_info(std::string name, std::string name, std::string room) ;
+      void user_info(std::string name1, std::string name2, std::string room) ;
       void room_info(std::vector< std::string > users);
       void chat_message(std::string user, std::string room, bool is_action);
       void critical_error(std::string str);

Attachment: signature.asc
Description: Digital signature

Reply via email to