summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2001-04-09 23:02:21 (GMT)
committerKevin B Kenny <kennykb@acm.org>2001-04-09 23:02:21 (GMT)
commit17d36faef9d874db9535c846fd672161df37803d (patch)
tree15f22c02304c9a814bae22a2e3ced6adf71d985c /unix/tcl.m4
parent32c13b3778a26251f9c69ccc78007c9c1c9a21de (diff)
downloadtcl-17d36faef9d874db9535c846fd672161df37803d.zip
tcl-17d36faef9d874db9535c846fd672161df37803d.tar.gz
tcl-17d36faef9d874db9535c846fd672161df37803d.tar.bz2
Changes to support re-entrant coding of gmtime and localtime.
(Bugs #219136 and #232558)
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0bef313..1d9af67 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -986,6 +986,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
TCL_LIB_VERSIONS_OK=nodots
;;
SunOS-5.[[0-6]]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
@@ -1000,6 +1006,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
;;
SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
LDFLAGS=""
@@ -1623,6 +1635,8 @@ AC_DEFUN(SC_TIME_HANDLER, [
AC_HEADER_TIME
AC_STRUCT_TIMEZONE
+ AC_CHECK_FUNCS(gmtime_r localtime_r)
+
AC_MSG_CHECKING([tm_tzadj in struct tm])
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
[AC_DEFINE(HAVE_TM_TZADJ)