summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2013-09-08 16:58:36 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2013-09-08 16:58:36 +0000
commit5d87b6a364da6f092a34d260cccf256b995aa84a (patch)
treec48fbc0452e38e946eebb16f9288d700877d96b1
parent6bf9214f95f357903afbddbed81ab8d94fa565fc (diff)
downloadlibapr-5d87b6a364da6f092a34d260cccf256b995aa84a.tar.gz
merge r1520879 from trunk:
Allow control over the setting of _WINNT_WINNT Default minimum Windows version: 0x0600 (Vista/Windows Server 2008) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1520880 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CMakeLists.txt13
-rw-r--r--README.cmake9
-rw-r--r--include/apr.hwc5
3 files changed, 23 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e6374236..f29685d60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ OPTION(APR_INSTALL_PRIVATE_H "Install selected private .h files (for httpd)" O
OPTION(APR_HAVE_IPV6 "IPv6 support" ON)
OPTION(APR_SHOW_SETTINGS "Show the build configuration" ON)
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF)
+SET(MIN_WINDOWS_VER "Vista"
+ CACHE STRING "Minimum Windows version")
# create 1-or-0 representation of feature tests for apr.h
@@ -32,6 +34,16 @@ IF(APR_HAVE_IPV6)
SET(apr_have_ipv6_10 1)
ENDIF()
+IF("${MIN_WINDOWS_VER}" STREQUAL "")
+ SET(win32_winnt_str "0x0600")
+ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Vista")
+ SET(win32_winnt_str "0x0600")
+ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Windows7")
+ SET(win32_winnt_str "0x0601")
+ELSE()
+ SET(win32_winnt_str ${MIN_WINDOWS_VER})
+ENDIF()
+
CONFIGURE_FILE(include/apr.hwc
${PROJECT_BINARY_DIR}/apr.h)
@@ -312,6 +324,7 @@ IF(APR_SHOW_SETTINGS)
MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
MESSAGE(STATUS " IPv6 ............................ : ${APR_HAVE_IPV6}")
+ MESSAGE(STATUS " Minimum Windows version ......... : ${MIN_WINDOWS_VER}")
MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}")
MESSAGE(STATUS " Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}")
ENDIF(APR_SHOW_SETTINGS)
diff --git a/README.cmake b/README.cmake
index ae271fc89..c52ec224d 100644
--- a/README.cmake
+++ b/README.cmake
@@ -63,6 +63,15 @@ How to build
Default: ON
APR_BUILD_TESTAPR Build APR test suite
Default: OFF
+ MIN_WINDOWS_VER Minimum Windows version supported by this build
+ (This controls the setting of _WIN32_WINNT.)
+ "Vista" or "Windows7" or a numeric value like
+ "0x0601"
+ Default: "Vista"
+ For desktop/server equivalence or other values,
+ refer to
+ http://msdn.microsoft.com/en-us/library/windows/
+ desktop/aa383745(v=vs.85).aspx
CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL
diff --git a/include/apr.hwc b/include/apr.hwc
index a6eb68e3b..057996295 100644
--- a/include/apr.hwc
+++ b/include/apr.hwc
@@ -81,10 +81,7 @@
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINNT
-
-/* Restrict the server to a subset of Windows XP header files by default
- */
-#define _WIN32_WINNT 0x0501
+#define _WIN32_WINNT @win32_winnt_str@
#endif
#ifndef NOUSER
#define NOUSER