tsteghide-0.5.1-gcc43.patch - parlay - yet another gentoo overlay
HTML git clone https://git.parazyd.org/parlay
DIR Log
DIR Files
DIR Refs
DIR README
---
tsteghide-0.5.1-gcc43.patch (10444B)
---
1 --- steghide-0.5.1.old/configure.in 2003-10-15 09:48:52.000000000 +0200
2 +++ steghide-0.5.1.new/configure.in 2008-05-09 19:04:46.000000000 +0200
3 @@ -7,27 +7,26 @@
4 dnl checks for programs.
5 AC_PROG_CXX
6 AC_PROG_INSTALL
7 AC_PROG_AWK
8 AC_PROG_LN_S
9 +AC_CXX_COMPILE_STDCXX_0X
10
11 dnl GNU gettext
12 AC_CHECK_FUNCS(strchr)
13 AM_GNU_GETTEXT
14 AM_CONDITIONAL(USE_INTLDIR, test "$nls_cv_use_gnu_gettext" = yes)
15
16 dnl check if debugging support is requested
17 -AC_MSG_CHECKING([wether to enable debugging])
18 +AC_MSG_CHECKING([whether to enable debugging])
19 AC_ARG_ENABLE(debug,[ --enable-debug enable debugging],
20 if test "$enableval" = yes ;
21 then
22 AC_MSG_RESULT([yes])
23 AC_DEFINE(DEBUG,1,[enable code used only for debugging])
24 - CXXFLAGS="-O2 -Wall -g"
25 else
26 AC_MSG_RESULT([no])
27 - CXXFLAGS="-O2 -Wall"
28 fi
29 ,
30 AC_MSG_RESULT([no])
31 CXXFLAGS="-O2 -Wall"
32 )
33 @@ -213,7 +212,18 @@
34 echo "libmhash can be downloaded from http://mhash.sourceforge.net/.";
35 echo "**********";
36 AC_MSG_ERROR([[libmhash not found]])
37 fi
38
39 +dnl Should we add std=c++0x?
40 +
41 +if test "$ac_cv_cxx_compile_cxx0x_cxx" = yes;
42 +then
43 + CXXFLAGS="${CXXFLAGS} -std=c++0x -Wall -Wextra"
44 +else
45 + CXXFLAGS="${CXXFLAGS} -Wall -Wextra"
46 +fi
47 +
48 +AC_SUBST(CXXFLAGS)
49 +
50 dnl create Makefiles
51 AC_OUTPUT([Makefile steghide.spec steghide.doxygen doc/Makefile po/Makefile.in src/Makefile tests/Makefile tests/data/Makefile m4/Makefile intl/Makefile])
52 --- steghide-0.5.1.old/m4/ac_cxx_compile_stdcxx_0x.m4 1970-01-01 01:00:00.000000000 +0100
53 +++ steghide-0.5.1.new/m4/ac_cxx_compile_stdcxx_0x.m4 2008-05-09 19:04:46.000000000 +0200
54 @@ -0,0 +1,107 @@
55 +# ===========================================================================
56 +# http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html
57 +# ===========================================================================
58 +#
59 +# SYNOPSIS
60 +#
61 +# AC_CXX_COMPILE_STDCXX_0X
62 +#
63 +# DESCRIPTION
64 +#
65 +# Check for baseline language coverage in the compiler for the C++0x
66 +# standard.
67 +#
68 +# LAST MODIFICATION
69 +#
70 +# 2008-04-17
71 +#
72 +# COPYLEFT
73 +#
74 +# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
75 +#
76 +# Copying and distribution of this file, with or without modification, are
77 +# permitted in any medium without royalty provided the copyright notice
78 +# and this notice are preserved.
79 +
80 +AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [
81 + AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
82 + ac_cv_cxx_compile_cxx0x_native,
83 + [AC_LANG_SAVE
84 + AC_LANG_CPLUSPLUS
85 + AC_TRY_COMPILE([
86 + template <typename T>
87 + struct check
88 + {
89 + static_assert(sizeof(int) <= sizeof(T), "not big enough");
90 + };
91 +
92 + typedef check<check<bool>> right_angle_brackets;
93 +
94 + int a;
95 + decltype(a) b;
96 +
97 + typedef check<int> check_type;
98 + check_type c;
99 + check_type&& cr = c;],,
100 + ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
101 + AC_LANG_RESTORE
102 + ])
103 +
104 + AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
105 + ac_cv_cxx_compile_cxx0x_cxx,
106 + [AC_LANG_SAVE
107 + AC_LANG_CPLUSPLUS
108 + ac_save_CXXFLAGS="$CXXFLAGS"
109 + CXXFLAGS="$CXXFLAGS -std=c++0x"
110 + AC_TRY_COMPILE([
111 + template <typename T>
112 + struct check
113 + {
114 + static_assert(sizeof(int) <= sizeof(T), "not big enough");
115 + };
116 +
117 + typedef check<check<bool>> right_angle_brackets;
118 +
119 + int a;
120 + decltype(a) b;
121 +
122 + typedef check<int> check_type;
123 + check_type c;
124 + check_type&& cr = c;],,
125 + ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
126 + CXXFLAGS="$ac_save_CXXFLAGS"
127 + AC_LANG_RESTORE
128 + ])
129 +
130 + AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
131 + ac_cv_cxx_compile_cxx0x_gxx,
132 + [AC_LANG_SAVE
133 + AC_LANG_CPLUSPLUS
134 + ac_save_CXXFLAGS="$CXXFLAGS"
135 + CXXFLAGS="$CXXFLAGS -std=gnu++0x"
136 + AC_TRY_COMPILE([
137 + template <typename T>
138 + struct check
139 + {
140 + static_assert(sizeof(int) <= sizeof(T), "not big enough");
141 + };
142 +
143 + typedef check<check<bool>> right_angle_brackets;
144 +
145 + int a;
146 + decltype(a) b;
147 +
148 + typedef check<int> check_type;
149 + check_type c;
150 + check_type&& cr = c;],,
151 + ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
152 + CXXFLAGS="$ac_save_CXXFLAGS"
153 + AC_LANG_RESTORE
154 + ])
155 +
156 + if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
157 + test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
158 + test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
159 + AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
160 + fi
161 +])
162 --- steghide-0.5.1.old/src/Arguments.cc 2003-10-11 23:25:04.000000000 +0200
163 +++ steghide-0.5.1.new/src/Arguments.cc 2008-05-09 19:04:44.000000000 +0200
164 @@ -26,10 +26,12 @@
165 #include "Terminal.h"
166 #include "common.h"
167 #include "error.h"
168 #include "msg.h"
169
170 +float Arguments::Default_Goal = 100.0 ;
171 +
172 // the global Arguments object
173 Arguments Args ;
174
175 Arguments::Arguments (int argc, char* argv[])
176 {
177 --- steghide-0.5.1.old/src/Arguments.h 2003-10-11 23:23:57.000000000 +0200
178 +++ steghide-0.5.1.new/src/Arguments.h 2008-05-09 19:04:44.000000000 +0200
179 @@ -98,11 +98,11 @@
180 static const bool Default_EmbedEmbFn = true ;
181 static const bool Default_Force = false ;
182 static const VERBOSITY Default_Verbosity = NORMAL ;
183 static const unsigned long Default_Radius = 0 ; // there is no default radius for all file formats
184 static const unsigned int Max_Algorithm = 3 ;
185 - static const float Default_Goal = 100.0 ;
186 + static float Default_Goal ;
187 static const DEBUGCOMMAND Default_DebugCommand = NONE ;
188 static const bool Default_Check = false ;
189 static const unsigned int Default_DebugLevel = 0 ;
190 static const unsigned int Default_GmlGraphRecDepth = 0 ;
191 static const unsigned int Default_GmlStartVertex = 0 ;
192 --- steghide-0.5.1.old/src/EncryptionMode.h 2003-09-28 17:30:30.000000000 +0200
193 +++ steghide-0.5.1.new/src/EncryptionMode.h 2008-05-09 19:04:46.000000000 +0200
194 @@ -69,11 +69,11 @@
195 static const unsigned int NumValues = 8 ;
196 IRep Value ;
197
198 typedef struct struct_Translation {
199 IRep irep ;
200 - char* srep ;
201 + const char* srep ;
202 } Translation ;
203 static const Translation Translations[] ;
204 } ;
205
206 #endif // ndef SH_ENCMODE_H
207 --- steghide-0.5.1.old/src/Graph.cc 2003-10-11 23:54:26.000000000 +0200
208 +++ steghide-0.5.1.new/src/Graph.cc 2008-05-09 19:04:46.000000000 +0200
209 @@ -20,10 +20,12 @@
210
211 #include <ctime>
212 #include <list>
213 #include <map>
214 #include <vector>
215 +#include <algorithm>
216 +#include <climits>
217
218 #include "BitString.h"
219 #include "CvrStgFile.h"
220 #include "Edge.h"
221 #include "Graph.h"
222 --- steghide-0.5.1.old/src/Matching.cc 2003-10-11 23:54:30.000000000 +0200
223 +++ steghide-0.5.1.new/src/Matching.cc 2008-05-09 19:04:46.000000000 +0200
224 @@ -16,10 +16,11 @@
225 * along with this program; if not, write to the Free Software
226 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
227 *
228 */
229
230 +#include <algorithm>
231 #include "Edge.h"
232 #include "Graph.h"
233 #include "Matching.h"
234 #include "ProgressOutput.h"
235 #include "common.h"
236 --- steghide-0.5.1.old/src/ProgressOutput.cc 2003-10-11 11:20:51.000000000 +0200
237 +++ steghide-0.5.1.new/src/ProgressOutput.cc 2008-05-09 19:04:44.000000000 +0200
238 @@ -21,10 +21,12 @@
239 #include <cmath>
240
241 #include "ProgressOutput.h"
242 #include "common.h"
243
244 +float ProgressOutput::NoAvgWeight = 1.0 ;
245 +
246 ProgressOutput::ProgressOutput ()
247 : Message("__nomessage__")
248 {
249 LastUpdate = time(NULL) - 1 ; // -1 to ensure that message is written first time
250 }
251 --- steghide-0.5.1.old/src/ProgressOutput.h 2003-09-28 17:30:30.000000000 +0200
252 +++ steghide-0.5.1.new/src/ProgressOutput.h 2008-05-09 19:04:44.000000000 +0200
253 @@ -60,13 +60,13 @@
254 /**
255 * update the output appending rate, [average edge weight], "done" and a newline
256 * \param rate the rate of matched vertices
257 * \param avgweight the average edge weight (is not printed if not given)
258 **/
259 - void done (float rate, float avgweight = NoAvgWeight) const ;
260 + void done (float rate, float avgweight = 1.0) const ;
261
262 - static const float NoAvgWeight = -1.0 ;
263 + static float NoAvgWeight ;
264
265 protected:
266 std::string vcompose (const char *msgfmt, va_list ap) const ;
267
268 private:
269 --- steghide-0.5.1.old/src/SMDConstructionHeuristic.cc 2003-09-28 17:30:30.000000000 +0200
270 +++ steghide-0.5.1.new/src/SMDConstructionHeuristic.cc 2008-05-09 19:04:46.000000000 +0200
271 @@ -16,10 +16,12 @@
272 * along with this program; if not, write to the Free Software
273 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
274 *
275 */
276
277 +#include <algorithm>
278 +
279 #include "Edge.h"
280 #include "Graph.h"
281 #include "Matching.h"
282 #include "SMDConstructionHeuristic.h"
283 #include "Vertex.h"
284 --- steghide-0.5.1.old/src/WavFile.cc 2003-09-28 17:30:30.000000000 +0200
285 +++ steghide-0.5.1.new/src/WavFile.cc 2008-05-09 19:04:46.000000000 +0200
286 @@ -19,10 +19,11 @@
287 */
288
289 #include <cstdio>
290 #include <cstdlib>
291 #include <cstring>
292 +#include <algorithm>
293
294 #include "CvrStgFile.h"
295 #include "DFSAPHeuristic.h"
296 #include "SampleValueAdjacencyList.h"
297 #include "SMDConstructionHeuristic.h"
298 --- steghide-0.5.1.old/src/wrapper_hash_map.h 2003-09-28 17:30:30.000000000 +0200
299 +++ steghide-0.5.1.new/src/wrapper_hash_map.h 2008-05-09 19:04:46.000000000 +0200
300 @@ -25,17 +25,21 @@
301
302 #ifdef __GNUC__
303 # if __GNUC__ < 3
304 # include <hash_map.h>
305 namespace sgi { using ::hash ; using ::hash_map ; } ;
306 -# else
307 +# elif __GNUC__ == 3 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 3 )
308 # include <ext/hash_map>
309 -# if __GNUC_MINOR__ == 0
310 +# if __GNUC__ == 3 && __GNUC_MINOR__ == 0
311 namespace sgi = std ; // GCC 3.0
312 # else
313 namespace sgi = __gnu_cxx ; // GCC 3.1 and later
314 # endif
315 +# else
316 +# include <unordered_map>
317 +# define hash_map unordered_map
318 + namespace sgi = std ;
319 # endif
320 #else
321 namespace sgi = std ;
322 #endif
323
324 --- steghide-0.5.1.old/src/wrapper_hash_set.h 2003-09-28 17:30:30.000000000 +0200
325 +++ steghide-0.5.1.new/src/wrapper_hash_set.h 2008-05-09 19:04:46.000000000 +0200
326 @@ -26,17 +26,21 @@
327
328 #ifdef __GNUC__
329 # if __GNUC__ < 3
330 # include <hash_set.h>
331 namespace sgi { using ::hash ; using ::hash_set ; } ;
332 -# else
333 +# elif __GNUC__ == 3 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 3 )
334 # include <ext/hash_set>
335 -# if __GNUC_MINOR__ == 0
336 +# if __GNUC__ == 3 && __GNUC_MINOR__ == 0
337 namespace sgi = std ; // GCC 3.0
338 # else
339 namespace sgi = ::__gnu_cxx ; // GCC 3.1 and later
340 # endif
341 +# else
342 +# include <unordered_set>
343 +# define hash_set unordered_set
344 + namespace sgi = std ;
345 # endif
346 #else
347 namespace sgi = std ;
348 #endif
349