patches/gnash-04-plugin.diff
author trisk
Mon, 14 Dec 2009 08:57:11 +0000
changeset 2259 c0ed6d3782ea
permissions -rw-r--r--
2009-12-14 Albert Lee <[email protected]> * SFEagg.spec: *NEW* Anti-Grain Geometry (AGG) rendering engine * SFEgnash.spec: *NEW* Gnash - GNU Flash movie player * patches/agg-01-disable_gpc.diff: Disable gpc. * patches/agg-02-rpath.diff: Remove GNU ld -rpath option. * patches/agg-03-fix_recursion_crash.diff: Fix crash caused by infinite recursion. * patches/agg-04-libm.diff: Check if math library is required. * patches/gnash-01-stdc.diff: Fix uses of C library functions. * patches/gnash-02-sunpro.diff: Sun Studio support. * patches/gnash-03-gnashrc.diff: Improved $GNASHRC list parsing. * patches/gnash-04-plugin.diff: Portability and other fixes for plugin.
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/plugin/mozilla-sdk/include/prcpucfg-glibc.h	2009-09-13 19:22:18.000000000 -0400
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     2
+++ gnash-0.8.6/plugin/mozilla-sdk/include/prcpucfg-glibc.h	2009-12-10 00:03:56.385049958 -0500
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     3
@@ -19,6 +19,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     4
 /*
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     5
  * This file is used by not only Linux but also other glibc systems
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     6
  * such as GNU/Hurd and GNU/k*BSD.
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     7
+ * Gnash now uses it for all other Unix-like platforms as well.
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     8
  */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     9
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    10
 #ifndef nspr_cpucfg___
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    11
@@ -28,7 +29,17 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    12
 #define LINUX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    13
 #endif
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
-#define PR_AF_INET6 10  /* same as AF_INET6 */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    16
+#if defined(__sgi) || defined(sgi) || defined(__sgi__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    17
+
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    18
+#ifndef IRIX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    19
+	#define IRIX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    20
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    21
+
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    22
+#ifndef _SGI_MP_SOURCE
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    23
+	#define _SGI_MP_SOURCE
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    24
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    25
+
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    26
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    27
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    28
 #if defined(__powerpc64__)
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
@@ -213,7 +224,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    31
 #define PR_BYTES_PER_WORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    32
 #define PR_BYTES_PER_DWORD_LOG2 3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    33
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    34
-#elif defined(__x86_64__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    35
+#elif defined(__x86_64__) || defined(__x86_64) || defined(__amd64__)
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
 #define IS_LITTLE_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    38
 #undef  IS_BIG_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    39
@@ -304,55 +315,58 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    40
 #define PR_BYTES_PER_WORD_LOG2   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    41
 #define PR_BYTES_PER_DWORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    42
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    43
-#elif defined(__sparc__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    44
+#elif defined(__sparc__) || defined(sparc)
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
 #undef	IS_LITTLE_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    47
 #define	IS_BIG_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    48
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    49
+#if defined(__sparcv9) || defined(__arch64__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    50
+#define IS_64
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    51
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    52
+
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    53
+#ifdef IS_64
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
 #define PR_BYTES_PER_BYTE   1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    56
 #define PR_BYTES_PER_SHORT  2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    57
 #define PR_BYTES_PER_INT    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    58
 #define PR_BYTES_PER_INT64  8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    59
-#define PR_BYTES_PER_LONG   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    60
+#define PR_BYTES_PER_LONG   8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    61
 #define PR_BYTES_PER_FLOAT  4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    62
 #define PR_BYTES_PER_DOUBLE 8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    63
-#define PR_BYTES_PER_WORD   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    64
+#define PR_BYTES_PER_WORD   8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    65
 #define PR_BYTES_PER_DWORD  8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    66
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    67
 #define PR_BITS_PER_BYTE    8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    68
 #define PR_BITS_PER_SHORT   16
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    69
 #define PR_BITS_PER_INT     32
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    70
 #define PR_BITS_PER_INT64   64
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    71
-#define PR_BITS_PER_LONG    32
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    72
+#define PR_BITS_PER_LONG    64
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    73
 #define PR_BITS_PER_FLOAT   32
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    74
 #define PR_BITS_PER_DOUBLE  64
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    75
-#define PR_BITS_PER_WORD    32
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    76
+#define PR_BITS_PER_WORD    64
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
 #define PR_BITS_PER_BYTE_LOG2   3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    79
 #define PR_BITS_PER_SHORT_LOG2  4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    80
 #define PR_BITS_PER_INT_LOG2    5
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    81
 #define PR_BITS_PER_INT64_LOG2  6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    82
-#define PR_BITS_PER_LONG_LOG2   5
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    83
+#define PR_BITS_PER_LONG_LOG2   6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    84
 #define PR_BITS_PER_FLOAT_LOG2  5
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    85
 #define PR_BITS_PER_DOUBLE_LOG2 6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    86
-#define PR_BITS_PER_WORD_LOG2   5
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    87
+#define PR_BITS_PER_WORD_LOG2   6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    88
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    89
 #define PR_ALIGN_OF_SHORT   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    90
 #define PR_ALIGN_OF_INT     4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    91
-#define PR_ALIGN_OF_LONG    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    92
+#define PR_ALIGN_OF_LONG    8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    93
 #define PR_ALIGN_OF_INT64   8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    94
 #define PR_ALIGN_OF_FLOAT   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    95
 #define PR_ALIGN_OF_DOUBLE  8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    96
-#define PR_ALIGN_OF_POINTER 4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    97
-#define PR_ALIGN_OF_WORD    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    98
-
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    99
-#define PR_BYTES_PER_WORD_LOG2   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   100
-#define PR_BYTES_PER_DWORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   101
+#define PR_ALIGN_OF_POINTER 8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   102
+#define PR_ALIGN_OF_WORD    8
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
-#elif defined(__i386__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   105
+#define PR_BYTES_PER_WORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   106
+#define PR_BYTES_PER_DWORD_LOG2 3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   107
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   108
-#define IS_LITTLE_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   109
-#undef  IS_BIG_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   110
+#else /* IS_64 */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   111
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   112
 #define PR_BYTES_PER_BYTE   1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   113
 #define PR_BYTES_PER_SHORT  2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   114
@@ -385,30 +399,21 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   115
 #define PR_ALIGN_OF_SHORT   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   116
 #define PR_ALIGN_OF_INT     4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   117
 #define PR_ALIGN_OF_LONG    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   118
-#define PR_ALIGN_OF_INT64   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   119
+#define PR_ALIGN_OF_INT64   8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   120
 #define PR_ALIGN_OF_FLOAT   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   121
-#define PR_ALIGN_OF_DOUBLE  4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   122
+#define PR_ALIGN_OF_DOUBLE  8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   123
 #define PR_ALIGN_OF_POINTER 4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   124
 #define PR_ALIGN_OF_WORD    4
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
 #define PR_BYTES_PER_WORD_LOG2   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   127
 #define PR_BYTES_PER_DWORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   128
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   129
-#elif defined(__sgi) || defined(sgi) || defined(__sgi__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   130
+#endif /* IS_64 */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   131
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   132
-#ifndef IRIX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   133
-	#define IRIX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   134
-#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   135
-
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   136
-#ifndef _SGI_MP_SOURCE
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   137
-	#define _SGI_MP_SOURCE
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   138
-#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   139
-
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   140
-#undef  IS_LITTLE_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   141
-#define IS_BIG_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   142
+#elif defined(__i386__) || defined(i386)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   143
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   144
-#undef PR_AF_INET6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   145
-#define PR_AF_INET6 24  /* same as AF_INET6 */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   146
+#define IS_LITTLE_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   147
+#undef  IS_BIG_ENDIAN
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
 #define PR_BYTES_PER_BYTE   1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   150
 #define PR_BYTES_PER_SHORT  2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   151
@@ -438,31 +443,24 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   152
 #define PR_BITS_PER_DOUBLE_LOG2 6
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   153
 #define PR_BITS_PER_WORD_LOG2   5
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   154
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   155
-#define PR_BYTES_PER_WORD_LOG2  2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   156
-#define PR_BYTES_PER_DWORD_LOG2 3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   157
-
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   158
 #define PR_ALIGN_OF_SHORT   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   159
 #define PR_ALIGN_OF_INT     4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   160
 #define PR_ALIGN_OF_LONG    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   161
-#define PR_ALIGN_OF_INT64   8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   162
+#define PR_ALIGN_OF_INT64   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   163
 #define PR_ALIGN_OF_FLOAT   4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   164
-#define PR_ALIGN_OF_DOUBLE  8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   165
+#define PR_ALIGN_OF_DOUBLE  4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   166
 #define PR_ALIGN_OF_POINTER 4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   167
 #define PR_ALIGN_OF_WORD    4
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   168
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   169
-#define HAVE_LONG_LONG
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   170
-#define HAVE_ALIGNED_DOUBLES
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   171
-#define HAVE_ALIGNED_LONGLONGS
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
-#define _PR_POLL_BACKCOMPAT
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   174
-
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   175
+#define PR_BYTES_PER_WORD_LOG2   2
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   176
+#define PR_BYTES_PER_DWORD_LOG2  3
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   177
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   178
-#elif defined(__mips__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   179
+#elif defined(__mips__) || defined(__mips)
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
-#ifdef __MIPSEB__
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   182
+#if defined(__MIPSEB__) || defined(__MIPSEB)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   183
 #define IS_BIG_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   184
 #undef  IS_LITTLE_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   185
-#elif defined(__MIPSEL__)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   186
+#elif defined(__MIPSEL__) || defined(__MIPSEL)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   187
 #define IS_LITTLE_ENDIAN 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   188
 #undef  IS_BIG_ENDIAN
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   189
 #else
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   190
@@ -699,9 +697,13 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   191
 #define	HAVE_LONG_LONG
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   192
 #if PR_ALIGN_OF_DOUBLE == 8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   193
 #define HAVE_ALIGNED_DOUBLES
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   194
+#else
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   195
+#undef HAVE_ALIGNED_DOUBLES
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   196
 #endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   197
 #if PR_ALIGN_OF_INT64 == 8
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   198
 #define HAVE_ALIGNED_LONGLONGS
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   199
+#else
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   200
+#undef HAVE_ALIGNED_LONGLONGS
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   201
 #endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   202
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   203
 #ifndef NO_NSPR_10_SUPPORT
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   204
--- gnash-0.8.6.orig/plugin/plugin.cpp	2009-09-13 19:22:18.000000000 -0400
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   205
+++ gnash-0.8.6/plugin/plugin.cpp	2009-12-10 21:58:46.637940745 -0500
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   206
@@ -21,6 +21,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   207
 #endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   208
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   209
 #include <cstdlib> // getenv
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   210
+#include <stdlib.h> // putenv
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   211
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   212
 #define MIME_TYPES_HANDLED  "application/x-shockwave-flash"
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   213
 // The name must be this value to get flash movies that check the
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   214
@@ -60,6 +61,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   215
 #include "plugin.h" 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   216
 #include <csignal>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   217
 #include "GnashSystemIOHeaders.h"
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   218
+#include "StringPredicates.h"
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   219
 #include <cstdio>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   220
 #include <cstddef>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   221
 #include <cstring>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   222
@@ -68,6 +70,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   223
 #include <sys/wait.h>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   224
 #include <fcntl.h>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   225
 #include <cerrno>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   226
+#include <climits>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   227
 #include <string>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   228
 #include <vector>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   229
 #include <iostream>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   230
@@ -97,6 +100,10 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   231
 # include <nsStringAPI.h>
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   232
 #endif // HAVE_XPCOM
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   233
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   234
+#ifndef PATH_MAX
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   235
+#define PATH_MAX 1024
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   236
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   237
+
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   238
 extern NPNetscapeFuncs NPNFuncs;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   239
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   240
 NPBool plugInitialized = FALSE;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   241
@@ -272,43 +279,43 @@
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
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   244
     // Append SYSCONFDIR/gnashpluginrc and ~/.gnashpluginrc to GNASHRC
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   245
-    do {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   246
-        // TODO: extract content in a set, add to set
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   247
-        //       and serialize back (to avoid duplicates)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   248
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   249
-        std::string newGnashRc;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   250
-        char *gnashrc = std::getenv("GNASHRC");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   251
-        if ( gnashrc )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   252
-        {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   253
-            newGnashRc.assign(gnashrc);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   254
-            newGnashRc.append(":");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   255
-        }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   256
+    std::string newGnashRc("GNASHRC=");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   257
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   258
-        newGnashRc.append(SYSCONFDIR);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   259
-        newGnashRc.append("/gnashpluginrc");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   260
+    newGnashRc.append(SYSCONFDIR);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   261
+    newGnashRc.append("/gnashpluginrc");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   262
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   263
-        char *home = std::getenv("HOME");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   264
-        if ( home )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   265
-        {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   266
-            newGnashRc.append(":");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   267
-            newGnashRc.append(home);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   268
-            newGnashRc.append("/.gnashpluginrc");
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
-        else
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   271
-        {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   272
-            std::cout << "WARNING: NPAPI plugin could not find user home dir" << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   273
-        }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   274
+    char *home = std::getenv("HOME");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   275
+    if ( home )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   276
+    {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   277
+        newGnashRc.append(":");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   278
+        newGnashRc.append(home);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   279
+        newGnashRc.append("/.gnashpluginrc");
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
+    else
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   282
+    {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   283
+        std::cout << "WARNING: NPAPI plugin could not find user home dir" << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   284
+    }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   285
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   286
-        if ( setenv("GNASHRC", newGnashRc.c_str(), 1) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   287
-        {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   288
-            std::cout << "WARNING: NPAPI plugin could not append to the GNASHRC env variable" << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   289
-        }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   290
-#if GNASH_PLUGIN_DEBUG > 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   291
-        else std::cout << "NOTE: NPAPI plugin set GNASHRC to " << newGnashRc << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   292
-#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   293
+    char *gnashrc = std::getenv("GNASHRC");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   294
+    if ( gnashrc )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   295
+    {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   296
+        newGnashRc.append(":");
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   297
+        newGnashRc.append(gnashrc);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   298
+    }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   299
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   300
-    } while (0);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   301
+    // putenv doesn't copy the string in standards-conforming implementations
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   302
+    gnashrc = new char[PATH_MAX];
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   303
+    std::strncpy(gnashrc, newGnashRc.c_str(), PATH_MAX);
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   304
+    gnashrc[PATH_MAX-1] = '\0';
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   305
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   306
+    if ( putenv(gnashrc) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   307
+    {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   308
+        std::cout << "WARNING: NPAPI plugin could not append to the GNASHRC env variable" << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   309
+    }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   310
+#if GNASH_PLUGIN_DEBUG > 1
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   311
+    else std::cout << "NOTE: NPAPI plugin set GNASHRC to " << newGnashRc << std::endl;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   312
+#endif
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   313
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   314
     /* Success */
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   315
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   316
@@ -429,6 +436,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   317
     for (size_t i=0, n=data->argc; i<n; ++i)
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   318
     {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   319
         std::string name, val;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   320
+        gnash::StringNoCaseEqual noCaseCompare;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   321
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   322
         if (data->argn[i])
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   323
         {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   324
@@ -440,7 +448,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   325
             val = data->argv[i];
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   326
         }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   327
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   328
-        if ( ! strcasecmp(name.c_str(), "name") )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   329
+        if (noCaseCompare(name, "name"))
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   330
         {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   331
             _name = val;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   332
         }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   333
@@ -808,7 +816,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   334
         return false;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   335
     }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   336
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   337
-    if ( ! strncmp(buf, "GET ", 4) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   338
+    if ( ! std::strncmp(buf, "GET ", 4) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   339
     {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   340
         char* target = buf + 4;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   341
         if ( ! *target )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   342
@@ -842,7 +850,7 @@
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   343
         return true;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   344
 
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   345
     }
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   346
-    else if ( ! strncmp(buf, "INVOKE ", 7) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   347
+    else if ( ! std::strncmp(buf, "INVOKE ", 7) )
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   348
     {
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   349
         char* command = buf + 7;
c0ed6d3782ea 2009-12-14 Albert Lee <[email protected]>
trisk
parents:
diff changeset
   350
         if ( ! *command ) {