summaryrefslogtreecommitdiff
path: root/include/apr.h.in
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2020-09-03 19:44:33 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2020-09-03 19:44:33 +0000
commit6d3091f16629fba3d77dfe5a40d630f21e366a9b (patch)
tree8e3dde0d6dae021f30d993fc714724f94fabe227 /include/apr.h.in
parent61ea107da054d59c0938471ff6a0f571c70f2c2e (diff)
downloadapr-6d3091f16629fba3d77dfe5a40d630f21e366a9b.tar.gz
Clean up _WIN32_WINNT
- Fix _WIN32_WINNT for Windows.h to provide all type declarations, function prototypes and others from Windows 10 / Windows Server 2019. NOTE: This has nothing whatsoever to do with which functions APR chooses to use, chooses to load a runtime (apr_arch_misc.h) or which minimum version of Windows APR will require. - New in Windows 10/Server 2019 are case sensitive directory trees. The patch normalizes the case of the relevant Windows header file names in #include statements to the files shipping in the SDK's. - drops inaccurately mapped CMake flag MIN_WINDOWS_VER from apr 2.0 branch, which never not a feature toggle to APR itself. - drops winsock.h entirely. WINDOWS_WCE is ended entirely 2 years ago, and a later commit to trunk should remove WCE toggles throught the sources. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1881421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr.h.in')
-rw-r--r--include/apr.h.in28
1 files changed, 12 insertions, 16 deletions
diff --git a/include/apr.h.in b/include/apr.h.in
index 05574f466..9f31d6fa8 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -122,19 +122,21 @@
*/
#if APR_HAVE_WINDOWS_H && defined(WIN32)
-/* If windows.h was already included, our preferences don't matter.
- * If not, include a restricted set of windows headers to our tastes.
+/* Has Windows.h already been included? If so, our preferences don't matter,
+ * but we will still need the winsock things no matter what was included.
+ * If not, include a restricted set of Windows headers to our tastes.
+ * Note: _WIN32_WINNT is not an APR toggle, and should be set to the current API
+ * level; it is not a minimum, it is a maximum. Newly added functions to Win32
+ * are maintained in apr_arch_misc.h for runtime (not build time) determination.
*/
#ifndef _WINDOWS_
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
-
#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
+#define _WIN32_WINNT 0x0A00
#endif
-
#ifndef NOUSER
#define NOUSER
#endif
@@ -145,32 +147,26 @@
#define NOIME
#endif
-/* Impossible to include winsock2.h after winsock.h, while windows.h
+/* Impossible to include WinSock2.h after winsock.h, while Windows.h
* attempts to load winsock. Setting _WINSOCKAPI_ will dodge this.
*/
#if APR_HAVE_WINSOCK2_H
#define _WINSOCKAPI_
#endif
-#include <windows.h>
+#include <Windows.h>
#endif /* ndef _WINDOWS_ */
#endif /* APR_HAVE_WINDOWS_H */
#if APR_HAVE_WINSOCK2_H
-#include <winsock2.h>
+#include <WinSock2.h>
#if APR_HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
+#include <WS2tcpip.h>
#endif
#if APR_HAVE_MSWSOCK_H
-#include <mswsock.h>
-#endif
-
-#else /* !APR_HAVE_WINSOCK2_H */
-
-#if APR_HAVE_WINSOCK_H
-#include <winsock.h>
+#include <MSWSock.h>
#endif
#endif /* !APR_HAVE_WINSOCK2_H */