[spice-xpi 3/6] Drop support for xulrunner < 1.9.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Even RHEL5 has at least xulrunner 10 these days, so no need to keep that
compat code around.
---
 SpiceXPI/src/plugin/np_entry.cpp |  7 -------
 SpiceXPI/src/plugin/npplat.h     |  6 +-----
 SpiceXPI/src/plugin/plugin.cpp   |  7 -------
 configure.ac                     | 43 +---------------------------------------
 4 files changed, 2 insertions(+), 61 deletions(-)

diff --git a/SpiceXPI/src/plugin/np_entry.cpp b/SpiceXPI/src/plugin/np_entry.cpp
index 7b4d666..949a9df 100644
--- a/SpiceXPI/src/plugin/np_entry.cpp
+++ b/SpiceXPI/src/plugin/np_entry.cpp
@@ -169,17 +169,10 @@ NPError NP_Initialize(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs)
     return NS_PluginInitialize();
 }
 
-#ifdef NPAPI_USE_CONSTCHARS
 const char *NP_GetMIMEDescription()
 {
     return NPP_GetMIMEDescription();
 }
-#else
-char *NP_GetMIMEDescription()
-{
-    return NPP_GetMIMEDescription();
-}
-#endif
 
 NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue)
 {
diff --git a/SpiceXPI/src/plugin/npplat.h b/SpiceXPI/src/plugin/npplat.h
index 2410218..2a131cb 100644
--- a/SpiceXPI/src/plugin/npplat.h
+++ b/SpiceXPI/src/plugin/npplat.h
@@ -45,11 +45,7 @@
 #include "config.h"
 
 #include "npapi.h"
-#ifdef HAVE_XUL191
-#  include "npfunctions.h"
-#else
-#  include "npupp.h"
-#endif
+#include "npfunctions.h"
 
 // For 1.9 compatibility
 // ------------------------------------------------
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index 33765a7..98f2d8f 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -103,17 +103,10 @@ namespace {
     }
 }
 
-#ifdef NPAPI_USE_CONSTCHARS
 const char *NPP_GetMIMEDescription(void)
 {
     return const_cast<char *>(MIME_TYPES_DESCRIPTION.c_str());
 }
-#else
-char *NPP_GetMIMEDescription(void)
-{
-    return strdup(MIME_TYPES_DESCRIPTION.c_str());
-}
-#endif
 
 //////////////////////////////////////
 //
diff --git a/configure.ac b/configure.ac
index 2255531..67e51e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,40 +28,9 @@ PKG_CHECK_MODULES(GLIB, glib-2.0)
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-# The explicit nspr dep is needed because libxul-embedding
-# in RHEL5 is missing the Requires
-PKG_CHECK_MODULES(XUL, libxul-embedding >= 1.9 nspr >= 4.7.1)
+PKG_CHECK_MODULES(XUL, libxul-embedding >= 10)
 AC_SUBST(XUL_CFLAGS)
 AC_SUBST(XUL_LIBS)
-
-# test for const return value of NPP_GetMIMEDescription, based on gecko-mediaplayer
-AC_MSG_CHECKING([for const return value of NPP_GetMIMEDescription])
-oCFLAGS=$CFLAGS
-CFLAGS="$XUL_CFLAGS"
-AC_LANG_PUSH([C])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-#ifndef XP_UNIX
-#define XP_UNIX 1
-#endif
-#include <npapi.h>
-#if NP_VERSION_MAJOR == 0 && NP_VERSION_MINOR < 27
-#error
-#else
-const char*NPP_GetMIMEDescription(void) {
-  return "test";
-}
-#endif
-],[
-const char *f=NPP_GetMIMEDescription();
-])],[
-    AC_MSG_RESULT([yes])
-    AC_DEFINE([NPAPI_USE_CONSTCHARS],[1],[Define if NPAPI declares NPP_GetMIMEDescription as a const char*])
-],[
-    AC_MSG_RESULT([no])
-])
-AC_LANG_POP([C])
-CFLAGS=$oCFLAGS
-
 # Find xpidl
 XPIDL=`pkg-config --variable=libdir libxul`/xpidl
 AM_CONDITIONAL([HAVE_XPIDL], [test -x "$XPIDL"])
@@ -78,16 +47,6 @@ XUL_IDLDIR=`pkg-config --variable=idldir libxul`
 AC_SUBST(XUL_INCLUDEDIR)
 AC_SUBST(XUL_IDLDIR)
 
-dnl libxul 1.9.1 changed header file names
-PKG_CHECK_MODULES(XUL191,
-        libxul >= 1.9.1,
-        have_xul191=yes,
-        have_xul191=no)
-
-if test "x$have_xul191" = "xyes" ; then
-  AC_DEFINE([HAVE_XUL191], [1], [Define if we have libxul >= 1.9.1])
-fi
-
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
 AC_ARG_ENABLE([generator],
-- 
1.8.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]