Commit Graph

211 Commits

Author SHA1 Message Date
lif b98eea51e8 enable arm build 2020-03-23 00:36:03 -07:00
David Benjamin 928c32260a Link to gthread-2.0
We call g_thread_init and whatnot. Fixes bug #44.

Reported-by: Micah Gersten <micahg@ubuntu.com>
2011-12-29 08:44:51 -05:00
David Benjamin de08bfb186 Don't include gthread.h directly
Only glib.h (and glib/gstdio.h) are supposed to be included directly.
Fixes bug #43.

Reported-by: Anssi Hannula <anssi.hannula@iki.fi>
2011-12-29 08:44:30 -05:00
Pavel Roskin 6bd99e4da8 Use libdl when linking npplayer
Without it, following error occurs on Fedora 15 when compiling for
x86_64:

/usr/bin/ld: npplayer-npw-player.o: undefined reference to symbol
'dlsym@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO
/lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Fedora already has a patch that adds -ldl to LDFLAGS

Signed-off-by: Pavel Roskin <proski@gnu.org>
2011-10-29 16:06:20 -04:00
David Benjamin a9e1623e44 Update to npapi-sdk r14
Just uninteresting thing about undefined variables.
2011-10-19 16:42:40 -04:00
David Benjamin 65ef09da15 Hard-code NPNVsupportsAdvancedKeyHandling to FALSE
In case a plugin attempts to check this (unlikely as no browser
implements it yet) and avoid NULL checks on all the entry points, we
shouldn't crash. Also, for correctness, even if the browser supports it,
a browser + nspluginwrapper combination doesn't.
2011-09-14 10:55:56 -04:00
David Benjamin 62a50c7197 Implement NPNVdocumentOrigin
No one implements it yet, but it's a very simple variable, and very very
important to support when it does get used.
2011-09-14 10:52:50 -04:00
David Benjamin 2090fbafdc Add missing NULL check 2011-09-14 09:21:43 -04:00
David Benjamin 5e1f84fc9c Update NPAPI headers to r13
There's now a NPNVdocumentOrigin.
2011-09-14 08:38:56 -04:00
David Benjamin f3c2b2d1f5 Leak library handles in is_wrapper_plugin
Many libraries crash on unload. Better to just keep them all loaded in
the process like everything else does.
2011-09-06 19:48:36 -04:00
David Benjamin f40a1f6089 Replace the plugin atomically instead of writing in-place
To say nothing of atomicity, lots of Bad Things happen when you replace
libraries in-place. gdb apparently gets upset at you, and you get random
crashes in programs which have the library loaded. Evidently libdl.so
can't even handle it. It's unspecified whether changes to a file mmapped
as MAP_PRIVATE are visible to the process.

Fixes #35.
2011-08-16 10:22:25 -07:00
David Benjamin 37b70dee71 Update to latest NPAPI SDK
Added a new variable. OS X only, so uninteresting.
2011-08-15 00:29:04 -07:00
David Benjamin c857c1b01d Drop some more archive-related rules
The archive-making ones were removed earlier, so these don't work
anymore. No one complained, so let's drop the rest too.
2011-08-13 11:57:31 -07:00
David Benjamin c5b1faa7d3 Fix another parallel build issue
Adapted from a Gentoo patch.

Reported-By: Martin von Gagern <Martin.vGagern@gmx.net>
2011-08-13 11:56:30 -07:00
David Benjamin b8a6af3f13 Set GDK_NATIVE_WINDOWS unconditionally
Browsers are supposed to set it all the time, if we take what Firefox
and Chrome do as the spec (which is as reasonable as anything). May as
well apply the workaround everywhere instead of assuming only Flash
needs it.

Reported-By: Stanislav Brabec <sbrabec@suse.cz>
2011-08-13 11:23:27 -07:00
David Benjamin 66f613f65b Update to latest npapi-sdk headers
Just some whitespace changes. Nothing interesting.
2011-07-22 20:02:49 -07:00
Stanislav Brabec 8f3be9a1f8 Tell curl that we are a multi-threaded program - i. e. it can not use signals.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2011-07-13 21:16:04 -07:00
David Benjamin 304a86f7b8 New hostname
Thanks to the Fedora project for letting me use it.
2011-07-01 09:33:04 -07:00
David Benjamin 2f2e00a95a nspluginwrapper 1.4.4 2011-06-30 20:18:57 -07:00
David Benjamin dbce3d4418 Add missing install.dirs dependency 2011-06-30 20:18:57 -07:00
David Benjamin 9b1c7f0ff5 Use g_main_context_add_poll for the RPC source
There is not much point in playing silly games with the FD list when we
could just as well add a FD and check it out-of-band.
2011-06-29 09:39:11 -07:00
David Benjamin f6ec3f4c24 Rename a variable to be less confusing 2011-06-29 08:35:11 -07:00
David Benjamin e80bd44a50 Use g_renew instead of freeing and reusing the memory 2011-06-29 08:35:08 -07:00
David Benjamin 173fc6a221 Fix crash when the number of file descriptors grows and then shrinks
This is a bit of an embarrassing bug. The allocated size of the array
and the number of elements are not always the same.

Reported by Fridtjof Busse.
2011-06-28 20:57:35 -07:00
David Benjamin 253d41890a nspluginwrapper 1.4.2 2011-06-04 11:41:40 -07:00
David Benjamin ee50a9d681 Fix install with parallel make
Patch by Shannon of Gentoo bugzilla. Fixes #30.

http://bugs.gentoo.org/show_bug.cgi?id=368665#c10
2011-06-02 09:35:44 -07:00
David Benjamin c8bacf3192 Use the correct symbol version for _Unwind_GetIPInfo
See bug #29. Reported by Matthias Dahl.
2011-05-29 17:07:50 -07:00
David Benjamin cea4f99888 Use %.*s instead of strndup to print the script in NPN_Evaluate 2011-05-25 23:17:44 -04:00
David Benjamin 7ad48aab42 Pull in latest npapi-sdk headers
Just a boring whitespace change.
2011-05-20 15:55:43 -04:00
David Benjamin f136c8bae3 Move variable declaration down a bit
Just to refactor a little.
2011-05-18 00:49:01 -04:00
David Benjamin c7c9aa3fc0 Refactor the GDK_NATIVE_WINDOWS patch
Follow the Fedora patch and put it into npw-viewer.sh. It's a little
cleaner than in the Makefile.
2011-05-17 19:36:31 -04:00
David Benjamin 66570b9b0c Make the plugin capabitilities check somewhat more robust 2011-05-17 16:12:32 -04:00
David Benjamin e87d49bdd6 Half-initialize the plug-in in NP_Initialize
Otherwise the check for attempting to load the wrapper template plug-in
fails in GTK WebKit (which tries to call NP_Initialize on every
plug-in).

Reported by Arch Linux users.
2011-05-17 12:25:00 -04:00
David Benjamin b19fd2707a Send a version in npw-player
Likely doesn't matter, but probably worth initializing the plug-in
correctly.
2011-05-15 19:29:46 -04:00
David Benjamin 141e8d5bb6 nspluginwrapper 1.4.0 2011-05-15 15:35:06 -04:00
David Benjamin 2cd26d4902 Detect Konqueror and use glib event loop instead of Xt one
Unfortunately, while Konqueror pretends to have an Xt event loop, it is
completely non-functional. Block hooks will not run, because it is a Qt
event loop polling Xt. Work procs also do not work because Xt does not
report them in XtAppPending. A timeout should, in theory, work, but
Konqueror doesn't even enable its Xt bridge most of the time! If the
plug-in requests XEmbed (as Flash does), a PluginHostXt is never created
and XtEvents::enable is never called. Instead of fighting all this, just
use the glib event loop. They have a bridge and Qt uses the glib event
loop these days anyway.

The only reason it used to work is because, not supporting windowless
plug-ins, most of communication was from browser to plug-in. Requests
would just get queued up and (with luck) not time out. With the new
delayed sync mechanism, we are unable to register the delayed sync and
instead the plug-in hangs.
2011-05-15 15:32:19 -04:00
David Benjamin fe3a3e5416 List the new website in the README 2011-05-15 13:13:33 -04:00
David Benjamin 15bbf8b8ca Well, we work with 10.3
May as well list it. Possibly also worth garbage-collecting the other
entries.
2011-05-13 23:00:56 -04:00
David Benjamin a3630244c1 Replace mkdir_p with g_mkdir_with_parents 2011-05-13 22:15:59 -04:00
David Benjamin 7afea93464 Replace strstart with g_str_has_prefix 2011-05-13 21:59:09 -04:00
David Benjamin abe9cae68b Use g_build_filename in process_plugin_dir 2011-05-13 21:55:06 -04:00
David Benjamin 3740fd1c38 Don't use a static buffer for ~/.mozilla/plugins
Better avoid the potential buffer overflow.
2011-05-13 21:55:06 -04:00
David Benjamin 5e7569fd2b Use glib's code to get the home directory
No need to reinvent the wheel.
2011-05-13 21:53:15 -04:00
David Benjamin 60b4157778 Link npw-config against glib
This file needs to be replaced with something else entirely, but it'd be
good to get rid of some of disturbing buffer-manipulation logic. The
plugin itself depends on it anyway.
2011-05-13 21:53:15 -04:00
David Benjamin 5d64df2acc Implement NPAPI ClearSiteData hooks
Now that recent stable versions of Firefox, Chrome, and Flash all
implement it, we should wrap it.

Tested in Flash 10.3 with Chrome's 'Clear Browsing Data', Firefox's
'Clear Recent History', and Firefox's 'Forget About This Site'. It
appears Flash ignores maxAge and, when asked to clear all data ever,
sometimes gives NPERR_GENERIC_ERROR. But those aren't problems on our
end, and it seems to otherwise work.

See bug #6.
2011-05-13 19:17:37 -04:00
David Benjamin ff68174da4 Refactor some code a little bit 2011-05-13 19:17:37 -04:00
David Benjamin 3050d01ac0 Don't check capabilities in PLUGIN_DIRECT_EXEC 2011-05-13 19:17:37 -04:00
David Benjamin 25ea7083d6 Pass the version to NP_Initialize in NPPluginFuncs
Flash 10.3 expects to find a version in there.
2011-05-13 18:30:24 -04:00
David Benjamin 272e74cbf9 Kill npw_asprintf
It's not used anywhere and glib provides g_strdup_printf anyway.
2011-05-13 16:49:52 -04:00
David Benjamin c9a15440ef Always provide the event loop functions
It doesn't matter whether or not the browser handles them, we always do.
2011-04-28 19:25:38 -04:00