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 2006/03/31 13:43:59 UTC
svn commit: r390395 - in /xml/security/trunk/c/src: configure configure.ac
framework/XSECConfig.hpp.in framework/XSECDefs.hpp
Author: blautenb
Date: Fri Mar 31 03:43:55 2006
New Revision: 390395
URL: http://svn.apache.org/viewcvs?rev=390395&view=rev
Log:
Fix the things that broke under Linux from fixes for VC++ 2005
Modified:
xml/security/trunk/c/src/configure
xml/security/trunk/c/src/configure.ac
xml/security/trunk/c/src/framework/XSECConfig.hpp.in
xml/security/trunk/c/src/framework/XSECDefs.hpp
Modified: xml/security/trunk/c/src/configure
URL: http://svn.apache.org/viewcvs/xml/security/trunk/c/src/configure?rev=390395&r1=390394&r2=390395&view=diff
==============================================================================
--- xml/security/trunk/c/src/configure (original)
+++ xml/security/trunk/c/src/configure Fri Mar 31 03:43:55 2006
@@ -3961,6 +3961,12 @@
+# Ensure we are always compiling using library defs
+
+CFLAGS="${CFLAGS} -DXSEC_LIBRARY_BUILD"
+CXXFLAGS="${CXXFLAGS} -DXSEC_LIBRARY_BUILD"
+
+
# Platform-specific Makefile setup
# We have put most of the platform specific configuration here rather than
# in the Makefile. Autoconf is designed with platform portability in mind,
@@ -5467,6 +5473,199 @@
echo "${ECHO_T}no" >&6
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+# String functions
+echo "$as_me:$LINENO: checking whether _strdup is declared" >&5
+echo $ECHO_N "checking whether _strdup is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl__strdup+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+#ifndef _strdup
+ char *p = (char *) _strdup;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ ac_cv_have_decl__strdup=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl__strdup=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl__strdup" >&5
+echo "${ECHO_T}$ac_cv_have_decl__strdup" >&6
+if test $ac_cv_have_decl__strdup = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define XSEC_HAVE__STRDUP 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether _stricmp is declared" >&5
+echo $ECHO_N "checking whether _stricmp is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl__stricmp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+#ifndef _stricmp
+ char *p = (char *) _stricmp;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ ac_cv_have_decl__stricmp=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl__stricmp=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl__stricmp" >&5
+echo "${ECHO_T}$ac_cv_have_decl__stricmp" >&6
+if test $ac_cv_have_decl__stricmp = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define XSEC_HAVE__STRDUP 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether _getcwd is declared" >&5
+echo $ECHO_N "checking whether _getcwd is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl__getcwd+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+#ifndef _getcwd
+ char *p = (char *) _getcwd;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ ac_cv_have_decl__getcwd=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl__getcwd=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl__getcwd" >&5
+echo "${ECHO_T}$ac_cv_have_decl__getcwd" >&6
+if test $ac_cv_have_decl__getcwd = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define XSEC_HAVE__GETCWD 1
+_ACEOF
+
+fi
+
# Build the object file lists necessary to link the library
# At the same time, build the include list
Modified: xml/security/trunk/c/src/configure.ac
URL: http://svn.apache.org/viewcvs/xml/security/trunk/c/src/configure.ac?rev=390395&r1=390394&r2=390395&view=diff
==============================================================================
--- xml/security/trunk/c/src/configure.ac (original)
+++ xml/security/trunk/c/src/configure.ac Fri Mar 31 03:43:55 2006
@@ -145,6 +145,12 @@
AC_CANONICAL_HOST
+# Ensure we are always compiling using library defs
+
+CFLAGS="${CFLAGS} -DXSEC_LIBRARY_BUILD"
+CXXFLAGS="${CXXFLAGS} -DXSEC_LIBRARY_BUILD"
+
+
# Platform-specific Makefile setup
# We have put most of the platform specific configuration here rather than
# in the Makefile. Autoconf is designed with platform portability in mind,
@@ -679,6 +685,19 @@
[AC_MSG_RESULT([yes])]
[AC_DEFINE(XSEC_OPENSSL_D2IX509_CONST_BUFFER)],
[AC_MSG_RESULT([no])])
+
+# String functions
+AC_CHECK_DECL(_strdup,
+ [AC_DEFINE(XSEC_HAVE__STRDUP)],
+ ,[#include <string.h>])
+
+AC_CHECK_DECL(_stricmp,
+ [AC_DEFINE(XSEC_HAVE__STRDUP)],
+ ,[#include <string.h>])
+
+AC_CHECK_DECL(_getcwd,
+ [AC_DEFINE(XSEC_HAVE__GETCWD)],
+ ,[#include <string.h>])
# Build the object file lists necessary to link the library
# At the same time, build the include list
Modified: xml/security/trunk/c/src/framework/XSECConfig.hpp.in
URL: http://svn.apache.org/viewcvs/xml/security/trunk/c/src/framework/XSECConfig.hpp.in?rev=390395&r1=390394&r2=390395&view=diff
==============================================================================
--- xml/security/trunk/c/src/framework/XSECConfig.hpp.in (original)
+++ xml/security/trunk/c/src/framework/XSECConfig.hpp.in Fri Mar 31 03:43:55 2006
@@ -104,6 +104,16 @@
#undef XSEC_OPENSSL_HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
/*
+ * Some string functions (mainly to get past microsoft warning
+ * messages
+ */
+
+/* Do we have _strdup(const char *) - probably not, but... */
+
+#undef XSEC_HAVE__STRDUP
+#undef XSEC_HAVE__STRICMP
+
+/*
* Macros used to determine what header files exist on this
* system
*/
Modified: xml/security/trunk/c/src/framework/XSECDefs.hpp
URL: http://svn.apache.org/viewcvs/xml/security/trunk/c/src/framework/XSECDefs.hpp?rev=390395&r1=390394&r2=390395&view=diff
==============================================================================
--- xml/security/trunk/c/src/framework/XSECDefs.hpp (original)
+++ xml/security/trunk/c/src/framework/XSECDefs.hpp Fri Mar 31 03:43:55 2006
@@ -145,4 +145,27 @@
#endif
+
+/*
+ * The following definitions are *only* made if we are
+ * building library code to make sure we don't interfere
+ * with the way apps are doing things
+ */
+
+#ifdef XSEC_LIBRARY_BUILD
+
+# ifndef XSEC_HAVE__STRDUP
+# define _strdup(x) strdup(x)
+# endif
+
+# ifndef XSEC_HAVE__STRICMP
+# define _stricmp(x,y) stricmp(x,y)
+# endif
+
+# ifndef XSEC_HAVE__GETCWD
+# define _getcwd(x,y) getcwd(x,y)
+# endif
+
+#endif
+
#endif /* XSECDEFS_HEADER */