You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by fu...@apache.org on 2011/03/29 17:25:00 UTC

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

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>



Re: 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

Posted by Guenter Knauf <fu...@apache.org>.
Am 11.04.2011 19:33, schrieb Jeff Trawick:
> most of this commit helps in that way, but there's a tiny amount which
> diverges (more like trunk apr.hw than branches/* apr.hw)...  I'll
> address that shortly with some additional sync; just don't be
> surprised ;)
naaa ... :-)
and sorry I didnt pay enough attention to apr.hw in branches ...

Gün.




Re: 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

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Mar 29, 2011 at 11:25 AM,  <fu...@apache.org> wrote:
> 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).

the right way to go here for Windows gunk is to match apr.hw in the
same branch if at all possible

most of this commit helps in that way, but there's a tiny amount which
diverges (more like trunk apr.hw than branches/* apr.hw)...  I'll
address that shortly with some additional sync; just don't be
surprised ;)