adriantr09 / gecko-mediaplayer

Automatically exported from code.google.com/p/gecko-mediaplayer
GNU General Public License v2.0
0 stars 0 forks source link

gecko-mediaplayer on OpenBSD #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Since we don't have memmem() on OpenBSD, is it possible to add some "#ifdef
__OpenBSD__" in plugin_list.cpp to conditionally replace memmem() with
strstr()?
Apart from this, gecko-mediaplayer works well under OpenBSD.

cheers
-david

Original issue reported on code.google.com by dco...@gmail.com on 2 Feb 2009 at 8:51

GoogleCodeExporter commented 8 years ago
Actually strstr and memmem are not functionally compatible since strstr will 
stop and
NULL and memmem will not and some of the media files have NULLs early in the 
file and
will cause the check to fail. Find a suitable replacement and I'll put the 
patch in.

Original comment by kdeko...@gmail.com on 2 Feb 2009 at 1:53

GoogleCodeExporter commented 8 years ago
g_strstr_len() ??

Original comment by dco...@gmail.com on 2 Feb 2009 at 2:09

GoogleCodeExporter commented 8 years ago
No, that would not work either...

g_strrstr_len ()

gchar *             g_strrstr_len                       (const gchar *haystack,
                                                         gssize haystack_len,
                                                         const gchar *needle);

Searches the string haystack for the last occurrence of the string needle, 
limiting
the length of the search to haystack_len.

haystack :
    a nul-terminated string.

haystack_len :
    the maximum length of haystack.

needle :
    the nul-terminated string to search for.

Returns :
    a pointer to the found occurrence, or NULL if not found.

Original comment by kdeko...@gmail.com on 2 Feb 2009 at 2:24

GoogleCodeExporter commented 8 years ago
Adding a private_memmem like was done for totem-pl-parser and using it #ifndef
HAVE_MEMMEM ?

http://svn.gnome.org/viewvc/totem-pl-parser/trunk/lib/memmem.c?view=markup&pathr
ev=44

Original comment by dco...@gmail.com on 2 Feb 2009 at 2:31

GoogleCodeExporter commented 8 years ago
Comment 4 reminded me about something in mplayerplug-in. So I did the same 
thing to
gecko-mediaplayer that I did for mplayerplug-in. (be about 4 years since I had 
to
work around it then, so I had forgotten about it). See if SVN works now.

Original comment by kdeko...@gmail.com on 2 Feb 2009 at 2:53

GoogleCodeExporter commented 8 years ago
There's something wrong in configure stuff... It uses the private 
implementation of
memmem on Linux while, under OpenBSD, compilation fails with a "memmem 
undeclared"
error like it was before

Original comment by dco...@gmail.com on 2 Feb 2009 at 3:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I've found the problem:

You've missed the prototype for memmem() in plugin_list.h

After this, status is Fixed

cheers
-david-

Original comment by dco...@gmail.com on 2 Feb 2009 at 3:51

GoogleCodeExporter commented 8 years ago
Ok give it a try now...

Original comment by kdeko...@gmail.com on 2 Feb 2009 at 3:54

GoogleCodeExporter commented 8 years ago
Ok. You can close this issue.

Original comment by dco...@gmail.com on 2 Feb 2009 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by kdeko...@gmail.com on 2 Feb 2009 at 4:18