From: Wouter Wijngaards Date: Tue, 27 Oct 2015 10:22:05 +0000 (+0000) Subject: - detect libexpat without xml_StopParser function. X-Git-Tag: release-1.5.7rc1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=374ee84b27b34f41b9a9f5f94220f7f59abf7640;p=thirdparty%2Funbound.git - detect libexpat without xml_StopParser function. git-svn-id: file:///svn/unbound/trunk@3515 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/config.h.in b/config.h.in index cf39a6304..5eb81c79d 100644 --- a/config.h.in +++ b/config.h.in @@ -94,6 +94,10 @@ don't. */ #undef HAVE_DECL_STRLCPY +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if + you don't. */ +#undef HAVE_DECL_XML_STOPPARSER + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff --git a/configure b/configure index a3c928853..1e729af42 100755 --- a/configure +++ b/configure @@ -17645,6 +17645,20 @@ fi done +ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default +#include + +" +if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_XML_STOPPARSER $ac_have_decl +_ACEOF + # set static linking if requested diff --git a/configure.ac b/configure.ac index 9bcde305f..17036184e 100644 --- a/configure.ac +++ b/configure.ac @@ -883,6 +883,9 @@ if test x_$found_libexpat != x_yes; then AC_ERROR([Could not find libexpat, expat.h]) fi AC_CHECK_HEADERS([expat.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_DECLS([XML_StopParser], [], [], [AC_INCLUDES_DEFAULT +#include +]) # set static linking if requested AC_SUBST(staticexe) diff --git a/doc/Changelog b/doc/Changelog index 4e99ba6ff..5ceb415eb 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 27 October 2015: Wouter - isblank() compat implementation. + - detect libexpat without xml_StopParser function. 23 October 2015: Wouter - Fix #714: Document config to block private-address for IPv4 diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 261c492c1..e1b6d2b79 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -1520,7 +1520,11 @@ xml_entitydeclhandler(void *userData, const XML_Char *ATTR_UNUSED(publicId), const XML_Char *ATTR_UNUSED(notationName)) { +#ifdef HAVE_DECL_XML_STOPPARSER (void)XML_StopParser((XML_Parser)userData, XML_FALSE); +#else + (void)userData; +#endif } /**