You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Jerris, Michael MI" <mj...@ofllc.com> on 2005/11/24 02:40:57 UTC

[PATCH] fix deprecation warnings on MSVC 8 (.net 2005)

Microsoft in all it's wizdom has decided to deprecate many of the string
related functions in the newest version of it's compiler.  The following
simple patch gets rid of these warnings.  Inclusion is much appretiated.

Thanks
Mike


diff -ur apr-1.2.2/include/apr.hw apr/include/apr.hw
--- apr-1.2.2/include/apr.hw	2005-06-14 10:11:16.000000000 -0400
+++ apr/include/apr.hw	2005-11-23 19:59:23.951268800 -0500
@@ -42,6 +42,17 @@
  */
 #if defined(_MSC_VER) && _MSC_VER >= 1200
 #pragma warning(push, 3)
+
+#if (_MSC_VER >= 1400) 
+/* Turn off warnings about the newly deprecated CRT functions. */
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+#ifndef _CRT_NONSTDC_NO_DEPRECATE
+#define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+#endif 
+
 #endif
 
 /* disable or reduce the frequency of...