You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by iv...@apache.org on 2022/07/10 11:36:15 UTC

svn commit: r1902628 - in /apr/apr/trunk: CMakeLists.txt include/apr.hwc

Author: ivan
Date: Sun Jul 10 11:36:15 2022
New Revision: 1902628

URL: http://svn.apache.org/viewvc?rev=1902628&view=rev
Log:
win32: Move warning settings to CMakeLists.txt compile options instead of
changing them in include/apr.h: otherwise any application the uses APR gets
warning settings from APR.

Modified:
    apr/apr/trunk/CMakeLists.txt
    apr/apr/trunk/include/apr.hwc

Modified: apr/apr/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CMakeLists.txt?rev=1902628&r1=1902627&r2=1902628&view=diff
==============================================================================
--- apr/apr/trunk/CMakeLists.txt (original)
+++ apr/apr/trunk/CMakeLists.txt Sun Jul 10 11:36:15 2022
@@ -484,6 +484,13 @@ SET(install_modules)
 SET(install_bin_pdb)
 SET(dbd_drivers)
 
+IF (MSVC)
+  # Ignore Microsoft's interpretation of secure development
+  # and the POSIX string handling API
+  ADD_COMPILE_DEFINITIONS(_CRT_SECURE_NO_DEPRECATE)
+  STRING(APPEND CMAKE_C_FLAGS " /wd4996")
+ENDIF()
+
 # libapr-2 is shared, apr-2 is static
 ADD_LIBRARY(${apr_libname} SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc)
 LIST(APPEND install_targets ${apr_libname})

Modified: apr/apr/trunk/include/apr.hwc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hwc?rev=1902628&r1=1902627&r2=1902628&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hwc (original)
+++ apr/apr/trunk/include/apr.hwc Sun Jul 10 11:36:15 2022
@@ -63,16 +63,6 @@
 #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
 #endif
 
-/* Ignore Microsoft's interpretation of secure development
- * and the POSIX string handling API
- */
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#ifndef _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_DEPRECATE
-#endif
-#pragma warning(disable: 4996)
-#endif
-
 /**
  * @file apr.h
  * @brief APR Platform Definitions
@@ -724,9 +714,6 @@ typedef  int         gid_t;
  */
 #if defined(_MSC_VER) && _MSC_VER >= 1200
 #pragma warning(pop)
-#if _MSC_VER >= 1400
-#pragma warning(disable: 4996)
-#endif
 #endif
 
 #endif /* APR_H */