summaryrefslogtreecommitdiff
path: root/m4/cares-reentrant.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-14 18:44:27 +0000
committerYang Tse <yangsita@gmail.com>2008-10-14 18:44:27 +0000
commit0cb9896ead7eb6446b08f643da66e25b4dc96401 (patch)
tree4c311c10a109e64377073a30b6f367a56efe4344 /m4/cares-reentrant.m4
parent40f09170d62bb8ac60304e6fbd2b27a73a8cd6a4 (diff)
downloadc-ares-0cb9896ead7eb6446b08f643da66e25b4dc96401.tar.gz
c-ares-0cb9896ead7eb6446b08f643da66e25b4dc96401.tar.bz2
c-ares-0cb9896ead7eb6446b08f643da66e25b4dc96401.zip
With this change Solaris target builds will now be done with _REENTRANT defined.
Diffstat (limited to 'm4/cares-reentrant.m4')
-rw-r--r--m4/cares-reentrant.m428
1 files changed, 23 insertions, 5 deletions
diff --git a/m4/cares-reentrant.m4 b/m4/cares-reentrant.m4
index e19867d..8962da4 100644
--- a/m4/cares-reentrant.m4
+++ b/m4/cares-reentrant.m4
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 2
+# serial 3
dnl Note 1
dnl ------
@@ -333,9 +333,6 @@ dnl makes several _r functions compiler visible.
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
- #
- tmp_need_reentrant="no"
- #
if test "$tmp_need_reentrant" = "no"; then
CARES_CHECK_NEED_REENTRANT_GMTIME_R
fi
@@ -366,6 +363,24 @@ AC_DEFUN([CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
])
+dnl CARES_CHECK_NEED_REENTRANT_SYSTEM
+dnl -------------------------------------------------
+dnl Checks if the preprocessor _REENTRANT definition
+dnl must be unconditionally done for this platform.
+dnl Internal macro for CARES_CONFIGURE_REENTRANT.
+
+AC_DEFUN([CARES_CHECK_NEED_REENTRANT_SYSTEM], [
+ case $host in
+ *-*-solaris*)
+ tmp_need_reentrant="yes"
+ ;;
+ *)
+ tmp_need_reentrant="no"
+ ;;
+ esac
+])
+
+
dnl CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
dnl -------------------------------------------------
dnl This macro ensures that configuration tests done
@@ -421,7 +436,10 @@ AC_DEFUN([CARES_CONFIGURE_REENTRANT], [
#
if test "$tmp_reentrant_initially_defined" = "no"; then
AC_MSG_CHECKING([if _REENTRANT is actually needed])
- CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
+ CARES_CHECK_NEED_REENTRANT_SYSTEM
+ if test "$tmp_need_reentrant" = "no"; then
+ CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
+ fi
if test "$tmp_need_reentrant" = "yes"; then
AC_MSG_RESULT([yes])
else