~ubuntu-branches/ubuntu/vivid/gtk-vnc/vivid

« back to all changes in this revision

Viewing changes to debian/patches/0001-fix-build-with-xulrunner-1.9.1.patch

  • Committer: Bazaar Package Importer
  • Author(s): Guido Günther
  • Date: 2010-07-16 17:55:31 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100716175531-vnolppaqgmo3rqij
Tags: 0.4.1-1
* [2703df5] Imported Upstream version 0.4.1
* [5a5910e] Drop patches applied upstream 
      0001-say-disconnected-from-server-only-once-connected.patch
      0002-remove-WERROR_CFLAGS.patch
      0004-Don-t-use-PATH_MAX.patch
      0005-Drop-space-after-Wl-in-libgtk_vnc_1_0_la_LDFLAGS.patch
      0006-Add-Wl-since-no-undefined-is-a-linker-option.patch
      0007-Explicitly-link-against-X11-libs-for-XkbGetKeyboard.patch
      0008-Add-missing-symbols.patch
      0009-Fix-missing-intialisation-of-sysdir-and-uderdir.patch
* [e3ed1d0] No need to run autoreconf anymore
* [1529b9a] No static libs built
* [15068ef] Update symbols file with new symbols
* [337c397] Bump standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
 
2
Date: Mon, 16 Nov 2009 21:48:41 +0100
 
3
Subject: [PATCH] fix build with xulrunner 1.9.1
 
4
 
 
5
Closes: #556840
 
6
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=564718
 
7
---
 
8
 plugin/npshell.c |    1 -
 
9
 plugin/npunix.c  |  176 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 
10
 2 files changed, 168 insertions(+), 9 deletions(-)
 
11
 
 
12
diff --git a/plugin/npshell.c b/plugin/npshell.c
 
13
index 0252a02..e1194aa 100644
 
14
--- a/plugin/npshell.c
 
15
+++ b/plugin/npshell.c
 
16
@@ -81,7 +81,6 @@ Contributor(s): Adobe Systems Incorporated.
 
17
 #include <string.h>
 
18
 
 
19
 #include <npapi.h>
 
20
-#include <npupp.h>
 
21
 
 
22
 #include "gtk-vnc-plugin.h"
 
23
 
 
24
diff --git a/plugin/npunix.c b/plugin/npunix.c
 
25
index 67a72f0..a9bdd88 100644
 
26
--- a/plugin/npunix.c
 
27
+++ b/plugin/npunix.c
 
28
@@ -55,7 +55,151 @@
 
29
 
 
30
 #include <stdio.h>
 
31
 #include <npapi.h>
 
32
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
 
33
 #include <npupp.h>
 
34
+#else
 
35
+#include <npfunctions.h>
 
36
+// For 1.9 compatibility
 
37
+// ------------------------------------------------
 
38
+typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);
 
39
+#define NewNPN_GetValueProc(FUNC)   \
 
40
+    ((NPN_GetValueUPP) (FUNC))
 
41
+#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3)    \
 
42
+    (*(FUNC))((ARG1), (ARG2), (ARG3))
 
43
+
 
44
+typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue);
 
45
+#define NewNPN_SetValueProc(FUNC)   \
 
46
+    ((NPN_SetValueUPP) (FUNC))
 
47
+#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3)    \
 
48
+    (*(FUNC))((ARG1), (ARG2), (ARG3))
 
49
+
 
50
+typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);
 
51
+#define NewNPN_GetURLProc(FUNC)   \
 
52
+    ((NPN_GetURLUPP) (FUNC))
 
53
+#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3)    \
 
54
+    (*(FUNC))((ARG1), (ARG2), (ARG3))
 
55
+
 
56
+typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData);
 
57
+#define NewNPN_GetURLNotifyProc(FUNC)   \
 
58
+    ((NPN_GetURLNotifyUPP) (FUNC))
 
59
+#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4)    \
 
60
+    (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
 
61
+
 
62
+typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
 
63
+#define NewNPN_PostURLProc(FUNC)    \
 
64
+    ((NPN_PostURLUPP) (FUNC))
 
65
+#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
 
66
+    (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
 
67
+
 
68
+typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
 
69
+#define NewNPN_PostURLNotifyProc(FUNC)    \
 
70
+    ((NPN_PostURLNotifyUPP) (FUNC))
 
71
+#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
 
72
+    (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
 
73
+
 
74
+typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);
 
75
+#define NewNPN_RequestReadProc(FUNC)    \
 
76
+    ((NPN_RequestReadUPP) (FUNC))
 
77
+#define CallNPN_RequestReadProc(FUNC, stream, range)    \
 
78
+    (*(FUNC))((stream), (range))
 
79
+
 
80
+typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
 
81
+#define NewNPN_NewStreamProc(FUNC)    \
 
82
+    ((NPN_NewStreamUPP) (FUNC))
 
83
+#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream)    \
 
84
+    (*(FUNC))((npp), (type), (window), (stream))
 
85
+
 
86
+typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer);
 
87
+#define NewNPN_WriteProc(FUNC)    \
 
88
+    ((NPN_WriteUPP) (FUNC))
 
89
+#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)   \
 
90
+    (*(FUNC))((npp), (stream), (len), (buffer))
 
91
+
 
92
+typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);
 
93
+#define NewNPN_DestroyStreamProc(FUNC)    \
 
94
+    ((NPN_DestroyStreamUPP) (FUNC))
 
95
+#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason)    \
 
96
+    (*(FUNC))((npp), (stream), (reason))
 
97
+
 
98
+typedef void (*NPN_StatusUPP)(NPP instance, const char* message);
 
99
+#define NewNPN_StatusProc(FUNC)   \
 
100
+    ((NPN_StatusUPP) (FUNC))
 
101
+#define CallNPN_StatusProc(FUNC, npp, msg)    \
 
102
+    (*(FUNC))((npp), (msg))
 
103
+
 
104
+typedef const char* (*NPN_UserAgentUPP)(NPP instance);
 
105
+#define NewNPN_UserAgentProc(FUNC)              \
 
106
+                ((NPN_UserAgentUPP) (FUNC))
 
107
+#define CallNPN_UserAgentProc(FUNC, ARG1)               \
 
108
+                (*(FUNC))((ARG1))
 
109
+
 
110
+typedef void* (*NPN_MemAllocUPP)(uint32_t size);
 
111
+#define NewNPN_MemAllocProc(FUNC)   \
 
112
+    ((NPN_MemAllocUPP) (FUNC))
 
113
+#define CallNPN_MemAllocProc(FUNC, ARG1)    \
 
114
+    (*(FUNC))((ARG1))
 
115
+
 
116
+typedef void (*NPN_MemFreeUPP)(void* ptr);
 
117
+#define NewNPN_MemFreeProc(FUNC)    \
 
118
+    ((NPN_MemFreeUPP) (FUNC))
 
119
+#define CallNPN_MemFreeProc(FUNC, ARG1)   \
 
120
+    (*(FUNC))((ARG1))
 
121
+
 
122
+typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size);
 
123
+#define NewNPN_MemFlushProc(FUNC)   \
 
124
+    ((NPN_MemFlushUPP) (FUNC))
 
125
+#define CallNPN_MemFlushProc(FUNC, ARG1)    \
 
126
+    (*(FUNC))((ARG1))
 
127
+
 
128
+typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);
 
129
+#define NewNPN_ReloadPluginsProc(FUNC)    \
 
130
+    ((NPN_ReloadPluginsUPP) (FUNC))
 
131
+#define CallNPN_ReloadPluginsProc(FUNC, ARG1)   \
 
132
+    (*(FUNC))((ARG1))
 
133
+
 
134
+typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect);
 
135
+#define NewNPN_InvalidateRectProc(FUNC)   \
 
136
+    ((NPN_InvalidateRectUPP) (FUNC))
 
137
+#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2)    \
 
138
+    (*(FUNC))((ARG1), (ARG2))
 
139
+
 
140
+typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region);
 
141
+#define NewNPN_InvalidateRegionProc(FUNC)   \
 
142
+    ((NPN_InvalidateRegionUPP) (FUNC))
 
143
+#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2)    \
 
144
+    (*(FUNC))((ARG1), (ARG2))
 
145
+
 
146
+typedef void (*NPN_ForceRedrawUPP)(NPP instance);
 
147
+#define NewNPN_ForceRedrawProc(FUNC)    \
 
148
+    ((NPN_ForceRedrawUPP) (FUNC))
 
149
+#define CallNPN_ForceRedrawProc(FUNC, ARG1)   \
 
150
+    (*(FUNC))((ARG1))
 
151
+
 
152
+typedef void* (*NPN_GetJavaEnvUPP)();
 
153
+#define NewNPN_GetJavaEnvProc(FUNC)    \
 
154
+    ((NPN_GetJavaEnvUPP) (FUNC))
 
155
+#define CallNPN_GetJavaEnvProc(FUNC)   \
 
156
+    (*(FUNC))()
 
157
+
 
158
+typedef void* (*NPN_GetJavaPeerUPP)(NPP instance);
 
159
+#define NewNPN_GetJavaPeerProc(FUNC)    \
 
160
+    ((NPN_GetJavaPeerUPP) (FUNC))
 
161
+#define CallNPN_GetJavaPeerProc(FUNC, ARG1)   \
 
162
+    (*(FUNC))((ARG1))
 
163
+
 
164
+typedef bool (*NPN_PushPopupsEnabledStateUPP)(NPP instance, NPBool enabled);
 
165
+#define NewNPN_PushPopupsEnabledStateProc(FUNC)    \
 
166
+    ((NPN_PushPopupsEnabledStateUPP) (FUNC))
 
167
+#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2)   \
 
168
+    (*(FUNC))((ARG1), (ARG2))
 
169
+
 
170
+typedef bool (*NPN_PopPopupsEnabledStateUPP)(NPP instance);
 
171
+#define NewNPN_PopPopupsEnabledStateProc(FUNC)    \
 
172
+    ((NPN_PopPopupsEnabledStateUPP) (FUNC))
 
173
+#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1)   \
 
174
+    (*(FUNC))((ARG1))
 
175
+
 
176
+#endif
 
177
 
 
178
 #include <glib.h>               /* just for G_GNUC_UNUSED */
 
179
 
 
180
@@ -132,14 +276,14 @@ NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notify
 
181
 
 
182
 NPError
 
183
 NPN_PostURL(NPP instance, const char* url, const char* window,
 
184
-         uint32 len, const char* buf, NPBool file)
 
185
+         uint32_t len, const char* buf, NPBool file)
 
186
 {
 
187
     return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
 
188
                     url, window, len, buf, file);
 
189
 }
 
190
 
 
191
 NPError
 
192
-NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len,
 
193
+NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len,
 
194
                   const char* buf, NPBool file, void* notifyData)
 
195
 {
 
196
     return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
 
197
@@ -162,7 +306,7 @@ NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
 
198
 }
 
199
 
 
200
 int32
 
201
-NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
 
202
+NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
 
203
 {
 
204
     return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
 
205
                     stream, len, buffer);
 
206
@@ -188,7 +332,7 @@ NPN_UserAgent(NPP instance)
 
207
 }
 
208
 
 
209
 void*
 
210
-NPN_MemAlloc(uint32 size)
 
211
+NPN_MemAlloc(uint32_t size)
 
212
 {
 
213
     return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
 
214
 }
 
215
@@ -198,7 +342,7 @@ void NPN_MemFree(void* ptr)
 
216
     CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
 
217
 }
 
218
 
 
219
-uint32 NPN_MemFlush(uint32 size)
 
220
+uint32_t NPN_MemFlush(uint32_t size)
 
221
 {
 
222
     return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
 
223
 }
 
224
@@ -267,8 +411,8 @@ void NPN_PopPopupsEnabledState(NPP instance)
 
225
  ***********************************************************************/
 
226
 
 
227
 static NPError
 
228
-Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
 
229
-        int16 argc, char* argn[], char* argv[], NPSavedData* saved)
 
230
+Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
 
231
+        int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
 
232
 {
 
233
     NPError ret;
 
234
     PLUGINDEBUGSTR("New");
 
235
@@ -313,7 +457,7 @@ Private_WriteReady(NPP instance, NPStream* stream)
 
236
 }
 
237
 
 
238
 static int32
 
239
-Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
 
240
+Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len,
 
241
         void* buffer)
 
242
 {
 
243
     unsigned int result;
 
244
@@ -499,6 +643,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
 
245
          */
 
246
         pluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
 
247
         pluginFuncs->size       = sizeof(NPPluginFuncs);
 
248
+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
 
249
         pluginFuncs->newp       = NewNPP_NewProc(Private_New);
 
250
         pluginFuncs->destroy    = NewNPP_DestroyProc(Private_Destroy);
 
251
         pluginFuncs->setwindow  = NewNPP_SetWindowProc(Private_SetWindow);
 
252
@@ -511,6 +656,21 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
 
253
         pluginFuncs->urlnotify  = NewNPP_URLNotifyProc(Private_URLNotify);
 
254
         pluginFuncs->getvalue   = NewNPP_GetValueProc(Private_GetValue);
 
255
         pluginFuncs->event      = NewNPP_HandleEventProc(Private_HandleEvent);
 
256
+#else
 
257
+        pluginFuncs->newp       = (NPP_NewProcPtr)(Private_New);
 
258
+        pluginFuncs->destroy    = (NPP_DestroyProcPtr)(Private_Destroy);
 
259
+        pluginFuncs->setwindow  = (NPP_SetWindowProcPtr)(Private_SetWindow);
 
260
+        pluginFuncs->newstream  = (NPP_NewStreamProcPtr)(Private_NewStream);
 
261
+        pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
 
262
+        pluginFuncs->asfile     = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
 
263
+        pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
 
264
+        pluginFuncs->write      = (NPP_WriteProcPtr)(Private_Write);
 
265
+        pluginFuncs->print      = (NPP_PrintProcPtr)(Private_Print);
 
266
+        pluginFuncs->urlnotify  = (NPP_URLNotifyProcPtr)(Private_URLNotify);
 
267
+        pluginFuncs->getvalue   = (NPP_GetValueProcPtr)(Private_GetValue);
 
268
+        pluginFuncs->event      = (NPP_HandleEventProcPtr)(Private_HandleEvent);
 
269
+#endif
 
270
+
 
271
 #ifdef OJI
 
272
         pluginFuncs->javaClass  = Private_GetJavaClass();
 
273
 #endif
 
274
--