You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2015/01/30 05:36:29 UTC

svn commit: r1655934 - in /santuario/xml-security-cpp/trunk: ./ xsec/framework/ xsec/tools/checksig/ xsec/tools/cipher/ xsec/tools/templatesign/ xsec/tools/txfmout/

Author: scantor
Date: Fri Jan 30 04:36:29 2015
New Revision: 1655934

URL: http://svn.apache.org/r1655934
Log:
Fix up CWD handling for Windows use.

Modified:
    santuario/xml-security-cpp/trunk/configure.ac
    santuario/xml-security-cpp/trunk/xsec/framework/XSECConfig.hpp.in
    santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp
    santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp
    santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp
    santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp
    santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp

Modified: santuario/xml-security-cpp/trunk/configure.ac
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/configure.ac?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/configure.ac (original)
+++ santuario/xml-security-cpp/trunk/configure.ac Fri Jan 30 04:36:29 2015
@@ -80,7 +80,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([#include
 [char *cwd = getcwd(NULL, 0);
 return (cwd != NULL) ? EXIT_SUCCESS : EXIT_FAILURE;])],
      [AC_MSG_RESULT(yes)
-      AC_DEFINE([HAVE_GETCWD_DYN], [1],
+      AC_DEFINE([XSEC_HAVE_GETCWD_DYN], [1],
          [Define to 1 if getcwd(NULL, 0) works])],
      [AC_MSG_RESULT(no)])
 

Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECConfig.hpp.in
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECConfig.hpp.in?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECConfig.hpp.in (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECConfig.hpp.in Fri Jan 30 04:36:29 2015
@@ -9,6 +9,9 @@
 /* Define to 1 if strcasecmp present. */
 #undef XSEC_HAVE_STRCASECMP
 
+/* Define to 1 if getcwd(NULL, 0) works. */
+#undef XSEC_HAVE_GETCWD_DYN
+
 /* Define to 1 if Xalan is unavailable. */
 #undef XSEC_NO_XALAN
 

Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp Fri Jan 30 04:36:29 2015
@@ -211,4 +211,7 @@
 /* Windows direct.h */
 #define HAVE_DIRECT_H 1
 
+/* Define to 1 if getcwd(NULL, 0) works. */
+#define XSEC_HAVE_GETCWD_DYN 1
+
 #include <xsec/framework/XSECVersion.hpp>

Modified: santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/checksig/checksig.cpp Fri Jan 30 04:36:29 2015
@@ -437,7 +437,7 @@ int evaluate(int argc, char ** argv) {
 		AnonymousResolver theAnonymousResolver;
 		     
 		// Map out base path of the file
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 		char *path = getcwd(NULL, 0);
 		char *baseURI = (char*)malloc(strlen(path) + 8 + 1 + strlen(filename) + 1);
 #else
@@ -474,7 +474,7 @@ int evaluate(int argc, char ** argv) {
 		XMLCh * baseURIXMLCh = XMLString::transcode(baseURI);
 
 		XMLUri uri(MAKE_UNICODE_STRING(baseURI));
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 		free(path);
 		free(baseURI);
 #endif

Modified: santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/cipher/cipher.cpp Fri Jan 30 04:36:29 2015
@@ -638,7 +638,7 @@ int evaluate(int argc, char ** argv) {
 			if (useInteropResolver == true) {
 
 				// Map out base path of the file
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 				char *path = getcwd(NULL, 0);
 				char *baseURI = (char*)malloc(strlen(path) + 8 + 1 + strlen(filename) + 1);
 #else
@@ -674,7 +674,7 @@ int evaluate(int argc, char ** argv) {
 				baseURI[lastSlash + 1] = '\0';
 
 				XMLCh * uriT = XMLString::transcode(baseURI);
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 				free(path);
 				free(baseURI);
 #endif

Modified: santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/templatesign/templatesign.cpp Fri Jan 30 04:36:29 2015
@@ -1168,7 +1168,7 @@ int main(int argc, char **argv) {
      
 	// Map out base path of the file
 	char * filename=argv[argc-1];
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 	char *path = getcwd(NULL, 0);
 	char *baseURI = (char*)malloc(strlen(path) + 8 + 1 + strlen(filename) + 1);
 #else
@@ -1205,7 +1205,7 @@ int main(int argc, char **argv) {
 
 	theResolver->setBaseURI(MAKE_UNICODE_STRING(baseURI));
 	sig->setURIResolver(theResolver);
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 	free(path);
 	free(baseURI);
 #endif

Modified: santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp?rev=1655934&r1=1655933&r2=1655934&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/txfmout/txfmout.cpp Fri Jan 30 04:36:29 2015
@@ -501,7 +501,7 @@ int main(int argc, char **argv) {
 		theResolver;
 		 
 	// Map out base path of the file
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 	char *path = getcwd(NULL, 0);
 	char *baseURI = (char*)malloc(strlen(path) + 8 + 1 + strlen(filename) + 1);
 #else
@@ -529,7 +529,7 @@ int main(int argc, char **argv) {
 	baseURI[lastSlash + 1] = '\0';
 
 	theResolver.setBaseURI(MAKE_UNICODE_STRING(baseURI));
-#if HAVE_GETCWD_DYN
+#if XSEC_HAVE_GETCWD_DYN
 	free(path);
 	free(baseURI);
 #endif