Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/codeblocks/files: codeblocks-10.05-gcc47.patch codeblocks-10.05-wxChartCtrl-crash.patch
Date: Fri, 02 Nov 2012 06:03:50
Message-Id: 20121102060331.274CB21600@flycatcher.gentoo.org
1 dirtyepic 12/11/02 06:03:31
2
3 Added: codeblocks-10.05-gcc47.patch
4 codeblocks-10.05-wxChartCtrl-crash.patch
5 Log:
6 Fix crash when wxChartCtrl is added with wxSmith (bug #372837, patch by Gert
7 Wollny). Backport GCC 4.7 fixes from trunk (bug #423791). Add pkgconfig
8 dependency and prune .la files.
9
10 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key F9A40662)
11
12 Revision Changes Path
13 1.1 dev-util/codeblocks/files/codeblocks-10.05-gcc47.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/codeblocks/files/codeblocks-10.05-gcc47.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/codeblocks/files/codeblocks-10.05-gcc47.patch?rev=1.1&content-type=text/plain
17
18 Index: codeblocks-10.05-gcc47.patch
19 ===================================================================
20 --- a/src/include/scripting/bindings/sc_base_types.h
21 +++ b/src/include/scripting/bindings/sc_base_types.h
22 @@ -33,6 +33,7 @@ DECLARE_INSTANCE_TYPE(wxPoint);
23 DECLARE_INSTANCE_TYPE(wxSize);
24 DECLARE_INSTANCE_TYPE(wxString);
25
26 +using SqPlus::GetTypeName;
27 // C::B primitives and types
28 DECLARE_INSTANCE_TYPE(ConfigManager);
29 DECLARE_INSTANCE_TYPE(EditorManager);
30 @@ -59,6 +60,7 @@ namespace SqPlus \
31 inline T Get(TypeWrapper<T>,HSQUIRRELVM v,int idx) { SQInteger i; SQPLUS_CHECK_GET(sq_getinteger(v,idx,&i)); return (T)i; } \
32 }
33
34 +using SqPlus::Push;
35 DECLARE_ENUM_TYPE(wxPathFormat);
36 DECLARE_ENUM_TYPE(wxPathNormalize);
37 DECLARE_ENUM_TYPE(PrintColourMode);
38 --- /dev/null
39 +++ b/src/include/scripting/squirrel/sqmem.h
40 @@ -0,0 +1,8 @@
41 +/* see copyright notice in squirrel.h */
42 +#ifndef _SQMEM_H_
43 +#define _SQMEM_H_
44 +
45 +void *sq_vm_malloc(SQUnsignedInteger size);
46 +void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
47 +void sq_vm_free(void *p,SQUnsignedInteger size);
48 +#endif //_SQMEM_H_
49 --- a/src/include/scripting/squirrel/sqstate.h
50 +++ b/src/include/scripting/squirrel/sqstate.h
51 @@ -136,8 +136,4 @@ extern SQObjectPtr _one_;
52 extern SQObjectPtr _minusone_;
53
54 bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
55 -
56 -void *sq_vm_malloc(SQUnsignedInteger size);
57 -void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
58 -void sq_vm_free(void *p,SQUnsignedInteger size);
59 #endif //_SQSTATE_H_
60 --- a/src/include/scripting/squirrel/squtils.h
61 +++ b/src/include/scripting/squirrel/squtils.h
62 @@ -2,6 +2,7 @@
63 #ifndef _SQUTILS_H_
64 #define _SQUTILS_H_
65
66 +#include "sqmem.h"
67 #define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
68 #define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
69 #define SQ_MALLOC(__size) sq_vm_malloc((__size));
70 --- a/src/plugins/contrib/help_plugin/defs.h
71 +++ b/src/plugins/contrib/help_plugin/defs.h
72 @@ -289,7 +289,7 @@ class QMap : public std::map<Key, T>
73
74 if (i.second == false && overwrite)
75 {
76 - find(k)->second = t;
77 + this->find(k)->second = t;
78 }
79
80 return i.first;
81 @@ -297,7 +297,7 @@ class QMap : public std::map<Key, T>
82
83 int remove(const Key &k)
84 {
85 - return erase(k);
86 + return this->erase(k);
87 }
88 };
89
90 --- a/src/plugins/contrib/help_plugin/man2html.cpp
91 +++ b/src/plugins/contrib/help_plugin/man2html.cpp
92 @@ -123,7 +123,7 @@
93
94 #include <ctype.h>
95
96 -//#include <unistd.h>
97 +#include <unistd.h>
98 #include <string.h>
99
100 #include <stdio.h>
101 --- a/src/plugins/debuggergdb/gdb_driver.cpp
102 +++ b/src/plugins/debuggergdb/gdb_driver.cpp
103 @@ -72,6 +72,7 @@ static wxRegEx reChildPid3(_T("Thread[ \t]+[xA-Fa-f0-9-]+[ \t]+\\(LWP ([0-9]+)\\
104
105
106 // scripting support
107 +using SqPlus::Push;
108 DECLARE_INSTANCE_TYPE(GDB_driver);
109
110 GDB_driver::GDB_driver(DebuggerGDB* plugin)
111
112
113
114 1.1 dev-util/codeblocks/files/codeblocks-10.05-wxChartCtrl-crash.patch
115
116 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/codeblocks/files/codeblocks-10.05-wxChartCtrl-crash.patch?rev=1.1&view=markup
117 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/codeblocks/files/codeblocks-10.05-wxChartCtrl-crash.patch?rev=1.1&content-type=text/plain
118
119 Index: codeblocks-10.05-wxChartCtrl-crash.patch
120 ===================================================================
121 codeblocks crashes when a wxChartCtrl is added with wxSmith
122
123 https://bugs.gentoo.org/show_bug.cgi?id=372837
124 https://developer.berlios.de/bugs/?func=detailbug&bug_id=18182&group_id=5358
125
126
127 --- a/src/plugins/contrib/wxSmithContribItems/wxchart/wxchart-1.0/src/chartwindow.cpp
128 +++ b/src/plugins/contrib/wxSmithContribItems/wxchart/wxchart-1.0/src/chartwindow.cpp
129 @@ -156,7 +156,13 @@ void wxChartWindow::DrawHLines(
130 }
131
132 wxChartSizes *sizes = GetSizes();
133 -
134 +
135 + // sizes may be NULL, in this case do nothing
136 + // not sure if this is the right way to do things
137 + // gw.fossdev@×××××.com
138 + if (!sizes)
139 + return;
140 +
141 hp->SetPen( *wxBLACK_DASHED_PEN );
142
143 double current = lower;
144 @@ -188,6 +194,10 @@ ChartValue wxChartWindow::GetVirtualWidth() const
145 int iNodes = static_cast<int>(ceil( GetVirtualMaxX() ));
146 wxChartSizes *sizes = GetSizes();
147
148 + /// sizes may be NULL, in this case return a fixes value
149 + if (!sizes)
150 + return 1;
151 +
152 ChartValue x = 0;
153
154 for ( int iNode = 0; iNode <= iNodes; ++ iNode )