apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r386299 - in /apr/apr/branches/0.9.x: CHANGES build/apr_common.m4 build/apr_hints.m4 configure.in
Date Thu, 16 Mar 2006 09:41:54 GMT
Author: jorton
Date: Thu Mar 16 01:41:51 2006
New Revision: 386299

URL: http://svn.apache.org/viewcvs?rev=386299&view=rev
Log:
Merge r64972 from trunk, fixing apr_strerror() with glibc 2.4:

Stop messing around with _FOO_SOURCE things mid-configure: enable
_GNU_SOURCE for glibc-based systems in the platform hints.  (and avoid
jumping through hoops to define _{XOPEN,BSD,SVID}_SOURCE which are all
implied by _GNU_SOURCE anyway)

* build/apr_hints.m4: Define _GNU_SOURCE in CPPFLAGS for GNU/HURD and
GNU/Linux.

* build/apr_common.m4: Remove tricks to get glibc to expose crypt_r.

* configure.in: Remove tricks to get glibc to expose pthread_rwlock_t.

Modified:
    apr/apr/branches/0.9.x/CHANGES
    apr/apr/branches/0.9.x/build/apr_common.m4
    apr/apr/branches/0.9.x/build/apr_hints.m4
    apr/apr/branches/0.9.x/configure.in

Modified: apr/apr/branches/0.9.x/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/CHANGES?rev=386299&r1=386298&r2=386299&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/CHANGES (original)
+++ apr/apr/branches/0.9.x/CHANGES Thu Mar 16 01:41:51 2006
@@ -1,5 +1,7 @@
 Changes with APR 0.9.9
 
+  *) Fix apr_strerror() with glibc 2.4.  [Joe Orton]
+
   *) Install mkdir.sh, make_exports.awk, make_var_export.awk to the APR
      installbuilddir, and provide working accessor variables in
      apr_rules.mk.

Modified: apr/apr/branches/0.9.x/build/apr_common.m4
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/build/apr_common.m4?rev=386299&r1=386298&r2=386299&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/build/apr_common.m4 (original)
+++ apr/apr/branches/0.9.x/build/apr_common.m4 Thu Mar 16 01:41:51 2006
@@ -543,29 +543,14 @@
 ], ac_cv_crypt_r_style=struct_crypt_data)
 fi
 dnl
-if test "$ac_cv_crypt_r_style" = "none"; then
-dnl same as previous test, but see if defining _GNU_SOURCE helps
-AC_TRY_COMPILE([
-#define _GNU_SOURCE
-#include <crypt.h>
-],[
-struct crypt_data buffer;
-crypt_r("passwd", "hash", &buffer);
-], ac_cv_crypt_r_style=struct_crypt_data_gnu_source)
-fi
-dnl
 ])
 if test "$ac_cv_crypt_r_style" = "cryptd"; then
     AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
 fi
 # if we don't combine these conditions, CRYPT_R_STRUCT_CRYPT_DATA
 # will end up defined twice
-if test "$ac_cv_crypt_r_style" = "struct_crypt_data" -o \
-   "$ac_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
+if test "$ac_cv_crypt_r_style" = "struct_crypt_data"; then
     AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
-fi
-if test "$ac_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
-    APR_ADDTO(CPPFLAGS, [-D_GNU_SOURCE])
 fi
 ])
 

Modified: apr/apr/branches/0.9.x/build/apr_hints.m4
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/build/apr_hints.m4?rev=386299&r1=386298&r2=386299&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/build/apr_hints.m4 (original)
+++ apr/apr/branches/0.9.x/build/apr_hints.m4 Thu Mar 16 01:41:51 2006
@@ -110,10 +110,10 @@
 	    * )
 	           ;;
         esac
-	APR_ADDTO(CPPFLAGS, [-D_REENTRANT])
+	APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_GNU_SOURCE])
 	;;
     *-GNU*)
-	APR_ADDTO(CPPFLAGS, [-DHURD])
+	APR_ADDTO(CPPFLAGS, [-DHURD -D_GNU_SOURCE])
 	;;
     *-lynx-lynxos)
 	APR_ADDTO(CPPFLAGS, [-D__NO_INCLUDE_WARN__ -DLYNXOS])

Modified: apr/apr/branches/0.9.x/configure.in
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/configure.in?rev=386299&r1=386298&r2=386299&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/configure.in (original)
+++ apr/apr/branches/0.9.x/configure.in Thu Mar 16 01:41:51 2006
@@ -537,25 +537,13 @@
 
         if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then
             dnl ----------------------------- Checking for pthread_rwlock_t
-            dnl Linux is silly as it has pthread_rwlock_init defined
-            dnl but keeps the pthread_rwlock_t structure hidden unless 
-            dnl special things are defined.
             AC_CACHE_CHECK([for pthread_rwlock_t], [apr_cv_type_rwlock_t],
             AC_TRY_COMPILE([#include <sys/types.h>
 #include <pthread.h>], [pthread_rwlock_t *rwlock;],
-              [apr_cv_type_rwlock_t=yes],
-              [AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
-#define _BSD_SOURCE
-#define _SVID_SOURCE
-#include <sys/types.h>
-#include <pthread.h>], [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;],
-              [apr_cv_type_rwlock_t=yes-with-XOPEN_SOURCE], [apr_cv_type_rwlock_t=no])],
+              [apr_cv_type_rwlock_t=yes], [apr_cv_type_rwlock_t=no], 
               [apr_cv_type_rwlock_t=no]))
-            case $apr_cv_type_rwlock_t in
-            yes*) AC_DEFINE(HAVE_PTHREAD_RWLOCKS, 1, [Define if pthread rwlocks are available])
;;
-            esac
-            if test "$apr_cv_type_rwlock_t" = "yes-with-XOPEN_SOURCE"; then
-               APR_ADDTO(CPPFLAGS, [-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE])
+            if test "$apr_cv_type_rwlock_t" = "yes"; then
+               AC_DEFINE(HAVE_PTHREAD_RWLOCKS, 1, [Define if pthread rwlocks are available])
             fi
         fi
         # this might also require -DXOPEN_SOURCE=500, so leave after the



Mime
View raw message