summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-06-14 13:24:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-06-14 13:24:08 -0700
commit50bee071548758300c40d0c5f8871ec9f3075289 (patch)
tree6ca49c1cff3717aa27ef2d135f88ab55396755bd /configure.ac
parent859488bf227da300a4d1f90a51222b163165dfae (diff)
downloademacs-50bee071548758300c40d0c5f8871ec9f3075289.tar.gz
Port part of the AIX fix to Solaris.
* configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD. This ports part of the recent AIX fix to Solaris. It is needed for the same reason that _THREAD_SAFE is needed on AIX, e.g., to make sure that each thread has its own 'errno'. Fixes: debbugs:17598
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 600271d1119..702b8570577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2079,10 +2079,14 @@ if test "$HAVE_PTHREAD" = yes; then
# Some systems optimize for single-threaded programs by default, and
# need special flags to disable these optimizations. For example, the
# definition of 'errno' in <errno.h>.
- if test "$opsys" = aix4-2; then
- AC_DEFINE([_THREAD_SAFE], [1],
- [Define to 1 if your system requires this in multithreaded code.])
- fi
+ case $opsys in
+ sol*)
+ AC_DEFINE([_REENTRANT], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ aix4-2)
+ AC_DEFINE([_THREAD_SAFE], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ esac
fi
AC_SUBST([LIB_PTHREAD])