diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2006-03-16 09:41:51 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2006-03-16 09:41:51 +0000 |
commit | ab590454bb64cec627b7907736410d2b200a2971 (patch) | |
tree | 6ebb1824c3774bf5513942f9de158164753016b8 /build | |
parent | 2c858b0fae9332c3267bbd9d0276f59e00299a3b (diff) | |
download | libapr-ab590454bb64cec627b7907736410d2b200a2971.tar.gz |
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.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@386299 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/apr_common.m4 | 17 | ||||
-rw-r--r-- | build/apr_hints.m4 | 4 |
2 files changed, 3 insertions, 18 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4 index 6c2e84160..7bedb5794 100644 --- a/build/apr_common.m4 +++ b/build/apr_common.m4 @@ -543,30 +543,15 @@ crypt_r("passwd", "hash", &buffer); ], 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 ]) dnl diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index 3955e71dd..c40c574c2 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -110,10 +110,10 @@ dnl # Not a problem in 10.20. Otherwise, who knows? * ) ;; 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]) |