apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1086625 - in /apr/apr/branches: 1.3.x/include/apr.h.in 1.4.x/include/apr.h.in 1.5.x/include/apr.h.in
Date Tue, 29 Mar 2011 15:25:00 GMT
Author: fuankg
Date: Tue Mar 29 15:25:00 2011
New Revision: 1086625

URL: http://svn.apache.org/viewvc?rev=1086625&view=rev
Log:
Backport Windows apr.h.in stuff from HEAD (r892148).

Modified:
    apr/apr/branches/1.3.x/include/apr.h.in
    apr/apr/branches/1.4.x/include/apr.h.in
    apr/apr/branches/1.5.x/include/apr.h.in

Modified: apr/apr/branches/1.3.x/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/include/apr.h.in?rev=1086625&r1=1086624&r2=1086625&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/include/apr.h.in (original)
+++ apr/apr/branches/1.3.x/include/apr.h.in Tue Mar 29 15:25:00 2011
@@ -117,8 +117,39 @@
  */
 
 #if APR_HAVE_WINDOWS_H
-#include <windows.h>
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
+#ifndef _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef NOUSER
+#define NOUSER
+#endif
+#ifndef NOMCX
+#define NOMCX
 #endif
+#ifndef NOIME
+#define NOIME
+#endif
+
+/* 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>
+#endif /* ndef _WINDOWS_ */
+#endif /* APR_HAVE_WINDOWS_H */
 
 #if APR_HAVE_WINSOCK2_H
 #include <winsock2.h>

Modified: apr/apr/branches/1.4.x/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/apr.h.in?rev=1086625&r1=1086624&r2=1086625&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/apr.h.in (original)
+++ apr/apr/branches/1.4.x/include/apr.h.in Tue Mar 29 15:25:00 2011
@@ -117,8 +117,39 @@
  */
 
 #if APR_HAVE_WINDOWS_H
-#include <windows.h>
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
+#ifndef _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef NOUSER
+#define NOUSER
+#endif
+#ifndef NOMCX
+#define NOMCX
 #endif
+#ifndef NOIME
+#define NOIME
+#endif
+
+/* 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>
+#endif /* ndef _WINDOWS_ */
+#endif /* APR_HAVE_WINDOWS_H */
 
 #if APR_HAVE_WINSOCK2_H
 #include <winsock2.h>

Modified: apr/apr/branches/1.5.x/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/include/apr.h.in?rev=1086625&r1=1086624&r2=1086625&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/include/apr.h.in (original)
+++ apr/apr/branches/1.5.x/include/apr.h.in Tue Mar 29 15:25:00 2011
@@ -117,8 +117,39 @@
  */
 
 #if APR_HAVE_WINDOWS_H
-#include <windows.h>
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
+#ifndef _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef NOUSER
+#define NOUSER
+#endif
+#ifndef NOMCX
+#define NOMCX
 #endif
+#ifndef NOIME
+#define NOIME
+#endif
+
+/* 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>
+#endif /* ndef _WINDOWS_ */
+#endif /* APR_HAVE_WINDOWS_H */
 
 #if APR_HAVE_WINSOCK2_H
 #include <winsock2.h>



Mime
View raw message