# HG changeset patch # User Pascal Bellard # Date 1254213460 -7200 # Node ID f141df72e641716e5eec4c2f4aef717a54871d7b # Parent 255a25f55b783edfcf669768226a75341f4fd163 Codeblocks: hack for new glib diff -r 255a25f55b78 -r f141df72e641 codeblocks/receipt --- a/codeblocks/receipt Mon Sep 28 23:42:55 2009 +0200 +++ b/codeblocks/receipt Tue Sep 29 10:37:40 2009 +0200 @@ -15,6 +15,7 @@ compile_rules() { cd $src + busybox patch -p1 -i ../stuff/glib.u ./configure \ --with-contrib-plugins="all, -help" \ --prefix=/usr \ diff -r 255a25f55b78 -r f141df72e641 codeblocks/stuff/glib.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/codeblocks/stuff/glib.u Tue Sep 29 10:37:40 2009 +0200 @@ -0,0 +1,78 @@ +Both glib and wx define GSocket, see http://trac.wxwidgets.org/ticket/10883 + +--- codeblocks-8.02/src/src/prefix.cpp ++++ codeblocks-8.02/src/src/prefix.cpp +@@ -393,7 +393,7 @@ + + br_return_val_if_fail (path != (char *) NULL, (char *) NULL); + +- end = strrchr (path, '/'); ++ end = strrchr ((char *) path, '/'); + if (!end) return strdup ("."); + + while (end > path && *end == '/') +@@ -429,7 +429,7 @@ + br_return_val_if_fail (path != (char *) NULL, (char *) NULL); + + if (!*path) return strdup ("/"); +- end = strrchr (path, '/'); ++ end = strrchr ((char *) path, '/'); + if (!end) return strdup (path); + + tmp = br_strndup ((char *) path, end - path); + +--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp ++++ codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp +@@ -21,6 +21,13 @@ + + #include + #include "sdk.h" ++#if defined(__WXGTK__) ++#define GSocket GlibGSocket ++ #include "wx/gtk/win_gtk.h" ++#undef GSocket ++ #include ++#endif ++ + #ifndef CB_PRECOMP + #include + #include // Manager::Get()->GetAppWindow() +@@ -51,11 +58,6 @@ + #include + #include "memorymappedfile.h" + +-#if defined(__WXGTK__) +- #include "wx/gtk/win_gtk.h" +- #include +-#endif +- + // The plugin needs a flag ON to enable some code for the plugin + #if !defined(BUILDING_PLUGIN) + #error preprocessor BUILDING_PLUGIN flag required for this target + +--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp ++++ codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp +@@ -19,6 +19,12 @@ + */ + // RCS-ID: $Id: codesnippetstreectrl.cpp 112 2008-01-07 17:03:31Z Pecan $ + ++#if defined(__WXGTK__) ++#define GSocket GlibGSocket ++ #include "wx/gtk/win_gtk.h" ++#undef GSocket ++ #include ++#endif + #ifdef WX_PRECOMP + #include "wx_pch.h" + #else +@@ -48,10 +54,6 @@ + #include "messagebox.h" + #include "menuidentifiers.h" + #include "editsnippetframe.h" +-#if defined(__WXGTK__) +- #include "wx/gtk/win_gtk.h" +- #include +-#endif + + IMPLEMENT_DYNAMIC_CLASS(CodeSnippetsTreeCtrl, wxTreeCtrl) +