You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/03/13 01:32:44 UTC
cvs commit: apr/build apr_common.m4 apr_hints.m4
jorton 2004/03/12 16:32:44
Modified: . configure.in
build apr_common.m4 apr_hints.m4
Log:
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.
Revision Changes Path
1.574 +3 -15 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.573
retrieving revision 1.574
diff -w -d -u -r1.573 -r1.574
--- configure.in 12 Mar 2004 23:23:43 -0000 1.573
+++ configure.in 13 Mar 2004 00:32:43 -0000 1.574
@@ -526,25 +526,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=PTHREAD_RWLOCK_INITIALIZER;],
- [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
fi
1.59 +1 -16 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.58
retrieving revision 1.59
diff -w -d -u -r1.58 -r1.59
--- apr_common.m4 5 Feb 2004 21:18:04 -0000 1.58
+++ apr_common.m4 13 Mar 2004 00:32:43 -0000 1.59
@@ -546,29 +546,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
])
1.60 +2 -2 apr/build/apr_hints.m4
Index: apr_hints.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_hints.m4,v
retrieving revision 1.59
retrieving revision 1.60
diff -w -d -u -r1.59 -r1.60
--- apr_hints.m4 9 Mar 2004 14:39:02 -0000 1.59
+++ apr_hints.m4 13 Mar 2004 00:32:43 -0000 1.60
@@ -104,10 +104,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])