2259
|
1 |
--- gnash-0.8.6.orig/configure.ac 2009-09-13 20:13:12.000000000 -0400
|
|
2 |
+++ gnash-0.8.6/configure.ac 2009-12-14 01:54:30.289061434 -0500
|
|
3 |
@@ -1479,6 +1479,7 @@
|
|
4 |
AC_CHECK_HEADERS(signal.h)
|
|
5 |
AC_CHECK_HEADERS(unistd.h)
|
|
6 |
AC_CHECK_HEADERS(sys/time.h)
|
|
7 |
+AC_CHECK_HEADERS(ieeefp.h)
|
|
8 |
dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
|
|
9 |
dnl on most machines without it. While it isn't diretly used by Gnash at all,
|
|
10 |
dnl it's to work around an Ubuntu packaging bug.
|
|
11 |
@@ -1563,30 +1564,36 @@
|
|
12 |
dnl AC_CHECK_FUNCS(strcasecmp stricmp)
|
|
13 |
dnl AC_CHECK_FUNCS(vsnprintf)
|
|
14 |
|
|
15 |
-dnl These two tests need the math library or they won't link
|
|
16 |
-dnl on OpenBSD, even if the functions exist.
|
|
17 |
-save_LIBS=$LIBS
|
|
18 |
-LIBS="$LIBS -lm"
|
|
19 |
AC_CACHE_CHECK([for finite], ac_cv_finite,
|
|
20 |
- [AC_TRY_LINK([#include <math.h>],
|
|
21 |
+ [AC_TRY_COMPILE([
|
|
22 |
+ #include <math.h>
|
|
23 |
+ #ifdef HAVE_IEEEFP_H
|
|
24 |
+ #include <ieeefp.h>
|
|
25 |
+ #endif],
|
|
26 |
[double x; int y; y = finite(x);],
|
|
27 |
ac_cv_finite=yes,
|
|
28 |
ac_cv_finite=no
|
|
29 |
)])
|
|
30 |
if test x"$ac_cv_finite" = x"yes"; then
|
|
31 |
- AC_DEFINE(HAVE_FINITE, [1], [Has finite])
|
|
32 |
+ AC_SEARCH_LIBS(finite, m,
|
|
33 |
+ [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
|
|
34 |
+ )
|
|
35 |
fi
|
|
36 |
|
|
37 |
+AC_LANG_PUSH(C++)
|
|
38 |
AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
|
|
39 |
- [AC_TRY_LINK([#include <math.h>],
|
|
40 |
- [double x; int y; y = isfinite(x);],
|
|
41 |
+ [AC_TRY_COMPILE([#include <cmath>],
|
|
42 |
+ [using namespace std; double x; int y; y = isfinite(x);],
|
|
43 |
ac_cv_isfinite=yes,
|
|
44 |
ac_cv_isfinite=no
|
|
45 |
)])
|
|
46 |
+AC_LANG_POP(C++)
|
|
47 |
if test x"$ac_cv_isfinite" = x"yes"; then
|
|
48 |
+ dnl Don't give up if isfinite is not found in -lm
|
|
49 |
+ dnl isfinite is defined as a macro in C99.
|
|
50 |
+ AC_SEARCH_LIBS(isfinite, m)
|
|
51 |
AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
|
|
52 |
fi
|
|
53 |
-LIBS=$save_LIBS
|
|
54 |
|
|
55 |
AC_LANG_PUSH(C++)
|
|
56 |
AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
|
|
57 |
--- gnash-0.8.6.orig/libbase/GnashImageJpeg.h 2009-09-13 19:22:16.000000000 -0400
|
|
58 |
+++ gnash-0.8.6/libbase/GnashImageJpeg.h 2009-12-09 06:43:52.911549122 -0500
|
|
59 |
@@ -58,7 +58,7 @@
|
|
60 |
|
|
61 |
const char* _errorOccurred;
|
|
62 |
|
|
63 |
- jmp_buf _jmpBuf;
|
|
64 |
+ std::jmp_buf _jmpBuf;
|
|
65 |
|
|
66 |
// State needed for input.
|
|
67 |
jpeg::jpeg_decompress_struct m_cinfo;
|
|
68 |
--- gnash-0.8.6.orig/libbase/URL.cpp 2009-09-13 19:22:16.000000000 -0400
|
|
69 |
+++ gnash-0.8.6/libbase/URL.cpp 2009-12-09 06:49:34.761880069 -0500
|
|
70 |
@@ -182,7 +182,7 @@
|
|
71 |
|
|
72 |
if (!dir) {
|
|
73 |
std::stringstream err;
|
|
74 |
- err << "getcwd failed: " << strerror(errno);
|
|
75 |
+ err << "getcwd failed: " << std::strerror(errno);
|
|
76 |
throw gnash::GnashException(err.str());
|
|
77 |
}
|
|
78 |
|
|
79 |
--- gnash-0.8.6.orig/libcore/SWFMatrix.cpp 2009-09-13 19:22:16.000000000 -0400
|
|
80 |
+++ gnash-0.8.6/libcore/SWFMatrix.cpp 2009-12-07 17:16:03.846022059 -0500
|
|
81 |
@@ -192,8 +192,8 @@
|
|
82 |
// Set the scale & rotation part of the SWFMatrix.
|
|
83 |
// angle in radians.
|
|
84 |
{
|
|
85 |
- double cos_angle = cos(angle);
|
|
86 |
- double sin_angle = sin(angle);
|
|
87 |
+ double cos_angle = std::cos(angle);
|
|
88 |
+ double sin_angle = std::sin(angle);
|
|
89 |
sx = DoubleToFixed16(x_scale * cos_angle);
|
|
90 |
shy = DoubleToFixed16(y_scale * -sin_angle);
|
|
91 |
shx = DoubleToFixed16(x_scale * sin_angle);
|
|
92 |
@@ -203,9 +203,9 @@
|
|
93 |
void
|
|
94 |
SWFMatrix::set_x_scale(double xscale)
|
|
95 |
{
|
|
96 |
- double rot_x = atan2((double)shx, (double)sx);
|
|
97 |
- sx = DoubleToFixed16(xscale * cos(rot_x));
|
|
98 |
- shx = DoubleToFixed16(xscale * sin(rot_x));
|
|
99 |
+ double rot_x = std::atan2((double)shx, (double)sx);
|
|
100 |
+ sx = DoubleToFixed16(xscale * std::cos(rot_x));
|
|
101 |
+ shx = DoubleToFixed16(xscale * std::sin(rot_x));
|
|
102 |
}
|
|
103 |
|
|
104 |
void
|
|
105 |
@@ -227,15 +227,15 @@
|
|
106 |
void
|
|
107 |
SWFMatrix::set_rotation(double rotation)
|
|
108 |
{
|
|
109 |
- double rot_x = atan2((double)shx, (double)sx);
|
|
110 |
- double rot_y = atan2((double)(-shy), (double)sy);
|
|
111 |
+ double rot_x = std::atan2((double)shx, (double)sx);
|
|
112 |
+ double rot_y = std::atan2((double)(-shy), (double)sy);
|
|
113 |
double scale_x = get_x_scale();
|
|
114 |
double scale_y = get_y_scale();
|
|
115 |
|
|
116 |
- sx = DoubleToFixed16(scale_x * cos(rotation));
|
|
117 |
- shx = DoubleToFixed16(scale_x * sin(rotation));
|
|
118 |
- shy = -DoubleToFixed16(scale_y * sin(rot_y - rot_x + rotation));
|
|
119 |
- sy = DoubleToFixed16(scale_y * cos(rot_y - rot_x + rotation));
|
|
120 |
+ sx = DoubleToFixed16(scale_x * std::cos(rotation));
|
|
121 |
+ shx = DoubleToFixed16(scale_x * std::sin(rotation));
|
|
122 |
+ shy = -DoubleToFixed16(scale_y * std::sin(rot_y - rot_x + rotation));
|
|
123 |
+ sy = DoubleToFixed16(scale_y * std::cos(rot_y - rot_x + rotation));
|
|
124 |
}
|
|
125 |
|
|
126 |
void
|
|
127 |
@@ -334,20 +334,20 @@
|
|
128 |
double
|
|
129 |
SWFMatrix::get_x_scale() const
|
|
130 |
{
|
|
131 |
- return sqrt(((double)sx * sx + (double)shx * shx)) / 65536.0;
|
|
132 |
+ return std::sqrt(((double)sx * sx + (double)shx * shx)) / 65536.0;
|
|
133 |
}
|
|
134 |
|
|
135 |
double
|
|
136 |
SWFMatrix::get_y_scale() const
|
|
137 |
{
|
|
138 |
- return sqrt(((double)sy * sy + (double)shy * shy)) / 65536.0;
|
|
139 |
+ return std::sqrt(((double)sy * sy + (double)shy * shy)) / 65536.0;
|
|
140 |
}
|
|
141 |
|
|
142 |
double
|
|
143 |
SWFMatrix::get_rotation() const
|
|
144 |
{
|
|
145 |
// more successes in misc-ming.all/SWFMatrix_test.c
|
|
146 |
- return atan2(static_cast<double>(shx), sx);
|
|
147 |
+ return std::atan2(static_cast<double>(shx), sx);
|
|
148 |
}
|
|
149 |
|
|
150 |
// private
|
|
151 |
--- gnash-0.8.6.orig/libcore/asobj/flash/media/Microphone_as.cpp 2009-09-13 19:22:17.000000000 -0400
|
|
152 |
+++ gnash-0.8.6/libcore/asobj/flash/media/Microphone_as.cpp 2009-12-08 21:53:00.552333428 -0500
|
|
153 |
@@ -339,7 +339,7 @@
|
|
154 |
return as_value(50.0);
|
|
155 |
} else {
|
|
156 |
gain = ((ptr->get_gain())*(0.8333333333333)) + 50;
|
|
157 |
- gain = round(gain);
|
|
158 |
+ gain = std::floor(gain + 0.5);
|
|
159 |
return as_value(gain);
|
|
160 |
}
|
|
161 |
#endif
|
|
162 |
--- gnash-0.8.6.orig/libmedia/AudioResampler.cpp 2009-09-13 19:22:17.000000000 -0400
|
|
163 |
+++ gnash-0.8.6/libmedia/AudioResampler.cpp 2009-12-07 16:23:49.776539235 -0500
|
|
164 |
@@ -81,7 +81,7 @@
|
|
165 |
if (inc == 1 && dup == 1)
|
|
166 |
{
|
|
167 |
// No tranformation required
|
|
168 |
- memcpy(out_data, data, output_sample_count * sizeof(boost::int16_t));
|
|
169 |
+ std::memcpy(out_data, data, output_sample_count * sizeof(boost::int16_t));
|
|
170 |
}
|
|
171 |
else if (inc > 1)
|
|
172 |
{
|
|
173 |
--- gnash-0.8.6.orig/libmedia/AudioDecoderNellymoser.cpp 2009-09-13 19:22:17.000000000 -0400
|
|
174 |
+++ gnash-0.8.6/libmedia/AudioDecoderNellymoser.cpp 2009-12-12 16:29:45.971821439 -0500
|
|
175 |
@@ -57,6 +57,8 @@
|
|
176 |
namespace gnash {
|
|
177 |
namespace media {
|
|
178 |
|
|
179 |
+const double sqrt1_2 = 0.70710678118654752440;
|
|
180 |
+
|
|
181 |
float nelly_neg_unpack_table[64] = {
|
|
182 |
-0.0061359000, -0.0306748003, -0.0551952012, -0.0796824023, -0.1041216031,
|
|
183 |
-0.1284981072, -0.1527972072, -0.1770042032, -0.2011045963, -0.2250839025,
|
|
184 |
@@ -674,7 +676,7 @@
|
|
185 |
for (i = 0; i < 23; i++) {
|
|
186 |
if (i > 0)
|
|
187 |
val += nelly_delta_table[get_bits(block, &bit_offset, 5)];
|
|
188 |
- pval = pow(2, val/2048);
|
|
189 |
+ pval = std::pow(2, val/2048);
|
|
190 |
for (j = 0; j < nelly_copy_count[i]; j++) {
|
|
191 |
*bptr = val;
|
|
192 |
*pptr = pval;
|
|
193 |
@@ -695,7 +697,7 @@
|
|
194 |
|
|
195 |
for (j = 0; j < NELLY_FILL_LEN; j++) {
|
|
196 |
if (bits[j] <= 0) {
|
|
197 |
- buf[j] = M_SQRT1_2*pows[j];
|
|
198 |
+ buf[j] = sqrt1_2*pows[j];
|
|
199 |
|
|
200 |
|
|
201 |
if (gimme_random() % 2)
|
2261
|
202 |
--- gnash-0.8.6.orig/backend/Renderer_ogl.cpp 2009-09-13 19:22:14.000000000 -0400
|
|
203 |
+++ gnash-0.8.6/backend/Renderer_ogl.cpp 2009-12-15 12:23:27.689228824 -0500
|
|
204 |
@@ -789,8 +789,8 @@
|
|
205 |
|
|
206 |
gluOrtho2D(x0, x1, y0, y1);
|
|
207 |
|
|
208 |
- _width = fabsf(x1 - x0);
|
|
209 |
- _height = fabsf(y1 - y0);
|
|
210 |
+ _width = std::fabs(x1 - x0);
|
|
211 |
+ _height = std::fabs(y1 - y0);
|
|
212 |
|
|
213 |
// Setup the clear color. The actual clearing will happen in end_display.
|
|
214 |
if (bg_color.m_a) {
|
|
215 |
@@ -1304,9 +1304,9 @@
|
|
216 |
LOG_ONCE( log_unimpl(_("Unidirectionally scaled strokes in OGL renderer")) );
|
|
217 |
}
|
|
218 |
|
|
219 |
- float stroke_scale = fabsf(mat.get_x_scale()) + fabsf(mat.get_y_scale());
|
|
220 |
+ float stroke_scale = std::fabs(mat.get_x_scale()) + std::fabs(mat.get_y_scale());
|
|
221 |
stroke_scale /= 2.0f;
|
|
222 |
- stroke_scale *= (fabsf(_xscale) + fabsf(_yscale)) / 2.0f;
|
|
223 |
+ stroke_scale *= (std::fabs(_xscale) + std::fabs(_yscale)) / 2.0f;
|
|
224 |
width *= stroke_scale;
|
|
225 |
width = twipsToPixels(width);
|
|
226 |
|
2259
|
227 |
--- gnash-0.8.6.orig/utilities/processor.cpp 2009-09-13 19:22:22.000000000 -0400
|
|
228 |
+++ gnash-0.8.6/utilities/processor.cpp 2009-12-08 22:44:01.081502556 -0500
|
|
229 |
@@ -35,7 +35,7 @@
|
|
230 |
#include <ctime>
|
|
231 |
|
|
232 |
#ifdef ENABLE_NLS
|
|
233 |
-#include <locale>
|
|
234 |
+#include <clocale>
|
|
235 |
#endif
|
|
236 |
|
|
237 |
#include "MovieFactory.h"
|
|
238 |
--- gnash-0.8.6.orig/utilities/dumpshm.cpp 2009-09-13 19:22:22.000000000 -0400
|
|
239 |
+++ gnash-0.8.6/utilities/dumpshm.cpp 2009-12-09 00:11:16.015435791 -0500
|
|
240 |
@@ -60,7 +60,7 @@
|
|
241 |
#include <cerrno>
|
|
242 |
|
|
243 |
#ifdef ENABLE_NLS
|
|
244 |
-# include <locale>
|
|
245 |
+# include <clocale>
|
|
246 |
#endif
|
|
247 |
|
|
248 |
#include "log.h"
|
|
249 |
--- gnash-0.8.6.orig/utilities/soldumper.cpp 2009-09-13 19:22:22.000000000 -0400
|
|
250 |
+++ gnash-0.8.6/utilities/soldumper.cpp 2009-12-08 22:42:33.201198924 -0500
|
|
251 |
@@ -25,7 +25,7 @@
|
|
252 |
#include <cstring>
|
|
253 |
|
|
254 |
#ifdef ENABLE_NLS
|
|
255 |
-# include <locale>
|
|
256 |
+# include <clocale>
|
|
257 |
#endif
|
|
258 |
|
|
259 |
extern "C"{
|
|
260 |
--- gnash-0.8.6.orig/utilities/flvdumper.cpp 2009-09-13 19:22:22.000000000 -0400
|
|
261 |
+++ gnash-0.8.6/utilities/flvdumper.cpp 2009-12-09 00:12:48.772507206 -0500
|
|
262 |
@@ -31,7 +31,7 @@
|
|
263 |
#include <vector>
|
|
264 |
|
|
265 |
#ifdef ENABLE_NLS
|
|
266 |
-# include <locale>
|
|
267 |
+# include <clocale>
|
|
268 |
#endif
|
|
269 |
|
|
270 |
#include "log.h"
|
|
271 |
--- gnash-0.8.6.orig/gui/gnash.cpp 2009-09-13 19:22:16.000000000 -0400
|
|
272 |
+++ gnash-0.8.6/gui/gnash.cpp 2009-12-09 00:15:07.840459783 -0500
|
|
273 |
@@ -51,7 +51,7 @@
|
|
274 |
#include <ios>
|
|
275 |
|
|
276 |
#ifdef ENABLE_NLS
|
|
277 |
-# include <locale>
|
|
278 |
+# include <clocale>
|
|
279 |
#endif
|
|
280 |
|
|
281 |
#ifdef GUI_ALP
|
|
282 |
--- gnash-0.8.6.orig/cygnal/cvm.cpp 2009-09-13 19:22:15.000000000 -0400
|
|
283 |
+++ gnash-0.8.6/cygnal/cvm.cpp 2009-12-09 05:43:27.186532583 -0500
|
|
284 |
@@ -34,7 +34,7 @@
|
|
285 |
#include <ctime>
|
|
286 |
|
|
287 |
#ifdef ENABLE_NLS
|
|
288 |
-#include <locale>
|
|
289 |
+#include <clocale>
|
|
290 |
#endif
|
|
291 |
|
|
292 |
#include "gettext.h"
|