trawick 01/08/15 09:01:24
Modified: . configure.in
build apr_hints.m4
Log:
Previously, we considered gethostbyname/gethostbyaddr to be
thread-safe if they were found in libc_r. This didn't work on
OS/390 since there is no libc_r, but they are thread-safe.
Now, variables apr_gethostbyname_is_thread_safe or
apr_gethostbyaddr_is_thread_safe can be set to bypass the
libc_r check, either to state that they are thread-safe or
to state that they aren't (not necessary unless the ones in
libc_r aren't thread-safe after all).
Revision Changes Path
1.359 +12 -2 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.358
retrieving revision 1.359
diff -u -r1.358 -r1.359
--- configure.in 2001/08/15 11:13:57 1.358
+++ configure.in 2001/08/15 16:01:23 1.359
@@ -353,8 +353,18 @@
if test "$threads" = "1"; then
echo "APR will use threads"
AC_CHECK_LIB(c_r, readdir, AC_DEFINE(READDIR_IS_THREAD_SAFE))
- AC_CHECK_LIB(c_r, gethostbyname, AC_DEFINE(GETHOSTBYNAME_IS_THREAD_SAFE))
- AC_CHECK_LIB(c_r, gethostbyaddr, AC_DEFINE(GETHOSTBYADDR_IS_THREAD_SAFE))
+ if test "x$apr_gethostbyname_is_thread_safe" = "x"; then
+ AC_CHECK_LIB(c_r, gethostbyname,
apr_gethostbyname_is_thread_safe=yes)
+ fi
+ if test "$apr_gethostbyname_is_thread_safe" = "yes"; then
+ AC_DEFINE(GETHOSTBYNAME_IS_THREAD_SAFE)
+ fi
+ if test "x$apr_gethostbyaddr_is_thread_safe" = "x"; then
+ AC_CHECK_LIB(c_r, gethostbyaddr,
apr_gethostbyaddr_is_thread_safe=yes)
+ fi
+ if test "$apr_gethostbyaddr_is_thread_safe" = "yes"; then
+ AC_DEFINE(GETHOSTBYADDR_IS_THREAD_SAFE)
+ fi
AC_CHECK_FUNCS(gethostbyname_r gethostbyaddr_r)
else
echo "APR will be non-threaded"
1.19 +2 -0 apr/build/apr_hints.m4
Index: apr_hints.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_hints.m4,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apr_hints.m4 2001/08/15 11:57:09 1.18
+++ apr_hints.m4 2001/08/15 16:01:24 1.19
@@ -372,6 +372,8 @@
*-ibm-os390)
APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
APR_SETIFNULL(apr_process_lock_is_global, [yes])
+ APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
+ APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
APR_SETIFNULL(CC, [cc])
APR_ADDTO(CPPFLAGS, [-U_NO_PROTO
-DPTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR -DPTHREAD_SETS_ERRNO
-DPTHREAD_DETACH_ARG1_ADDR -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1])
;;