[vlc-devel] commit: libxml: ugly fix for plugin re-entrancy - refs #2541 ( Rémi Denis-Courmont )

xxcv xxcv07 at gmail.com
Thu Feb 26 16:56:41 CET 2009


git version control wrote:
> vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Feb 20 18:52:47 2009 +0200| [0fc400924a5bd1165ca78803db8989e377d1abd1] | committer: Rémi Denis-Courmont 
>
> libxml: ugly fix for plugin re-entrancy - refs #2541
>
>   
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fc400924a5bd1165ca78803db8989e377d1abd1
>>     
> ---
>
>  modules/misc/xml/libxml.c |   39 +++++++++++++++++++++++++++++++++++++--
>  1 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
> index 1b25a82..e5de2f1 100644
> --- a/modules/misc/xml/libxml.c
> +++ b/modules/misc/xml/libxml.c
> @@ -67,6 +67,31 @@ static void CatalogLoad( xml_t *, const char * );
>  static void CatalogAdd( xml_t *, const char *, const char *, const char * );
>  static int StreamRead( void *p_context, char *p_buffer, int i_buffer );
>  
> +static unsigned refs = 0;
> +#if defined (LIBVLC_USE_PTHREAD)
> +static vlc_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
> +#elif defined (WIN32)
> +BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
> +{
> +    (void) hinstDll;
> +    (void) lpvReserved;
> +
> +    switch (fdwReason)
> +    {
> +        case DLL_PROCESS_ATTACH:
> +            vlc_mutex_init (&lock);
>   
libxml.c:75: warning: no previous prototype for 'DllMain'
libxml.c: In function `DllMain':
libxml.c:82: error: `lock' undeclared (first use in this function)
libxml.c:82: error: (Each undeclared identifier is reported only once
libxml.c:82: error: for each function it appears in.)
libxml.c: In function `Open':
libxml.c:105: error: `lock' undeclared (first use in this function)
libxml.c: In function `Close':
libxml.c:124: error: `lock' undeclared (first use in this function)
make[7]: *** [libxml_plugin_la-libxml.lo] Error 1

What's lock? You never defined it in 0.9-bugfix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090227/1c6437b0/attachment.html>


More information about the vlc-devel mailing list