apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r421063 - in /apr/apr/trunk: configure.in include/apr.h.in
Date Wed, 12 Jul 2006 01:07:41 GMT
Author: jerenkrantz
Date: Tue Jul 11 18:07:40 2006
New Revision: 421063

URL: http://svn.apache.org/viewvc?rev=421063&view=rev
Log:
Set up apr.h and apr_private.h so that mingw can compile.

Originally titled: [patch 05/17] win32api support

Inspired by: John Mark Vandenberg

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apr.h.in

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=421063&r1=421062&r2=421063&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Tue Jul 11 18:07:40 2006
@@ -1053,6 +1053,8 @@
     tpfio.h		\
     unistd.h		\
     unix.h		\
+    windows.h		\
+    winsock2.h		\
     arpa/inet.h		\
     kernel/OS.h		\
     net/errno.h		\
@@ -1131,6 +1133,8 @@
 AC_SUBST(sys_waith)
 AC_SUBST(pthreadh)
 AC_SUBST(semaphoreh)
+AC_SUBST(windowsh)
+AC_SUBST(winsock2h)
 
 # Checking for h_errno in <netdb.h>
 if test "$netdbh" = "1"; then
@@ -2160,6 +2164,15 @@
   rm -f $i.save
 done
 chmod +x apr-$APR_MAJOR_VERSION-config
+# for mingw builds, we currently won't allow the unix apr_private.h to exist.
+# instead, we will rely on the manually-crafted win32 apr_private.h instead.
+case $APR_PLATFORM in
+    *-mingw*)
+        rm include/arch/unix/apr_private.h
+        ;;
+    *)
+        ;;
+esac
 ],[
 dnl This section is expanded by configure UNQUOTED so variable 
 dnl references must be backslash-escaped as necessary.
@@ -2167,6 +2180,7 @@
 # Commands run at the beginning of config.status:
 APR_SAVE_HEADERS="include/apr.h include/arch/unix/apr_private.h"
 APR_MAJOR_VERSION=$APR_MAJOR_VERSION
+APR_PLATFORM=$host
 
 for apri in \${APR_SAVE_HEADERS}; do
   test -r \${apri} && mv \${apri} \${apri}.save

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=421063&r1=421062&r2=421063&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Tue Jul 11 18:07:40 2006
@@ -102,12 +102,22 @@
 #define APR_HAVE_SYS_WAIT_H      @sys_waith@
 #define APR_HAVE_TIME_H          @timeh@
 #define APR_HAVE_UNISTD_H        @unistdh@
+#define APR_HAVE_WINDOWS_H       @windowsh@
+#define APR_HAVE_WINSOCK2_H      @winsock2h@
 
 /** @} */
 
 /* We don't include our conditional headers within the doxyblocks 
  * or the extern "C" namespace 
  */
+
+#if APR_HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if APR_HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
 
 #if APR_HAVE_SYS_TYPES_H
 #include <sys/types.h>



Mime
View raw message