]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- detect libexpat without xml_StopParser function.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 27 Oct 2015 10:22:05 +0000 (10:22 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 27 Oct 2015 10:22:05 +0000 (10:22 +0000)
git-svn-id: file:///svn/unbound/trunk@3515 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
doc/Changelog
smallapp/unbound-anchor.c

index cf39a63041e7a4ec798cdf246516ccaae28a30db..5eb81c79d0b275482dbee6c0dfda523a04f539ba 100644 (file)
    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 <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
index a3c928853c88efaa62704b39fd52b6eac651bca2..1e729af42035b25559ac7dadfdcdf1cddf964c2f 100755 (executable)
--- a/configure
+++ b/configure
 
 done
 
+ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
+#include <expat.h>
+
+"
+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
 
index 9bcde305fc5c8185dd78419f4034b49ff82300e4..17036184e0396e1cdd615b590957a54eac61e99d 100644 (file)
@@ -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 <expat.h>
+])
 
 # set static linking if requested
 AC_SUBST(staticexe)
index 4e99ba6ff70e3279db9a1d0bf607ca0b1a6b8be2..5ceb415eb9e276e67b0099c49949981fde4aa755 100644 (file)
@@ -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
index 261c492c15d0de0a30bc28c21712a5925667842f..e1b6d2b792dbd3e14a7d338a17666a6484541c72 100644 (file)
@@ -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
 }
 
 /**