You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2004/09/05 14:36:38 UTC
cvs commit: xml-security/c/src/transformers TXFMXPath.cpp TXFMXPathFilter.cpp
blautenb 2004/09/05 05:36:38
Modified: c/src configure configure.ac
c/src/framework XSECConfig.hpp.in
c/src/transformers TXFMXPath.cpp TXFMXPathFilter.cpp
Log:
Update to handle new interface for XSLException
Revision Changes Path
1.27 +59 -0 xml-security/c/src/configure
Index: configure
===================================================================
RCS file: /home/cvs/xml-security/c/src/configure,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- configure 14 Jun 2004 04:30:33 -0000 1.26
+++ configure 5 Sep 2004 12:36:37 -0000 1.27
@@ -3913,6 +3913,65 @@
fi
+
+# Check for handling of XSLException types
+if test "$xalan_found" = "yes" ; then
+
+ echo "$as_me:$LINENO: checking XSLException::getType() returns XalanDOMString" >&5
+echo $ECHO_N "checking XSLException::getType() returns XalanDOMString... $ECHO_C" >&6
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <xalanc/PlatformSupport/XSLException.hpp>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ try {
+ int x = 1;
+ }
+ catch (XALAN_CPP_NAMESPACE_QUALIFIER XSLException &e) {
+ e.getType().c_str();
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\_ACEOF
+#define XSEC_XSLEXCEPTION_RETURNS_DOMSTRING 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext;
+
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1.27 +20 -0 xml-security/c/src/configure.ac
Index: configure.ac
===================================================================
RCS file: /home/cvs/xml-security/c/src/configure.ac,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- configure.ac 14 Jun 2004 04:30:33 -0000 1.26
+++ configure.ac 5 Sep 2004 12:36:38 -0000 1.27
@@ -398,6 +398,26 @@
fi
+
+# Check for handling of XSLException types
+if test "$xalan_found" = "yes" ; then
+
+ AC_MSG_CHECKING([XSLException::getType() returns XalanDOMString])
+
+ AC_TRY_COMPILE([#include <xalanc/PlatformSupport/XSLException.hpp>],
+ [ try {
+ int x = 1;
+ }
+ catch (XALAN_CPP_NAMESPACE_QUALIFIER XSLException &e) {
+ e.getType().c_str();
+ }
+ ],
+ AC_DEFINE(XSEC_XSLEXCEPTION_RETURNS_DOMSTRING)
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]);
+
+fi
+
AC_LANG(C)
# Check for OpenSSL
1.9 +10 -0 xml-security/c/src/framework/XSECConfig.hpp.in
Index: XSECConfig.hpp.in
===================================================================
RCS file: /home/cvs/xml-security/c/src/framework/XSECConfig.hpp.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XSECConfig.hpp.in 16 Feb 2004 11:30:02 -0000 1.8
+++ XSECConfig.hpp.in 5 Sep 2004 12:36:38 -0000 1.9
@@ -52,6 +52,16 @@
#undef XSEC_XERCES_REQUIRES_MEMMGR
/*
+ * Find out the idiosyncracies of the version of Xalan we are using
+ */
+
+/* 1.9 and above have XSLException::getType() returns XalanDOMChar *, not
+ XalanDOMString
+*/
+
+#undef XSEC_XSLEXCEPTION_RETURNS_DOMSTRING
+
+/*
* Define presence of cryptographic providers
*/
1.14 +5 -1 xml-security/c/src/transformers/TXFMXPath.cpp
Index: TXFMXPath.cpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXPath.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- TXFMXPath.cpp 7 Mar 2004 03:20:52 -0000 1.13
+++ TXFMXPath.cpp 5 Sep 2004 12:36:38 -0000 1.14
@@ -488,7 +488,11 @@
// Collate the exception message into an XSEC message.
msg.sbTranscodeIn("Xalan Exception : ");
+#if defined (XSEC_XSLEXCEPTION_RETURNS_DOMSTRING)
msg.sbXMLChCat(e.getType().c_str());
+#else
+ msg.sbXMLChCat(e.getType());
+#endif
msg.sbXMLChCat(" caught. Message : ");
msg.sbXMLChCat(e.getMessage().c_str());
1.11 +5 -1 xml-security/c/src/transformers/TXFMXPathFilter.cpp
Index: TXFMXPathFilter.cpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/transformers/TXFMXPathFilter.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TXFMXPathFilter.cpp 2 Aug 2004 11:08:23 -0000 1.10
+++ TXFMXPathFilter.cpp 5 Sep 2004 12:36:38 -0000 1.11
@@ -326,7 +326,11 @@
// Collate the exception message into an XSEC message.
msg.sbTranscodeIn("Xalan Exception : ");
+#if defined (XSEC_XSLEXCEPTION_RETURNS_DOMSTRING)
msg.sbXMLChCat(e.getType().c_str());
+#else
+ msg.sbXMLChCat(e.getType());
+#endif
msg.sbXMLChCat(" caught. Message : ");
msg.sbXMLChCat(e.getMessage().c_str());