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