Commit a9aa594f authored by Rafaël Carré's avatar Rafaël Carré

Handle NPP_GetMIMEDescription having different return types

parent b002d8ab
...@@ -195,6 +195,26 @@ AC_CHECK_HEADERS(npruntime.h, [ ...@@ -195,6 +195,26 @@ AC_CHECK_HEADERS(npruntime.h, [
] ]
) )
AC_MSG_CHECKING([if NPP_GetMIMEDescription() returns const])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#ifdef WIN32
# define XP_WIN 1
#else
# ifdef __APPLE__
# define XP_MACOSX 1
# endif
# define XP_UNIX 1
#endif
#include <npapi.h>
const char *NPP_GetMIMEDescription(void);
])],[
AC_MSG_RESULT(yes)
AC_DEFINE(NPP_GET_MIME_CONST, [const], [Wether NPP_GetMIMEDescription returns const])
],[
AC_MSG_RESULT(no)
AC_DEFINE(NPP_GET_MIME_CONST, [], [Wether NPP_GetMIMEDescription returns const])
])
AC_LANG_POP(C++) AC_LANG_POP(C++)
......
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
#include "config.h" #ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#define XP_UNIX 1 #define XP_UNIX 1
...@@ -767,8 +769,7 @@ Private_GetJavaClass(void) ...@@ -767,8 +769,7 @@ Private_GetJavaClass(void)
* - Netscape uses the return value to identify when an object instance * - Netscape uses the return value to identify when an object instance
* of this plugin should be created. * of this plugin should be created.
*/ */
const char * NPP_GET_MIME_CONST char * NP_GetMIMEDescription(void)
NP_GetMIMEDescription(void)
{ {
return NPP_GetMIMEDescription(); return NPP_GetMIMEDescription();
} }
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
//#define OJI 1 //#define OJI 1
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "../vlcplugin.h" #include "../vlcplugin.h"
#ifndef _NPAPI_H_ #ifndef _NPAPI_H_
...@@ -182,7 +186,7 @@ NP_Shutdown() ...@@ -182,7 +186,7 @@ NP_Shutdown()
return NPERR_NO_ERROR; return NPERR_NO_ERROR;
} }
const char * NP_GetMIMEDescription() NPP_GET_MIME_CONST char * NP_GetMIMEDescription()
{ {
return NPP_GetMIMEDescription(); return NPP_GetMIMEDescription();
} }
......
...@@ -25,6 +25,11 @@ ...@@ -25,6 +25,11 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -64,7 +69,7 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa ...@@ -64,7 +69,7 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
/****************************************************************************** /******************************************************************************
* UNIX-only API calls * UNIX-only API calls
*****************************************************************************/ *****************************************************************************/
const char * NPP_GetMIMEDescription( void ) NPP_GET_MIME_CONST char * NPP_GetMIMEDescription( void )
{ {
return mimetype; return mimetype;
} }
......
...@@ -24,7 +24,11 @@ ...@@ -24,7 +24,11 @@
#ifndef __VLCSHELL_H__ #ifndef __VLCSHELL_H__
#define __VLCSHELL_H__ #define __VLCSHELL_H__
const char * NPP_GetMIMEDescription( void ); #ifdef HAVE_CONFIG_H
# include "config.h"
#endif
NPP_GET_MIME_CONST char * NPP_GetMIMEDescription( void );
NPError NPP_Initialize( void ); NPError NPP_Initialize( void );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment