apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1083242 - in /apr/apr/trunk: build/apr_hints.m4 configure.in include/apr.h.in
Date Sat, 19 Mar 2011 18:06:25 GMT
Author: trawick
Date: Sat Mar 19 18:06:24 2011
New Revision: 1083242

URL: http://svn.apache.org/viewvc?rev=1083242&view=rev
Log:
MinGW improvements:
* fix settings of APR_HAS_USER, APR_HAS_XTHREAD_FILES, APR_THREAD_FUNC, and
  APR_PROCATTR_USER_SET_REQUIRES_PASSOWRD
* stop setting optimization level back to -O0, which isn't needed any more
* bypass autodetection of O_NONBLOCK, TCP_NODELAY, and OS uuid suppot

also, change the defaulting of have_unicode_fs to use the APR macro

PR: 46175 (this is a moderate part of the patch)
Submitted by: Carlo Bramini
Reviewed/tweaked by: trawick

Modified:
    apr/apr/trunk/build/apr_hints.m4
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apr.h.in

Modified: apr/apr/trunk/build/apr_hints.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_hints.m4?rev=1083242&r1=1083241&r2=1083242&view=diff
==============================================================================
--- apr/apr/trunk/build/apr_hints.m4 (original)
+++ apr/apr/trunk/build/apr_hints.m4 Sat Mar 19 18:06:24 2011
@@ -442,24 +442,29 @@ dnl	       # Not a problem in 10.20.  Ot
 	APR_ADDTO(CPPFLAGS, [-DCYGWIN])
 	;;
     *mingw*)
-	dnl gcc (3.4.2 at least) seems to mis-optimize at levels greater than
-	dnl -O0 producing link-time errors.  The user can override by
-	dnl explicitly passing a CFLAGS value to configure.
-	dnl 
-	dnl Example error messages:
-	dnl undefined reference to 'libmsvcrt_a_iname'
-	dnl undefined reference to '_nm___pctype'
-	if test "$ac_test_CFLAGS" != set; then
-		APR_REMOVEFROM(CFLAGS,-O2)
-		APR_ADDTO(CFLAGS,-O0)
-	fi
 	APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
 	APR_SETIFNULL(apr_lock_method, [win32])
 	APR_SETIFNULL(apr_process_lock_is_global, [yes])
 	APR_SETIFNULL(have_unicode_fs, [1])
 	APR_SETIFNULL(have_proc_invoked, [1])
 	APR_SETIFNULL(apr_cv_use_lfs64, [yes])
-	;;
+        APR_SETIFNULL(apr_cv_osuuid, [yes])
+        APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
+        APR_SETIFNULL(ac_cv_tcp_nodelay_inherited, [yes])
+        APR_SETIFNULL(apr_thread_func, [__stdcall])
+        case $host in
+            *mingw32*)
+                APR_SETIFNULL(apr_has_xthread_files, [1])
+                APR_SETIFNULL(apr_has_user, [1])
+                APR_SETIFNULL(apr_procattr_user_set_requires_password, [1])
+                ;;
+            *mingwce)
+                APR_SETIFNULL(apr_has_xthread_files, [0])
+                APR_SETIFNULL(apr_has_user, [0])
+                APR_SETIFNULL(apr_procattr_user_set_requires_password, [0])
+                ;;
+        esac
+        ;;
   esac
 
 fi

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=1083242&r1=1083241&r2=1083242&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Sat Mar 19 18:06:24 2011
@@ -2558,13 +2558,23 @@ dnl Check for langinfo support
 AC_CHECK_HEADERS(langinfo.h)
 AC_CHECK_FUNCS(nl_langinfo)
 
+dnl ------------------------------ Defaults for some platform nuances
+
 dnl Do we have a Win32-centric Unicode FS?
+APR_SETIFNULL(have_unicode_fs, [0])
+AC_SUBST(have_unicode_fs)
 
-if test -z "$have_unicode_fs"; then
-  have_unicode_fs="0"
-fi
+APR_SETIFNULL(apr_has_xthread_files, [0])
+AC_SUBST(apr_has_xthread_files)
 
-AC_SUBST(have_unicode_fs)
+APR_SETIFNULL(apr_procattr_user_set_requires_password, [0])
+AC_SUBST(apr_procattr_user_set_requires_password)
+
+APR_SETIFNULL(apr_thread_func, [])
+AC_SUBST(apr_thread_func)
+
+APR_SETIFNULL(apr_has_user, [1])
+AC_SUBST(apr_has_user)
 
 dnl ------------------------------ APR-util stuff 
 

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=1083242&r1=1083241&r2=1083242&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Sat Mar 19 18:06:24 2011
@@ -293,12 +293,12 @@ extern "C" {
 #define APR_HAS_SO_ACCEPTFILTER   @acceptfilter@
 #define APR_HAS_UNICODE_FS        @have_unicode_fs@
 #define APR_HAS_PROC_INVOKED      @have_proc_invoked@
-#define APR_HAS_USER              1
+#define APR_HAS_USER              @apr_has_user@
 #define APR_HAS_LARGE_FILES       @aprlfs@
-#define APR_HAS_XTHREAD_FILES     0
+#define APR_HAS_XTHREAD_FILES     @apr_has_xthread_files@
 #define APR_HAS_OS_UUID           @osuuid@
 
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
 
 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  * to poll on files/pipes.
@@ -469,7 +469,7 @@ typedef  apr_uint32_t            apr_uin
  *
  * </PRE>
  */
-#define APR_THREAD_FUNC
+#define APR_THREAD_FUNC       @apr_thread_func@
 
 /**
  * The public APR functions are declared with APR_DECLARE(), so they may



Mime
View raw message