summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in8
-rwxr-xr-xunix/configure1168
-rw-r--r--unix/configure.in81
-rw-r--r--unix/mkLinks14
-rw-r--r--unix/tcl.m4250
-rw-r--r--unix/tclLoadAout.c11
-rw-r--r--unix/tclUnixChan.c31
-rw-r--r--unix/tclUnixFCmd.c56
-rw-r--r--unix/tclUnixFile.c44
-rw-r--r--unix/tclUnixPipe.c8
-rw-r--r--unix/tclUnixPort.h35
-rw-r--r--unix/tclUnixThrd.c8
12 files changed, 1103 insertions, 611 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a18b24b..a80d27f 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.93 2002/01/11 19:17:49 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.94 2002/02/15 14:28:50 dkf Exp $
VERSION = @TCL_VERSION@
@@ -1047,9 +1047,15 @@ strtod.o: $(COMPAT_DIR)/strtod.c
strtol.o: $(COMPAT_DIR)/strtol.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtol.c
+strtoll.o: $(COMPAT_DIR)/strtoll.c
+ $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoll.c
+
strtoul.o: $(COMPAT_DIR)/strtoul.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoul.c
+strtoull.o: $(COMPAT_DIR)/strtoull.c
+ $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoull.c
+
tmpnam.o: $(COMPAT_DIR)/tmpnam.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/tmpnam.c
diff --git a/unix/configure b/unix/configure
index d2c6490..1c852f1 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1303,6 +1303,281 @@ fi
fi
#--------------------------------------------------------------------
+# Detect what compiler flags to set for 64-bit support.
+#--------------------------------------------------------------------
+
+
+ echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
+echo "configure:1312: checking for required early compiler flags" >&5
+ tcl_flags=""
+
+ if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1319 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+int main() {
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+; return 0; }
+EOF
+if { (eval echo configure:1326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__isoc99_source=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1334 "configure"
+#include "confdefs.h"
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int main() {
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+; return 0; }
+EOF
+if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__isoc99_source=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_flag__isoc99_source=no
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define _ISOC99_SOURCE 1
+EOF
+
+ tcl_flags="$tcl_flags _ISOC99_SOURCE"
+ fi
+
+ if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1368 "configure"
+#include "confdefs.h"
+#include <sys/stat.h>
+int main() {
+struct stat64 buf; int i = stat64("/", &buf);
+; return 0; }
+EOF
+if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__largefile64_source=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1383 "configure"
+#include "confdefs.h"
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int main() {
+struct stat64 buf; int i = stat64("/", &buf);
+; return 0; }
+EOF
+if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__largefile64_source=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_flag__largefile64_source=no
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ fi
+ if test "x${tcl_flags}" = "x" ; then
+ echo "$ac_t""none" 1>&6
+ else
+ echo "$ac_t""${tcl_flags}" 1>&6
+ fi
+
+
+ echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
+echo "configure:1420: checking for 64-bit integer type" >&5
+ if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 1426 "configure"
+#include "confdefs.h"
+
+int main() {
+__int64 value = (__int64) 0;
+; return 0; }
+EOF
+if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_type_64bit=__int64
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_type_64bit=none
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1445 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+ int main() {exit(!(sizeof(long long) > sizeof(long)));}
+
+EOF
+if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ tcl_cv_type_64bit="long long"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -fr conftest*
+fi
+
+fi
+rm -f conftest*
+fi
+
+ if test "${tcl_cv_type_64bit}" = none ; then
+ echo "$ac_t""using long" 1>&6
+ else
+ cat >> confdefs.h <<EOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+EOF
+
+ echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
+
+ # Now check for auxiliary declarations
+ echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
+echo "configure:1476: checking for struct dirent64" >&5
+ if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 1482 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/dirent.h>
+int main() {
+struct dirent64 p;
+; return 0; }
+EOF
+if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_struct_dirent64=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_struct_dirent64=no
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_DIRENT64 1
+EOF
+
+ fi
+ echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
+
+ echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
+echo "configure:1511: checking for struct stat64" >&5
+ if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 1517 "configure"
+#include "confdefs.h"
+#include <sys/stat.h>
+int main() {
+struct stat64 p;
+
+; return 0; }
+EOF
+if { (eval echo configure:1525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_struct_stat64=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_struct_stat64=no
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_STAT64 1
+EOF
+
+ fi
+ echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
+
+ echo $ac_n "checking for off64_t""... $ac_c" 1>&6
+echo "configure:1546: checking for off64_t" >&5
+ if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 1552 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+off64_t offset;
+
+; return 0; }
+EOF
+if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_type_off64_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_type_off64_t=no
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TYPE_OFF64_T 1
+EOF
+
+ fi
+ echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
+ fi
+
+#--------------------------------------------------------------------
# Supply substitutes for missing POSIX library procedures, or
# set flags so Tcl uses alternate procedures.
#--------------------------------------------------------------------
@@ -1311,12 +1586,12 @@ fi
for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1315: checking for $ac_func" >&5
+echo "configure:1590: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1320 "configure"
+#line 1595 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1339,7 +1614,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1373,12 +1648,12 @@ done
for ac_func in opendir strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1377: checking for $ac_func" >&5
+echo "configure:1652: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1382 "configure"
+#line 1657 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1401,7 +1676,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1428,15 +1703,15 @@ done
-for ac_func in strtol tmpnam waitpid
+for ac_func in strtol strtoll strtoull tmpnam waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1435: checking for $ac_func" >&5
+echo "configure:1710: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1715 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1459,7 +1734,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1486,12 +1761,12 @@ done
echo $ac_n "checking for strerror""... $ac_c" 1>&6
-echo "configure:1490: checking for strerror" >&5
+echo "configure:1765: checking for strerror" >&5
if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1495 "configure"
+#line 1770 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strerror(); below. */
@@ -1514,7 +1789,7 @@ strerror();
; return 0; }
EOF
-if { (eval echo configure:1518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strerror=yes"
else
@@ -1538,12 +1813,12 @@ EOF
fi
echo $ac_n "checking for getwd""... $ac_c" 1>&6
-echo "configure:1542: checking for getwd" >&5
+echo "configure:1817: checking for getwd" >&5
if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1547 "configure"
+#line 1822 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getwd(); below. */
@@ -1566,7 +1841,7 @@ getwd();
; return 0; }
EOF
-if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getwd=yes"
else
@@ -1590,12 +1865,12 @@ EOF
fi
echo $ac_n "checking for wait3""... $ac_c" 1>&6
-echo "configure:1594: checking for wait3" >&5
+echo "configure:1869: checking for wait3" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
+#line 1874 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wait3(); below. */
@@ -1618,7 +1893,7 @@ wait3();
; return 0; }
EOF
-if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_wait3=yes"
else
@@ -1642,12 +1917,12 @@ EOF
fi
echo $ac_n "checking for uname""... $ac_c" 1>&6
-echo "configure:1646: checking for uname" >&5
+echo "configure:1921: checking for uname" >&5
if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1651 "configure"
+#line 1926 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char uname(); below. */
@@ -1670,7 +1945,7 @@ uname();
; return 0; }
EOF
-if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_uname=yes"
else
@@ -1694,12 +1969,12 @@ EOF
fi
echo $ac_n "checking for realpath""... $ac_c" 1>&6
-echo "configure:1698: checking for realpath" >&5
+echo "configure:1973: checking for realpath" >&5
if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1703 "configure"
+#line 1978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char realpath(); below. */
@@ -1722,7 +1997,7 @@ realpath();
; return 0; }
EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_realpath=yes"
else
@@ -1758,9 +2033,9 @@ fi
echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:1762: checking dirent.h" >&5
+echo "configure:2037: checking dirent.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 1764 "configure"
+#line 2039 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@@ -1786,7 +2061,7 @@ closedir(d);
; return 0; }
EOF
-if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcl_ok=yes
else
@@ -1807,17 +2082,17 @@ EOF
echo "$ac_t""$tcl_ok" 1>&6
ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:1811: checking for errno.h" >&5
+echo "configure:2086: checking for errno.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1816 "configure"
+#line 2091 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1844,17 +2119,17 @@ fi
ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:1848: checking for float.h" >&5
+echo "configure:2123: checking for float.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1853 "configure"
+#line 2128 "configure"
#include "confdefs.h"
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1881,17 +2156,17 @@ fi
ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:1885: checking for values.h" >&5
+echo "configure:2160: checking for values.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1890 "configure"
+#line 2165 "configure"
#include "confdefs.h"
#include <values.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1918,17 +2193,17 @@ fi
ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:1922: checking for limits.h" >&5
+echo "configure:2197: checking for limits.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1927 "configure"
+#line 2202 "configure"
#include "confdefs.h"
#include <limits.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1955,17 +2230,17 @@ fi
ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:1959: checking for stdlib.h" >&5
+echo "configure:2234: checking for stdlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1964 "configure"
+#line 2239 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1988,7 +2263,7 @@ tcl_ok=0
fi
cat > conftest.$ac_ext <<EOF
-#line 1992 "configure"
+#line 2267 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2002,7 +2277,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2006 "configure"
+#line 2281 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2016,7 +2291,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2020 "configure"
+#line 2295 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2037,17 +2312,17 @@ EOF
fi
ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2041: checking for string.h" >&5
+echo "configure:2316: checking for string.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2046 "configure"
+#line 2321 "configure"
#include "confdefs.h"
#include <string.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2070,7 +2345,7 @@ tcl_ok=0
fi
cat > conftest.$ac_ext <<EOF
-#line 2074 "configure"
+#line 2349 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2084,7 +2359,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2088 "configure"
+#line 2363 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2110,17 +2385,17 @@ EOF
ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:2114: checking for sys/wait.h" >&5
+echo "configure:2389: checking for sys/wait.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2394 "configure"
#include "confdefs.h"
#include <sys/wait.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2147,17 +2422,17 @@ fi
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2151: checking for dlfcn.h" >&5
+echo "configure:2426: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2156 "configure"
+#line 2431 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2189,17 +2464,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2193: checking for $ac_hdr" >&5
+echo "configure:2468: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2198 "configure"
+#line 2473 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2236,19 +2511,21 @@ done
echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
-echo "configure:2240: checking termios vs. termio vs. sgtty" >&5
-
+echo "configure:2515: checking termios vs. termio vs. sgtty" >&5
+ if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
if test "$cross_compiling" = yes; then
- tk_ok=no
+ tcl_cv_api_serial=no
else
cat > conftest.$ac_ext <<EOF
-#line 2246 "configure"
+#line 2524 "configure"
#include "confdefs.h"
#include <termios.h>
-main()
-{
+int main() {
struct termios t;
if (tcgetattr(0, &t) == 0) {
cfsetospeed(&t, 0);
@@ -2258,74 +2535,61 @@ main()
return 1;
}
EOF
-if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=termios
+ tcl_cv_api_serial=termios
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=no
+ tcl_cv_api_serial=no
fi
rm -fr conftest*
fi
-
- if test $tk_ok = termios; then
- cat >> confdefs.h <<\EOF
-#define USE_TERMIOS 1
-EOF
-
- else
+ if test $tcl_cv_api_serial = no ; then
if test "$cross_compiling" = yes; then
- tk_ok=no
+ tcl_cv_api_serial=no
else
cat > conftest.$ac_ext <<EOF
-#line 2285 "configure"
+#line 2556 "configure"
#include "confdefs.h"
#include <termio.h>
-main()
-{
+int main() {
struct termio t;
if (ioctl(0, TCGETA, &t) == 0) {
t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
return 0;
}
return 1;
- }
+}
EOF
-if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=termio
+ tcl_cv_api_serial=termio
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=no
+ tcl_cv_api_serial=no
fi
rm -fr conftest*
fi
-
- if test $tk_ok = termio; then
- cat >> confdefs.h <<\EOF
-#define USE_TERMIO 1
-EOF
-
- else
+ fi
+ if test $tcl_cv_api_serial = no ; then
if test "$cross_compiling" = yes; then
- tk_ok=none
+ tcl_cv_api_serial=none
else
cat > conftest.$ac_ext <<EOF
-#line 2323 "configure"
+#line 2588 "configure"
#include "confdefs.h"
#include <sgtty.h>
-main()
-{
+int main() {
struct sgttyb t;
if (ioctl(0, TIOCGETP, &t) == 0) {
t.sg_ospeed = 0;
@@ -2335,37 +2599,31 @@ main()
return 1;
}
EOF
-if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=sgtty
+ tcl_cv_api_serial=sgtty
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=none
+ tcl_cv_api_serial=none
fi
rm -fr conftest*
fi
-
- if test $tk_ok = sgtty; then
- cat >> confdefs.h <<\EOF
-#define USE_SGTTY 1
-EOF
-
- else
+ fi
+ if test $tcl_cv_api_serial = no ; then
if test "$cross_compiling" = yes; then
- tk_ok=no
+ tcl_cv_api_serial=no
else
cat > conftest.$ac_ext <<EOF
-#line 2362 "configure"
+#line 2621 "configure"
#include "confdefs.h"
#include <termios.h>
#include <errno.h>
-main()
-{
+int main() {
struct termios t;
if (tcgetattr(0, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -2376,37 +2634,31 @@ main()
return 1;
}
EOF
-if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=termios
+ tcl_cv_api_serial=termios
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=no
+ tcl_cv_api_serial=no
fi
rm -fr conftest*
fi
-
- if test $tk_ok = termios; then
- cat >> confdefs.h <<\EOF
-#define USE_TERMIOS 1
-EOF
-
- else
+ fi
+ if test $tcl_cv_api_serial = no; then
if test "$cross_compiling" = yes; then
- tk_ok=no
+ tcl_cv_api_serial=no
else
cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2656 "configure"
#include "confdefs.h"
#include <termio.h>
#include <errno.h>
-main()
-{
+int main() {
struct termio t;
if (ioctl(0, TCGETA, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -2416,37 +2668,31 @@ main()
return 1;
}
EOF
-if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=termio
+ tcl_cv_api_serial=termio
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=no
+ tcl_cv_api_serial=no
fi
rm -fr conftest*
fi
-
- if test $tk_ok = termio; then
- cat >> confdefs.h <<\EOF
-#define USE_TERMIO 1
-EOF
-
- else
+ fi
+ if test $tcl_cv_api_serial = no; then
if test "$cross_compiling" = yes; then
- tk_ok=none
+ tcl_cv_api_serial=none
else
cat > conftest.$ac_ext <<EOF
-#line 2443 "configure"
+#line 2690 "configure"
#include "confdefs.h"
#include <sgtty.h>
#include <errno.h>
-main()
-{
+int main() {
struct sgttyb t;
if (ioctl(0, TIOCGETP, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -2457,31 +2703,36 @@ main()
return 1;
}
EOF
-if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- tk_ok=sgtty
+ tcl_cv_api_serial=sgtty
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- tk_ok=none
+ tcl_cv_api_serial=none
fi
rm -fr conftest*
fi
+ fi
+fi
- if test $tk_ok = sgtty; then
- cat >> confdefs.h <<\EOF
+ case $tcl_cv_api_serial in
+ termios) cat >> confdefs.h <<\EOF
+#define USE_TERMIOS 1
+EOF
+;;
+ termio) cat >> confdefs.h <<\EOF
+#define USE_TERMIO 1
+EOF
+;;
+ sgtty) cat >> confdefs.h <<\EOF
#define USE_SGTTY 1
EOF
-
- fi
- fi
- fi
- fi
- fi
- fi
- echo "$ac_t""$tk_ok" 1>&6
+;;
+ esac
+ echo "$ac_t""$tcl_cv_api_serial" 1>&6
#--------------------------------------------------------------------
@@ -2494,47 +2745,65 @@ EOF
# special flag.
#--------------------------------------------------------------------
-echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
-echo "configure:2499: checking fd_set and sys/select" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2501 "configure"
+echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
+echo "configure:2750: checking for fd_set in sys/types" >&5
+if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2755 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
fd_set readMask, writeMask;
; return 0; }
EOF
-if { (eval echo configure:2508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- tk_ok=yes
+ tcl_cv_type_fd_set=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tk_ok=no
+ tcl_cv_type_fd_set=no
fi
rm -f conftest*
-if test $tk_ok = no; then
- cat > conftest.$ac_ext <<EOF
-#line 2520 "configure"
+fi
+
+echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
+echo "configure:2778: checking for fd_mask in sys/select" >&5
+ if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2783 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "fd_mask" >/dev/null 2>&1; then
rm -rf conftest*
- tk_ok=yes
+ tcl_cv_grep_fd_mask=present
+else
+ rm -rf conftest*
+ tcl_cv_grep_fd_mask=missing
fi
rm -f conftest*
- if test $tk_ok = yes; then
+fi
+
+ echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
+ if test $tcl_cv_grep_fd_mask = present; then
cat >> confdefs.h <<\EOF
#define HAVE_SYS_SELECT_H 1
EOF
+ tk_ok=yes
fi
fi
-echo "$ac_t""$tk_ok" 1>&6
if test $tk_ok = no; then
cat >> confdefs.h <<\EOF
#define NO_FD_SET 1
@@ -2547,12 +2816,12 @@ fi
#------------------------------------------------------------------------------
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2551: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2820: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2556 "configure"
+#line 2825 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -2560,7 +2829,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -2585,17 +2854,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2589: checking for $ac_hdr" >&5
+echo "configure:2858: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2594 "configure"
+#line 2863 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2622,12 +2891,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2626: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2895: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2631 "configure"
+#line 2900 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2636,7 +2905,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2657,12 +2926,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2661: checking for tm_zone in struct tm" >&5
+echo "configure:2930: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2666 "configure"
+#line 2935 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -2670,7 +2939,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -2690,12 +2959,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2694: checking for tzname" >&5
+echo "configure:2963: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2699 "configure"
+#line 2968 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -2705,7 +2974,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -2730,12 +2999,12 @@ fi
for ac_func in gmtime_r localtime_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2734: checking for $ac_func" >&5
+echo "configure:3003: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
+#line 3008 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2758,7 +3027,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2784,64 +3053,82 @@ done
echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
-echo "configure:2788: checking tm_tzadj in struct tm" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
+echo "configure:3057: checking tm_tzadj in struct tm" >&5
+ if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3062 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
struct tm tm; tm.tm_tzadj;
; return 0; }
EOF
-if { (eval echo configure:2797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_TM_TZADJ 1
-EOF
-
- echo "$ac_t""yes" 1>&6
+ tcl_cv_member_tm_tzadj=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ tcl_cv_member_tm_tzadj=no
fi
rm -f conftest*
+fi
+
+ echo "$ac_t""$tcl_cv_member_tm_tzadj" 1>&6
+ if test $tcl_cv_member_tm_tzadj = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TM_TZADJ 1
+EOF
+
+ fi
echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:2813: checking tm_gmtoff in struct tm" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2815 "configure"
+echo "configure:3090: checking tm_gmtoff in struct tm" >&5
+ if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3095 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
struct tm tm; tm.tm_gmtoff;
; return 0; }
EOF
-if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_TM_GMTOFF 1
-EOF
-
- echo "$ac_t""yes" 1>&6
+ tcl_cv_member_tm_gmtoff=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ tcl_cv_member_tm_gmtoff=no
fi
rm -f conftest*
+fi
+
+ echo "$ac_t""$tcl_cv_member_tm_gmtoff" 1>&6
+ if test $tcl_cv_member_tm_gmtoff = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TM_GMTOFF 1
+EOF
+
+ fi
#
# Its important to include time.h in this check, as some systems
# (like convex) have timezone functions, etc.
#
- have_timezone=no
echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
-echo "configure:2843: checking long timezone variable" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2845 "configure"
+echo "configure:3127: checking long timezone variable" >&5
+ if eval "test \"`echo '$''{'tcl_cv_var_timezone'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3132 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
@@ -2850,54 +3137,63 @@ extern long timezone;
exit (0);
; return 0; }
EOF
-if { (eval echo configure:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- have_timezone=yes
- cat >> confdefs.h <<\EOF
-#define HAVE_TIMEZONE_VAR 1
-EOF
-
- echo "$ac_t""yes" 1>&6
+ tcl_cv_timezone_long=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ tcl_cv_timezone_long=no
fi
rm -f conftest*
+fi
- #
- # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
- #
- if test "$have_timezone" = no; then
- echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
-echo "configure:2875: checking time_t timezone variable" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2877 "configure"
+ echo "$ac_t""$tcl_cv_timezone_long" 1>&6
+ if test $tcl_cv_timezone_long = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TIMEZONE_VAR 1
+EOF
+
+ else
+ #
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
+echo "configure:3164: checking time_t timezone variable" >&5
+ if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3169 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
extern time_t timezone;
- timezone += 1;
- exit (0);
+ timezone += 1;
+ exit (0);
; return 0; }
EOF
-if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_TIMEZONE_VAR 1
-EOF
-
- echo "$ac_t""yes" 1>&6
+ tcl_cv_timezone_time=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ tcl_cv_timezone_time=no
fi
rm -f conftest*
- fi
+fi
+
+ echo "$ac_t""$tcl_cv_timezone_time" 1>&6
+ if test $tcl_cv_timezone_time = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TIMEZONE_VAR 1
+EOF
+ fi
+ fi
#--------------------------------------------------------------------
@@ -2905,12 +3201,12 @@ rm -f conftest*
# in struct stat. But we might be able to use fstatfs instead.
#--------------------------------------------------------------------
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:2909: checking for st_blksize in struct stat" >&5
+echo "configure:3205: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2914 "configure"
+#line 3210 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2918,7 +3214,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:2922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -2939,12 +3235,12 @@ EOF
fi
echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
-echo "configure:2943: checking for fstatfs" >&5
+echo "configure:3239: checking for fstatfs" >&5
if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2948 "configure"
+#line 3244 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char fstatfs(); below. */
@@ -2967,7 +3263,7 @@ fstatfs();
; return 0; }
EOF
-if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_fstatfs=yes"
else
@@ -2996,7 +3292,7 @@ fi
# data, this checks it and add memcmp.o to LIBOBJS if needed
#--------------------------------------------------------------------
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3000: checking for 8-bit clean memcmp" >&5
+echo "configure:3296: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3004,7 +3300,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
+#line 3304 "configure"
#include "confdefs.h"
main()
@@ -3014,7 +3310,7 @@ main()
}
EOF
-if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -3038,12 +3334,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
# {The replacement define is in compat/string.h}
#--------------------------------------------------------------------
echo $ac_n "checking for memmove""... $ac_c" 1>&6
-echo "configure:3042: checking for memmove" >&5
+echo "configure:3338: checking for memmove" >&5
if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3047 "configure"
+#line 3343 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char memmove(); below. */
@@ -3066,7 +3362,7 @@ memmove();
; return 0; }
EOF
-if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_memmove=yes"
else
@@ -3099,12 +3395,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
-echo "configure:3103: checking proper strstr implementation" >&5
+echo "configure:3399: checking proper strstr implementation" >&5
if test "$cross_compiling" = yes; then
tcl_ok=no
else
cat > conftest.$ac_ext <<EOF
-#line 3108 "configure"
+#line 3404 "configure"
#include "confdefs.h"
extern int strstr();
@@ -3114,7 +3410,7 @@ int main()
}
EOF
-if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
tcl_ok=yes
else
@@ -3140,12 +3436,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for strtoul""... $ac_c" 1>&6
-echo "configure:3144: checking for strtoul" >&5
+echo "configure:3440: checking for strtoul" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3149 "configure"
+#line 3445 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtoul(); below. */
@@ -3168,7 +3464,7 @@ strtoul();
; return 0; }
EOF
-if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strtoul=yes"
else
@@ -3192,7 +3488,7 @@ if test "$cross_compiling" = yes; then
tcl_ok=0
else
cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
+#line 3492 "configure"
#include "confdefs.h"
extern int strtoul();
@@ -3208,7 +3504,7 @@ int main()
exit(0);
}
EOF
-if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3231,12 +3527,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3235: checking for strtod" >&5
+echo "configure:3531: checking for strtod" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3240 "configure"
+#line 3536 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtod(); below. */
@@ -3259,7 +3555,7 @@ strtod();
; return 0; }
EOF
-if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strtod=yes"
else
@@ -3283,7 +3579,7 @@ if test "$cross_compiling" = yes; then
tcl_ok=0
else
cat > conftest.$ac_ext <<EOF
-#line 3287 "configure"
+#line 3583 "configure"
#include "confdefs.h"
extern double strtod();
@@ -3299,7 +3595,7 @@ int main()
exit(0);
}
EOF
-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3325,12 +3621,12 @@ fi
echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3329: checking for strtod" >&5
+echo "configure:3625: checking for strtod" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3334 "configure"
+#line 3630 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtod(); below. */
@@ -3353,7 +3649,7 @@ strtod();
; return 0; }
EOF
-if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strtod=yes"
else
@@ -3375,12 +3671,12 @@ fi
if test "$tcl_strtod" = 1; then
echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3379: checking for Solaris2.4/Tru64 strtod bugs" >&5
+echo "configure:3675: checking for Solaris2.4/Tru64 strtod bugs" >&5
if test "$cross_compiling" = yes; then
tcl_ok=0
else
cat > conftest.$ac_ext <<EOF
-#line 3384 "configure"
+#line 3680 "configure"
#include "confdefs.h"
extern double strtod();
@@ -3400,7 +3696,7 @@ else
exit(0);
}
EOF
-if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
tcl_ok=1
else
@@ -3431,12 +3727,12 @@ EOF
#--------------------------------------------------------------------
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3435: checking for ANSI C header files" >&5
+echo "configure:3731: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3440 "configure"
+#line 3736 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3444,7 +3740,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3461,7 +3757,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3465 "configure"
+#line 3761 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3479,7 +3775,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3483 "configure"
+#line 3779 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3500,7 +3796,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3504 "configure"
+#line 3800 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3511,7 +3807,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3535,12 +3831,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3539: checking for mode_t" >&5
+echo "configure:3835: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3544 "configure"
+#line 3840 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3568,12 +3864,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3572: checking for pid_t" >&5
+echo "configure:3868: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3577 "configure"
+#line 3873 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3601,12 +3897,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3605: checking for size_t" >&5
+echo "configure:3901: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3610 "configure"
+#line 3906 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3634,12 +3930,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3638: checking for uid_t in sys/types.h" >&5
+echo "configure:3934: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3939 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3676,12 +3972,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for opendir""... $ac_c" 1>&6
-echo "configure:3680: checking for opendir" >&5
+echo "configure:3976: checking for opendir" >&5
if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3685 "configure"
+#line 3981 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char opendir(); below. */
@@ -3704,7 +4000,7 @@ opendir();
; return 0; }
EOF
-if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_opendir=yes"
else
@@ -3737,9 +4033,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking union wait""... $ac_c" 1>&6
-echo "configure:3741: checking union wait" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3743 "configure"
+echo "configure:4037: checking union wait" >&5
+if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4042 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -3748,21 +4047,23 @@ int main() {
union wait x;
WIFEXITED(x); /* Generates compiler error if WIFEXITED
* uses an int. */
-
+
; return 0; }
EOF
-if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- tcl_ok=yes
+ tcl_cv_union_wait=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tcl_ok=no
+ tcl_cv_union_wait=no
fi
rm -f conftest*
-echo "$ac_t""$tcl_ok" 1>&6
-if test $tcl_ok = no; then
+fi
+
+echo "$ac_t""$tcl_cv_union_wait" 1>&6
+if test $tcl_cv_union_wait = no; then
cat >> confdefs.h <<\EOF
#define NO_UNION_WAIT 1
EOF
@@ -3775,31 +4076,36 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking matherr support""... $ac_c" 1>&6
-echo "configure:3779: checking matherr support" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3781 "configure"
+echo "configure:4080: checking matherr support" >&5
+if eval "test \"`echo '$''{'tcl_cv_func_matherr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4085 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
-struct exception x;
-x.type = DOMAIN;
-x.type = SING;
-
+ struct exception x;
+ x.type = DOMAIN;
+ x.type = SING;
+
; return 0; }
EOF
-if { (eval echo configure:3792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- tcl_ok=yes
+ tcl_cv_func_matherr=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tcl_ok=no
+ tcl_cv_func_matherr=no
fi
rm -f conftest*
-echo "$ac_t""$tcl_ok" 1>&6
-if test $tcl_ok = yes; then
+fi
+
+echo "$ac_t""$tcl_cv_func_matherr" 1>&6
+if test $tcl_cv_func_matherr = yes; then
cat >> confdefs.h <<\EOF
#define NEED_MATHERR 1
EOF
@@ -3813,12 +4119,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
-echo "configure:3817: checking for strncasecmp" >&5
+echo "configure:4123: checking for strncasecmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3822 "configure"
+#line 4128 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strncasecmp(); below. */
@@ -3841,7 +4147,7 @@ strncasecmp();
; return 0; }
EOF
-if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strncasecmp=yes"
else
@@ -3863,7 +4169,7 @@ fi
if test "$tcl_ok" = 0; then
echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
-echo "configure:3867: checking for strncasecmp in -lsocket" >&5
+echo "configure:4173: checking for strncasecmp in -lsocket" >&5
ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3871,7 +4177,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3875 "configure"
+#line 4181 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3882,7 +4188,7 @@ int main() {
strncasecmp()
; return 0; }
EOF
-if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3906,7 +4212,7 @@ fi
fi
if test "$tcl_ok" = 0; then
echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
-echo "configure:3910: checking for strncasecmp in -linet" >&5
+echo "configure:4216: checking for strncasecmp in -linet" >&5
ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3914,7 +4220,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3918 "configure"
+#line 4224 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3925,7 +4231,7 @@ int main() {
strncasecmp()
; return 0; }
EOF
-if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3963,12 +4269,12 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
-echo "configure:3967: checking for BSDgettimeofday" >&5
+echo "configure:4273: checking for BSDgettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3972 "configure"
+#line 4278 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char BSDgettimeofday(); below. */
@@ -3991,7 +4297,7 @@ BSDgettimeofday();
; return 0; }
EOF
-if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_BSDgettimeofday=yes"
else
@@ -4013,12 +4319,12 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
-echo "configure:4017: checking for gettimeofday" >&5
+echo "configure:4323: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4022 "configure"
+#line 4328 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gettimeofday(); below. */
@@ -4041,7 +4347,7 @@ gettimeofday();
; return 0; }
EOF
-if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gettimeofday=yes"
else
@@ -4068,28 +4374,34 @@ fi
fi
echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
-echo "configure:4072: checking for gettimeofday declaration" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4074 "configure"
+echo "configure:4378: checking for gettimeofday declaration" >&5
+if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4383 "configure"
#include "confdefs.h"
#include <sys/time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "gettimeofday" >/dev/null 2>&1; then
rm -rf conftest*
- echo "$ac_t""present" 1>&6
+ tcl_cv_grep_gettimeofday=present
else
rm -rf conftest*
-
- echo "$ac_t""missing" 1>&6
+ tcl_cv_grep_gettimeofday=missing
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6
+if test $tcl_cv_grep_gettimeofday = missing ; then
cat >> confdefs.h <<\EOF
#define GETTOD_NOT_DECLARED 1
EOF
-
fi
-rm -f conftest*
-
#--------------------------------------------------------------------
# The following code checks to see whether it is possible to get
@@ -4098,14 +4410,14 @@ rm -f conftest*
#--------------------------------------------------------------------
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:4102: checking whether char is unsigned" >&5
+echo "configure:4414: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 4109 "configure"
+#line 4421 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -4127,7 +4439,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4131 "configure"
+#line 4443 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -4137,7 +4449,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -4161,30 +4473,35 @@ EOF
fi
echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
-echo "configure:4165: checking signed char declarations" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4167 "configure"
+echo "configure:4477: checking signed char declarations" >&5
+if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4482 "configure"
#include "confdefs.h"
int main() {
-signed char *p;
-p = 0;
-
+ signed char *p;
+ p = 0;
+
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- tcl_ok=yes
+ tcl_cv_char_signed=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tcl_ok=no
+ tcl_cv_char_signed=no
fi
rm -f conftest*
-echo "$ac_t""$tcl_ok" 1>&6
-if test $tcl_ok = yes; then
+fi
+
+echo "$ac_t""$tcl_cv_char_signed" 1>&6
+if test $tcl_cv_char_signed = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_SIGNED_CHAR 1
EOF
@@ -4210,17 +4527,17 @@ fi
if test "$langinfo_ok" = "yes"; then
ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:4214: checking for langinfo.h" >&5
+echo "configure:4531: checking for langinfo.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4219 "configure"
+#line 4536 "configure"
#include "confdefs.h"
#include <langinfo.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4245,17 +4562,17 @@ fi
fi
fi
echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
-echo "configure:4249: checking whether to use nl_langinfo" >&5
+echo "configure:4566: checking whether to use nl_langinfo" >&5
if test "$langinfo_ok" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 4252 "configure"
+#line 4569 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
nl_langinfo(CODESET);
; return 0; }
EOF
-if { (eval echo configure:4259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
langinfo_ok=yes
else
@@ -4291,12 +4608,12 @@ EOF
#--------------------------------------------------------------------
echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4295: checking for sin" >&5
+echo "configure:4612: checking for sin" >&5
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4300 "configure"
+#line 4617 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
@@ -4319,7 +4636,7 @@ sin();
; return 0; }
EOF
-if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sin=yes"
else
@@ -4340,7 +4657,7 @@ MATH_LIBS="-lm"
fi
echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
-echo "configure:4344: checking for main in -lieee" >&5
+echo "configure:4661: checking for main in -lieee" >&5
ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4348,14 +4665,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lieee $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4352 "configure"
+#line 4669 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4382,7 +4699,7 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
-echo "configure:4386: checking for main in -linet" >&5
+echo "configure:4703: checking for main in -linet" >&5
ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4390,14 +4707,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4394 "configure"
+#line 4711 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4419,17 +4736,17 @@ fi
ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
-echo "configure:4423: checking for net/errno.h" >&5
+echo "configure:4740: checking for net/errno.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4428 "configure"
+#line 4745 "configure"
#include "confdefs.h"
#include <net/errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4474,12 +4791,12 @@ fi
tcl_checkBoth=0
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4478: checking for connect" >&5
+echo "configure:4795: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4483 "configure"
+#line 4800 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -4502,7 +4819,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -4524,12 +4841,12 @@ fi
if test "$tcl_checkSocket" = 1; then
echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
-echo "configure:4528: checking for setsockopt" >&5
+echo "configure:4845: checking for setsockopt" >&5
if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4533 "configure"
+#line 4850 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char setsockopt(); below. */
@@ -4552,7 +4869,7 @@ setsockopt();
; return 0; }
EOF
-if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_setsockopt=yes"
else
@@ -4570,7 +4887,7 @@ if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
-echo "configure:4574: checking for setsockopt in -lsocket" >&5
+echo "configure:4891: checking for setsockopt in -lsocket" >&5
ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4578,7 +4895,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4582 "configure"
+#line 4899 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4589,7 +4906,7 @@ int main() {
setsockopt()
; return 0; }
EOF
-if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4617,12 +4934,12 @@ fi
tk_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:4621: checking for accept" >&5
+echo "configure:4938: checking for accept" >&5
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4626 "configure"
+#line 4943 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char accept(); below. */
@@ -4645,7 +4962,7 @@ accept();
; return 0; }
EOF
-if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_accept=yes"
else
@@ -4667,12 +4984,12 @@ fi
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:4671: checking for gethostbyname" >&5
+echo "configure:4988: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4676 "configure"
+#line 4993 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -4695,7 +5012,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -4713,7 +5030,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4717: checking for gethostbyname in -lnsl" >&5
+echo "configure:5034: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4721,7 +5038,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4725 "configure"
+#line 5042 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4732,7 +5049,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4778,7 +5095,7 @@ LIBS="$LIBS$THREADS_LIBS"
# Step 0.a: Enable 64 bit support?
echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
-echo "configure:4782: checking if 64bit support is requested" >&5
+echo "configure:5099: checking if 64bit support is requested" >&5
# Check whether --enable-64bit or --disable-64bit was given.
if test "${enable_64bit+set}" = set; then
enableval="$enable_64bit"
@@ -4798,7 +5115,7 @@ fi
# Step 0.b: Enable Solaris 64 bit VIS support?
echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4802: checking if 64bit Sparc VIS support is requested" >&5
+echo "configure:5119: checking if 64bit Sparc VIS support is requested" >&5
# Check whether --enable-64bit-vis or --disable-64bit-vis was given.
if test "${enable_64bit_vis+set}" = set; then
enableval="$enable_64bit_vis"
@@ -4822,7 +5139,7 @@ fi
# there are a few systems, like Next, where this doesn't work.
echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4826: checking system version (for dynamic loading)" >&5
+echo "configure:5143: checking system version (for dynamic loading)" >&5
if test -f /usr/lib/NextStep/software_version; then
system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
else
@@ -4848,7 +5165,7 @@ echo "configure:4826: checking system version (for dynamic loading)" >&5
# Linux can use either -ldl or -ldld for dynamic loading.
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4852: checking for dlopen in -ldl" >&5
+echo "configure:5169: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4856,7 +5173,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4860 "configure"
+#line 5177 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4867,7 +5184,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4911,7 +5228,7 @@ fi
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4915: checking for $ac_word" >&5
+echo "configure:5232: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5016,7 +5333,7 @@ fi
# known GMT value.
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:5020: checking for gettimeofday in -lbsd" >&5
+echo "configure:5337: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5024,7 +5341,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5028 "configure"
+#line 5345 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5035,7 +5352,7 @@ int main() {
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5097,7 +5414,7 @@ EOF
HP-UX-*.11.*)
SHLIB_SUFFIX=".sl"
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:5101: checking for shl_load in -ldld" >&5
+echo "configure:5418: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5105,7 +5422,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5109 "configure"
+#line 5426 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5116,7 +5433,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5159,7 +5476,7 @@ fi
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
SHLIB_SUFFIX=".sl"
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:5163: checking for shl_load in -ldld" >&5
+echo "configure:5480: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5167,7 +5484,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5171 "configure"
+#line 5488 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5178,7 +5495,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5285,17 +5602,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:5289: checking for dld.h" >&5
+echo "configure:5606: checking for dld.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5294 "configure"
+#line 5611 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5352,17 +5669,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:5356: checking for dld.h" >&5
+echo "configure:5673: checking for dld.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5361 "configure"
+#line 5678 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5417,17 +5734,17 @@ fi
# Not available on all versions: check for include file.
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5421: checking for dlfcn.h" >&5
+echo "configure:5738: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5426 "configure"
+#line 5743 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5454,9 +5771,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
LDFLAGS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5458: checking for ELF" >&5
+echo "configure:5775: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 5460 "configure"
+#line 5777 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -5778,17 +6095,17 @@ EOF
# that don't grok the -Bexport option. Test that it does.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5782: checking for ld accepts -Bexport flag" >&5
+echo "configure:6099: checking for ld accepts -Bexport flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-Bexport"
cat > conftest.$ac_ext <<EOF
-#line 5785 "configure"
+#line 6102 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -5834,9 +6151,9 @@ rm -f conftest*
if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5838: checking sys/exec.h" >&5
+echo "configure:6155: checking sys/exec.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5840 "configure"
+#line 6157 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {
@@ -5854,7 +6171,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -5872,9 +6189,9 @@ EOF
else
echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5876: checking a.out.h" >&5
+echo "configure:6193: checking a.out.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5878 "configure"
+#line 6195 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {
@@ -5892,7 +6209,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -5910,9 +6227,9 @@ EOF
else
echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5914: checking sys/exec_aout.h" >&5
+echo "configure:6231: checking sys/exec_aout.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5916 "configure"
+#line 6233 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {
@@ -5930,7 +6247,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -6027,7 +6344,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:6031: checking for build with symbols" >&5
+echo "configure:6348: checking for build with symbols" >&5
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
@@ -6064,17 +6381,17 @@ TCL_DBGX=${DBGX}
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6068: checking for $ac_hdr" >&5
+echo "configure:6385: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6073 "configure"
+#line 6390 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6104,17 +6421,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6108: checking for $ac_hdr" >&5
+echo "configure:6425: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6113 "configure"
+#line 6430 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6141,7 +6458,7 @@ fi
done
echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
-echo "configure:6145: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
+echo "configure:6462: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
if test -f /usr/lib/NextStep/software_version; then
system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
else
@@ -6203,7 +6520,7 @@ TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:6207: checking how to build libraries" >&5
+echo "configure:6524: checking how to build libraries" >&5
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -6403,6 +6720,8 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -6600,6 +6919,7 @@ s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
+s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g
s%@MAKE_LIB@%$MAKE_LIB%g
s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
s%@BUILD_DLTEST@%$BUILD_DLTEST%g
diff --git a/unix/configure.in b/unix/configure.in
index 2e4902c..c09e880 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.81 2002/02/05 02:48:40 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.82 2002/02/15 14:28:50 dkf Exp $
AC_INIT(../generic/tcl.h)
@@ -65,6 +65,14 @@ fi
fi
#--------------------------------------------------------------------
+# Detect what compiler flags to set for 64-bit support.
+#--------------------------------------------------------------------
+
+SC_TCL_EARLY_FLAGS
+
+SC_TCL_64BIT_FLAGS
+
+#--------------------------------------------------------------------
# Supply substitutes for missing POSIX library procedures, or
# set flags so Tcl uses alternate procedures.
#--------------------------------------------------------------------
@@ -76,7 +84,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)])
AC_REPLACE_FUNCS(opendir strstr)
-AC_REPLACE_FUNCS(strtol tmpnam waitpid)
+AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid)
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)])
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)])
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)])
@@ -112,16 +120,23 @@ SC_SERIAL_PORT
# special flag.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([fd_set and sys/select])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
-if test $tk_ok = no; then
- AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
- if test $tk_ok = yes; then
+AC_MSG_CHECKING([for fd_set in sys/types])
+AC_CACHE_VAL(tcl_cv_type_fd_set,
+ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no))
+AC_MSG_RESULT($tcl_cv_type_fd_set)
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ AC_MSG_CHECKING([for fd_mask in sys/select])
+ AC_CACHE_VAL(tcl_cv_grep_fd_mask,
+ AC_HEADER_EGREP(fd_mask, sys/select.h,
+ tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing))
+ AC_MSG_RESULT($tcl_cv_grep_fd_mask)
+ if test $tcl_cv_grep_fd_mask = present; then
AC_DEFINE(HAVE_SYS_SELECT_H)
+ tk_ok=yes
fi
fi
-AC_MSG_RESULT($tk_ok)
if test $tk_ok = no; then
AC_DEFINE(NO_FD_SET)
fi
@@ -258,14 +273,15 @@ AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)])
#--------------------------------------------------------------------
AC_MSG_CHECKING([union wait])
-AC_TRY_LINK([#include <sys/types.h>
+AC_CACHE_VAL(tcl_cv_union_wait,
+ AC_TRY_LINK([#include <sys/types.h>
#include <sys/wait.h>], [
union wait x;
WIFEXITED(x); /* Generates compiler error if WIFEXITED
* uses an int. */
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = no; then
+ ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no))
+AC_MSG_RESULT($tcl_cv_union_wait)
+if test $tcl_cv_union_wait = no; then
AC_DEFINE(NO_UNION_WAIT)
fi
@@ -275,13 +291,14 @@ fi
#--------------------------------------------------------------------
AC_MSG_CHECKING([matherr support])
-AC_TRY_COMPILE([#include <math.h>], [
-struct exception x;
-x.type = DOMAIN;
-x.type = SING;
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = yes; then
+AC_CACHE_VAL(tcl_cv_func_matherr,
+ AC_TRY_COMPILE([#include <math.h>], [
+ struct exception x;
+ x.type = DOMAIN;
+ x.type = SING;
+ ], tcl_cv_func_matherr=yes, tcl_cv_func_matherr=no))
+AC_MSG_RESULT($tcl_cv_func_matherr)
+if test $tcl_cv_func_matherr = yes; then
AC_DEFINE(NEED_MATHERR)
fi
@@ -318,10 +335,13 @@ AC_CHECK_FUNC(BSDgettimeofday,
AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)])
])
AC_MSG_CHECKING([for gettimeofday declaration])
-AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
- AC_MSG_RESULT(missing)
+AC_CACHE_VAL(tcl_cv_grep_gettimeofday,
+ AC_EGREP_HEADER(gettimeofday, sys/time.h,
+ tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing))
+AC_MSG_RESULT($tcl_cv_grep_gettimeofday)
+if test $tcl_cv_grep_gettimeofday = missing ; then
AC_DEFINE(GETTOD_NOT_DECLARED)
-])
+fi
#--------------------------------------------------------------------
# The following code checks to see whether it is possible to get
@@ -331,12 +351,13 @@ AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
AC_C_CHAR_UNSIGNED
AC_MSG_CHECKING([signed char declarations])
-AC_TRY_COMPILE(, [
-signed char *p;
-p = 0;
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = yes; then
+AC_CACHE_VAL(tcl_cv_char_signed,
+ AC_TRY_COMPILE(, [
+ signed char *p;
+ p = 0;
+ ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no))
+AC_MSG_RESULT($tcl_cv_char_signed)
+if test $tcl_cv_char_signed = yes; then
AC_DEFINE(HAVE_SIGNED_CHAR)
fi
@@ -552,6 +573,8 @@ AC_SUBST(TCL_SHARED_LIB_SUFFIX)
AC_SUBST(TCL_SHLIB_CFLAGS)
AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
+AC_SUBST(TCL_HAS_LONGLONG)
+
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_STUB_LIB)
AC_SUBST(BUILD_DLTEST)
diff --git a/unix/mkLinks b/unix/mkLinks
index 1cdd758..8cd932a 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -254,13 +254,17 @@ if test -r CrtObjCmd.3; then
rm -f Tcl_DeleteCommand.3
rm -f Tcl_DeleteCommandFromToken.3
rm -f Tcl_GetCommandInfo.3
+ rm -f Tcl_GetCommandInfoFromToken.3
rm -f Tcl_SetCommandInfo.3
+ rm -f Tcl_SetCommandInfoFromToken.3
rm -f Tcl_GetCommandName.3
ln CrtObjCmd.3 Tcl_CreateObjCommand.3
ln CrtObjCmd.3 Tcl_DeleteCommand.3
ln CrtObjCmd.3 Tcl_DeleteCommandFromToken.3
ln CrtObjCmd.3 Tcl_GetCommandInfo.3
+ ln CrtObjCmd.3 Tcl_GetCommandInfoFromToken.3
ln CrtObjCmd.3 Tcl_SetCommandInfo.3
+ ln CrtObjCmd.3 Tcl_SetCommandInfoFromToken.3
ln CrtObjCmd.3 Tcl_GetCommandName.3
fi
if test -r CrtSlave.3; then
@@ -297,8 +301,10 @@ if test -r CrtTimerHdlr.3; then
fi
if test -r CrtTrace.3; then
rm -f Tcl_CreateTrace.3
+ rm -f Tcl_CreateObjTrace.3
rm -f Tcl_DeleteTrace.3
ln CrtTrace.3 Tcl_CreateTrace.3
+ ln CrtTrace.3 Tcl_CreateObjTrace.3
ln CrtTrace.3 Tcl_DeleteTrace.3
fi
if test -r DString.3; then
@@ -494,6 +500,7 @@ if test -r FileSystem.3; then
rm -f Tcl_FSNewNativePath.3
rm -f Tcl_FSGetNativePath.3
rm -f Tcl_FSFileSystemInfo.3
+ rm -f Tcl_AllocStatBuf.3
ln FileSystem.3 Tcl_FSRegister.3
ln FileSystem.3 Tcl_FSUnregister.3
ln FileSystem.3 Tcl_FSData.3
@@ -534,6 +541,7 @@ if test -r FileSystem.3; then
ln FileSystem.3 Tcl_FSNewNativePath.3
ln FileSystem.3 Tcl_FSGetNativePath.3
ln FileSystem.3 Tcl_FSFileSystemInfo.3
+ ln FileSystem.3 Tcl_AllocStatBuf.3
fi
if test -r FindExec.3; then
rm -f Tcl_FindExecutable.3
@@ -622,16 +630,22 @@ fi
if test -r IntObj.3; then
rm -f Tcl_NewIntObj.3
rm -f Tcl_NewLongObj.3
+ rm -f Tcl_NewWideIntObj.3
rm -f Tcl_SetIntObj.3
rm -f Tcl_SetLongObj.3
+ rm -f Tcl_SetWideIntObj.3
rm -f Tcl_GetIntFromObj.3
rm -f Tcl_GetLongFromObj.3
+ rm -f Tcl_GetWideIntFromObj.3
ln IntObj.3 Tcl_NewIntObj.3
ln IntObj.3 Tcl_NewLongObj.3
+ ln IntObj.3 Tcl_NewWideIntObj.3
ln IntObj.3 Tcl_SetIntObj.3
ln IntObj.3 Tcl_SetLongObj.3
+ ln IntObj.3 Tcl_SetWideIntObj.3
ln IntObj.3 Tcl_GetIntFromObj.3
ln IntObj.3 Tcl_GetLongFromObj.3
+ ln IntObj.3 Tcl_GetWideIntFromObj.3
fi
if test -r Interp.3; then
rm -f Tcl_Interp.3
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 638c21c..63da87b 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1422,7 +1422,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
#
# Determine which interface to use to talk to the serial port.
# Note that #include lines must begin in leftmost column for
-# some compilers to recognize them as preprocessor directives.
+# some compilers to recognize them as preprocessor directives,
+# and some build environments have stdin not pointing at a
+# pseudo-terminal (usually /dev/null instead.)
#
# Arguments:
# none
@@ -1438,12 +1440,11 @@ dnl AC_CHECK_TOOL(AR, ar, :)
AC_DEFUN(SC_SERIAL_PORT, [
AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-
+ AC_CACHE_VAL(tcl_cv_api_serial, [
AC_TRY_RUN([
#include <termios.h>
-main()
-{
+int main() {
struct termios t;
if (tcgetattr(0, &t) == 0) {
cfsetospeed(&t, 0);
@@ -1451,32 +1452,25 @@ main()
return 0;
}
return 1;
-}], tk_ok=termios, tk_ok=no, tk_ok=no)
-
- if test $tk_ok = termios; then
- AC_DEFINE(USE_TERMIOS)
- else
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ if test $tcl_cv_api_serial = no ; then
AC_TRY_RUN([
#include <termio.h>
-main()
-{
+int main() {
struct termio t;
if (ioctl(0, TCGETA, &t) == 0) {
t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
return 0;
}
return 1;
- }], tk_ok=termio, tk_ok=no, tk_ok=no)
-
- if test $tk_ok = termio; then
- AC_DEFINE(USE_TERMIO)
- else
+}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no ; then
AC_TRY_RUN([
#include <sgtty.h>
-main()
-{
+int main() {
struct sgttyb t;
if (ioctl(0, TIOCGETP, &t) == 0) {
t.sg_ospeed = 0;
@@ -1484,17 +1478,14 @@ main()
return 0;
}
return 1;
-}], tk_ok=sgtty, tk_ok=none, tk_ok=none)
-
- if test $tk_ok = sgtty; then
- AC_DEFINE(USE_SGTTY)
- else
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi
+ if test $tcl_cv_api_serial = no ; then
AC_TRY_RUN([
#include <termios.h>
#include <errno.h>
-main()
-{
+int main() {
struct termios t;
if (tcgetattr(0, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -1503,17 +1494,14 @@ main()
return 0;
}
return 1;
-}], tk_ok=termios, tk_ok=no, tk_ok=no)
-
- if test $tk_ok = termios; then
- AC_DEFINE(USE_TERMIOS)
- else
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
AC_TRY_RUN([
#include <termio.h>
#include <errno.h>
-main()
-{
+int main() {
struct termio t;
if (ioctl(0, TCGETA, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -1521,17 +1509,14 @@ main()
return 0;
}
return 1;
- }], tk_ok=termio, tk_ok=no, tk_ok=no)
-
- if test $tk_ok = termio; then
- AC_DEFINE(USE_TERMIO)
- else
+ }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
AC_TRY_RUN([
#include <sgtty.h>
#include <errno.h>
-main()
-{
+int main() {
struct sgttyb t;
if (ioctl(0, TIOCGETP, &t) == 0
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
@@ -1540,17 +1525,14 @@ main()
return 0;
}
return 1;
-}], tk_ok=sgtty, tk_ok=none, tk_ok=none)
-
- if test $tk_ok = sgtty; then
- AC_DEFINE(USE_SGTTY)
- fi
- fi
- fi
- fi
- fi
- fi
- AC_MSG_RESULT($tk_ok)
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi])
+ case $tcl_cv_api_serial in
+ termios) AC_DEFINE(USE_TERMIOS);;
+ termio) AC_DEFINE(USE_TERMIO);;
+ sgtty) AC_DEFINE(USE_SGTTY);;
+ esac
+ AC_MSG_RESULT($tcl_cv_api_serial)
])
#--------------------------------------------------------------------
@@ -1824,46 +1806,53 @@ AC_DEFUN(SC_TIME_HANDLER, [
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)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
+ AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
+ AC_MSG_RESULT($tcl_cv_member_tm_tzadj)
+ if test $tcl_cv_member_tm_tzadj = yes ; then
+ AC_DEFINE(HAVE_TM_TZADJ)
+ fi
AC_MSG_CHECKING([tm_gmtoff in struct tm])
- AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
- [AC_DEFINE(HAVE_TM_GMTOFF)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
+ AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
+ AC_MSG_RESULT($tcl_cv_member_tm_gmtoff)
+ if test $tcl_cv_member_tm_gmtoff = yes ; then
+ AC_DEFINE(HAVE_TM_GMTOFF)
+ fi
#
# Its important to include time.h in this check, as some systems
# (like convex) have timezone functions, etc.
#
- have_timezone=no
AC_MSG_CHECKING([long timezone variable])
- AC_TRY_COMPILE([#include <time.h>],
+ AC_CACHE_VAL(tcl_cv_var_timezone,
+ AC_TRY_COMPILE([#include <time.h>],
[extern long timezone;
timezone += 1;
exit (0);],
- [have_timezone=yes
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
+ AC_MSG_RESULT($tcl_cv_timezone_long)
+ if test $tcl_cv_timezone_long = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR)
+ else
+ #
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ AC_MSG_CHECKING([time_t timezone variable])
+ AC_CACHE_VAL(tcl_cv_timezone_time,
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
+ AC_MSG_RESULT($tcl_cv_timezone_time)
+ if test $tcl_cv_timezone_time = yes ; then
AC_DEFINE(HAVE_TIMEZONE_VAR)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
-
- #
- # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
- #
- if test "$have_timezone" = no; then
- AC_MSG_CHECKING([time_t timezone variable])
- AC_TRY_COMPILE([#include <time.h>],
- [extern time_t timezone;
- timezone += 1;
- exit (0);],
- [AC_DEFINE(HAVE_TIMEZONE_VAR)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
+ fi
fi
-
])
#--------------------------------------------------------------------
@@ -2002,3 +1991,110 @@ AC_DEFUN(SC_TCL_LINK_LIBS, [
AC_SUBST(TCL_LIBS)
AC_SUBST(MATH_LIBS)
])
+
+#--------------------------------------------------------------------
+# SC_TCL_EARLY_FLAGS
+#
+# Check for what flags are needed to be passed so the correct OS
+# features are available.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# _ISOC99_SOURCE
+# _LARGEFILE64_SOURCE
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(SC_TCL_EARLY_FLAG,[
+ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
+ AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
+ AC_TRY_COMPILE([[#define ]$1[ 1
+]$2], $3,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
+ if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
+ AC_DEFINE($1)
+ tcl_flags="$tcl_flags $1"
+ fi])
+
+AC_DEFUN(SC_TCL_EARLY_FLAGS,[
+ AC_MSG_CHECKING([for required early compiler flags])
+ tcl_flags=""
+ SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
+ [char *p = (char *)strtoll; char *q = (char *)strtoull;])
+ SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
+ if test "x${tcl_flags}" = "x" ; then
+ AC_MSG_RESULT(none)
+ else
+ AC_MSG_RESULT(${tcl_flags})
+ fi])
+
+#--------------------------------------------------------------------
+# SC_TCL_64BIT_FLAGS
+#
+# Check for what is defined in the way of 64-bit features.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# TCL_WIDE_INT_IS_LONG
+# TCL_WIDE_INT_TYPE
+# HAVE_STRUCT_DIRENT64
+# HAVE_STRUCT_STAT64
+# HAVE_TYPE_OFF64_T
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(SC_TCL_64BIT_FLAGS, [
+ AC_MSG_CHECKING([for 64-bit integer type])
+ AC_CACHE_VAL(tcl_cv_type_64bit,[
+ AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
+ tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
+ AC_TRY_RUN([#include <unistd.h>
+ int main() {exit(!(sizeof(long long) > sizeof(long)));}
+ ], tcl_cv_type_64bit="long long"))])
+ if test "${tcl_cv_type_64bit}" = none ; then
+ AC_MSG_RESULT(using long)
+ else
+ AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
+ AC_MSG_RESULT(${tcl_cv_type_64bit})
+
+ # Now check for auxiliary declarations
+ AC_MSG_CHECKING([for struct dirent64])
+ AC_CACHE_VAL(tcl_cv_struct_dirent64,[
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/dirent.h>],[struct dirent64 p;],
+ tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_DIRENT64)
+ fi
+ AC_MSG_RESULT(${tcl_cv_struct_dirent64})
+
+ AC_MSG_CHECKING([for struct stat64])
+ AC_CACHE_VAL(tcl_cv_struct_stat64,[
+ AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
+],
+ tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_STAT64)
+ fi
+ AC_MSG_RESULT(${tcl_cv_struct_stat64})
+
+ AC_MSG_CHECKING([for off64_t])
+ AC_CACHE_VAL(tcl_cv_type_off64_t,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
+],
+ tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ AC_DEFINE(HAVE_TYPE_OFF64_T)
+ fi
+ AC_MSG_RESULT(${tcl_cv_type_off64_t})
+ fi])
diff --git a/unix/tclLoadAout.c b/unix/tclLoadAout.c
index b9ad4b9..afd956c 100644
--- a/unix/tclLoadAout.c
+++ b/unix/tclLoadAout.c
@@ -14,7 +14,7 @@
* and Design Engineering (MADE) Initiative through ARPA contract
* F33615-94-C-4400.
*
- * RCS: @(#) $Id: tclLoadAout.c,v 1.9 2002/01/09 19:09:28 kennykb Exp $
+ * RCS: @(#) $Id: tclLoadAout.c,v 1.10 2002/02/15 14:28:50 dkf Exp $
*/
#include "tclInt.h"
@@ -268,7 +268,14 @@ TclpLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr,
(void) brk (startAddress + relocatedSize);
- /* Seek to the start of the module's text */
+ /*
+ * Seek to the start of the module's text.
+ *
+ * Note that this does not really work with large files (i.e. where
+ * lseek64 exists and is different to lseek), but anyone trying to
+ * dynamically load a binary that is larger than what can fit in
+ * addressable memory is in trouble anyway...
+ */
#if defined(__mips) || defined(mips)
status = lseek (relocatedFd,
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index aa11fcf..19cbbba 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.28 2002/02/04 23:51:59 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.29 2002/02/15 14:28:50 dkf Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -191,8 +191,8 @@ static int FileInputProc _ANSI_ARGS_((ClientData instanceData,
static int FileOutputProc _ANSI_ARGS_((
ClientData instanceData, CONST char *buf,
int toWrite, int *errorCode));
-static int FileSeekProc _ANSI_ARGS_((ClientData instanceData,
- long offset, int mode, int *errorCode));
+static Tcl_WideInt FileSeekProc _ANSI_ARGS_((ClientData instanceData,
+ Tcl_WideInt offset, int mode, int *errorCode));
static void FileWatchProc _ANSI_ARGS_((ClientData instanceData,
int mask));
static void TcpAccept _ANSI_ARGS_((ClientData data, int mask));
@@ -522,10 +522,10 @@ FileCloseProc(instanceData, interp)
*----------------------------------------------------------------------
*/
-static int
+static Tcl_WideInt
FileSeekProc(instanceData, offset, mode, errorCodePtr)
ClientData instanceData; /* File state. */
- long offset; /* Offset to seek to. */
+ Tcl_WideInt offset; /* Offset to seek to. */
int mode; /* Relative to where
* should we seek? Can be
* one of SEEK_START,
@@ -533,9 +533,9 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
int *errorCodePtr; /* To store error code. */
{
FileState *fsPtr = (FileState *) instanceData;
- int newLoc;
+ Tcl_WideInt newLoc;
- newLoc = lseek(fsPtr->fd, (off_t) offset, mode);
+ newLoc = Tcl_PlatformSeek(fsPtr->fd, (Tcl_SeekOffset) offset, mode);
*errorCodePtr = (newLoc == -1) ? errno : 0;
return newLoc;
@@ -1350,7 +1350,7 @@ TclpOpenFileChannel(interp, pathPtr, modeString, permissions)
if (native == NULL) {
return NULL;
}
- fd = open(native, mode, permissions);
+ fd = Tcl_PlatformOpen(native, mode, permissions);
if (fd < 0) {
if (interp != (Tcl_Interp *) NULL) {
@@ -1402,7 +1402,8 @@ TclpOpenFileChannel(interp, pathPtr, modeString, permissions)
(ClientData) fsPtr, channelPermissions);
if (seekFlag) {
- if (Tcl_Seek(fsPtr->channel, 0, SEEK_END) < 0) {
+ if (Tcl_Seek(fsPtr->channel, (Tcl_WideInt)0,
+ SEEK_END) < (Tcl_WideInt)0) {
if (interp != (Tcl_Interp *) NULL) {
Tcl_AppendResult(interp, "couldn't seek to end of file on \"",
channelName, "\": ", Tcl_PosixError(interp), NULL);
@@ -2521,8 +2522,8 @@ TclpGetDefaultStdChannel(type)
switch (type) {
case TCL_STDIN:
- if ((lseek(0, (off_t) 0, SEEK_CUR) == -1) &&
- (errno == EBADF)) {
+ if ((Tcl_PlatformSeek(0, (Tcl_SeekOffset) 0,
+ SEEK_CUR) == (Tcl_SeekOffset)-1) && (errno == EBADF)) {
return (Tcl_Channel) NULL;
}
fd = 0;
@@ -2530,8 +2531,8 @@ TclpGetDefaultStdChannel(type)
bufMode = "line";
break;
case TCL_STDOUT:
- if ((lseek(1, (off_t) 0, SEEK_CUR) == -1) &&
- (errno == EBADF)) {
+ if ((Tcl_PlatformSeek(1, (Tcl_SeekOffset) 0,
+ SEEK_CUR) == (Tcl_SeekOffset)-1) && (errno == EBADF)) {
return (Tcl_Channel) NULL;
}
fd = 1;
@@ -2539,8 +2540,8 @@ TclpGetDefaultStdChannel(type)
bufMode = "line";
break;
case TCL_STDERR:
- if ((lseek(2, (off_t) 0, SEEK_CUR) == -1) &&
- (errno == EBADF)) {
+ if ((Tcl_PlatformSeek(2, (Tcl_SeekOffset) 0,
+ SEEK_CUR) == (Tcl_SeekOffset)-1) && (errno == EBADF)) {
return (Tcl_Channel) NULL;
}
fd = 2;
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 768798e..80383d8 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFCmd.c,v 1.16 2002/02/12 14:24:27 davygrvy Exp $
+ * RCS: @(#) $Id: tclUnixFCmd.c,v 1.17 2002/02/15 14:28:50 dkf Exp $
*
* Portions of this code were derived from NetBSD source code which has
* the following copyright notice:
@@ -97,7 +97,7 @@ static int GetModeFromPermString _ANSI_ARGS_((
*/
typedef int (TraversalProc) _ANSI_ARGS_((Tcl_DString *srcPtr,
- Tcl_DString *dstPtr, CONST struct stat *statBufPtr, int type,
+ Tcl_DString *dstPtr, CONST Tcl_StatBuf *statBufPtr, int type,
Tcl_DString *errorPtr));
/*
@@ -128,9 +128,9 @@ CONST TclFileAttrProcs tclpFileAttrProcs[] = {
*/
static int CopyFile _ANSI_ARGS_((CONST char *src,
- CONST char *dst, CONST struct stat *statBufPtr));
+ CONST char *dst, CONST Tcl_StatBuf *statBufPtr));
static int CopyFileAtts _ANSI_ARGS_((CONST char *src,
- CONST char *dst, CONST struct stat *statBufPtr));
+ CONST char *dst, CONST Tcl_StatBuf *statBufPtr));
static int DoCopyFile _ANSI_ARGS_((CONST char *srcPtr,
CONST char *dstPtr));
static int DoCreateDirectory _ANSI_ARGS_((CONST char *pathPtr));
@@ -140,10 +140,10 @@ static int DoRemoveDirectory _ANSI_ARGS_((Tcl_DString *pathPtr,
static int DoRenameFile _ANSI_ARGS_((CONST char *src,
CONST char *dst));
static int TraversalCopy _ANSI_ARGS_((Tcl_DString *srcPtr,
- Tcl_DString *dstPtr, CONST struct stat *statBufPtr,
+ Tcl_DString *dstPtr, CONST Tcl_StatBuf *statBufPtr,
int type, Tcl_DString *errorPtr));
static int TraversalDelete _ANSI_ARGS_((Tcl_DString *srcPtr,
- Tcl_DString *dstPtr, CONST struct stat *statBufPtr,
+ Tcl_DString *dstPtr, CONST Tcl_StatBuf *statBufPtr,
int type, Tcl_DString *errorPtr));
static int TraverseUnixTree _ANSI_ARGS_((
TraversalProc *traversalProc,
@@ -230,7 +230,7 @@ DoRenameFile(src, dst)
if (errno == EINVAL) {
char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN];
DIR *dirPtr;
- struct dirent *dirEntPtr;
+ Tcl_DirEntry *dirEntPtr;
if ((realpath((char *) src, srcPath) != NULL) /* INTL: Native. */
&& (realpath((char *) dst, dstPath) != NULL) /* INTL: Native. */
@@ -238,7 +238,7 @@ DoRenameFile(src, dst)
dirPtr = opendir(dst); /* INTL: Native. */
if (dirPtr != NULL) {
while (1) {
- dirEntPtr = readdir(dirPtr); /* INTL: Native. */
+ dirEntPtr = Tcl_PlatformReaddir(dirPtr); /* INTL: Native. */
if (dirEntPtr == NULL) {
break;
}
@@ -317,13 +317,13 @@ DoCopyFile(src, dst)
CONST char *src; /* Pathname of file to be copied (native). */
CONST char *dst; /* Pathname of file to copy to (native). */
{
- struct stat srcStatBuf, dstStatBuf;
+ Tcl_StatBuf srcStatBuf, dstStatBuf;
/*
* Have to do a stat() to determine the filetype.
*/
- if (lstat(src, &srcStatBuf) != 0) { /* INTL: Native. */
+ if (Tcl_PlatformLStat(src, &srcStatBuf) != 0) { /* INTL: Native. */
return TCL_ERROR;
}
if (S_ISDIR(srcStatBuf.st_mode)) {
@@ -336,7 +336,7 @@ DoCopyFile(src, dst)
* exists, so we remove it first
*/
- if (lstat(dst, &dstStatBuf) == 0) { /* INTL: Native. */
+ if (Tcl_PlatformLStat(dst, &dstStatBuf) == 0) { /* INTL: Native. */
if (S_ISDIR(dstStatBuf.st_mode)) {
errno = EISDIR;
return TCL_ERROR;
@@ -408,7 +408,7 @@ CopyFile(src, dst, statBufPtr)
CONST char *src; /* Pathname of file to copy (native). */
CONST char *dst; /* Pathname of file to create/overwrite
* (native). */
- CONST struct stat *statBufPtr;
+ CONST Tcl_StatBuf *statBufPtr;
/* Used to determine mode and blocksize. */
{
int srcFd;
@@ -417,12 +417,12 @@ CopyFile(src, dst, statBufPtr)
char *buffer; /* Data buffer for copy */
size_t nread;
- if ((srcFd = open(src, O_RDONLY, 0)) < 0) { /* INTL: Native. */
+ if ((srcFd = Tcl_PlatformOpen(src, O_RDONLY, 0)) < 0) { /* INTL: Native. */
return TCL_ERROR;
}
- dstFd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, /* INTL: Native. */
- statBufPtr->st_mode);
+ dstFd = Tcl_PlatformOpen(dst, /* INTL: Native. */
+ O_CREAT | O_TRUNC | O_WRONLY, statBufPtr->st_mode);
if (dstFd < 0) {
close(srcFd);
return TCL_ERROR;
@@ -694,10 +694,10 @@ DoRemoveDirectory(pathPtr, recursive, errorPtr)
if (recursive != 0) {
/* We should try to change permissions so this can be deleted */
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
int newPerm;
- if (stat(path, &statBuf) == 0) {
+ if (Tcl_PlatformStat(path, &statBuf) == 0) {
oldPerm = (mode_t) (statBuf.st_mode & 0x00007FFF);
}
@@ -770,11 +770,11 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr)
* DString filled with UTF-8 name of file
* causing error. */
{
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
CONST char *source, *errfile;
int result, sourceLen;
int targetLen;
- struct dirent *dirEntPtr;
+ Tcl_DirEntry *dirEntPtr;
DIR *dirPtr;
errfile = NULL;
@@ -782,7 +782,7 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr)
targetLen = 0; /* lint. */
source = Tcl_DStringValue(sourcePtr);
- if (lstat(source, &statBuf) != 0) { /* INTL: Native. */
+ if (Tcl_PlatformLStat(source, &statBuf) != 0) { /* INTL: Native. */
errfile = source;
goto end;
}
@@ -818,7 +818,7 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr)
targetLen = Tcl_DStringLength(targetPtr);
}
- while ((dirEntPtr = readdir(dirPtr)) != NULL) { /* INTL: Native. */
+ while ((dirEntPtr = Tcl_PlatformReaddir(dirPtr)) != NULL) { /* INTL: Native. */
if ((strcmp(dirEntPtr->d_name, ".") == 0)
|| (strcmp(dirEntPtr->d_name, "..") == 0)) {
continue;
@@ -900,7 +900,7 @@ static int
TraversalCopy(srcPtr, dstPtr, statBufPtr, type, errorPtr)
Tcl_DString *srcPtr; /* Source pathname to copy (native). */
Tcl_DString *dstPtr; /* Destination pathname of copy (native). */
- CONST struct stat *statBufPtr;
+ CONST Tcl_StatBuf *statBufPtr;
/* Stat info for file specified by srcPtr. */
int type; /* Reason for call - see TraverseUnixTree(). */
Tcl_DString *errorPtr; /* If non-NULL, uninitialized or free
@@ -965,7 +965,7 @@ static int
TraversalDelete(srcPtr, ignore, statBufPtr, type, errorPtr)
Tcl_DString *srcPtr; /* Source pathname (native). */
Tcl_DString *ignore; /* Destination pathname (not used). */
- CONST struct stat *statBufPtr;
+ CONST Tcl_StatBuf *statBufPtr;
/* Stat info for file specified by srcPtr. */
int type; /* Reason for call - see TraverseUnixTree(). */
Tcl_DString *errorPtr; /* If non-NULL, uninitialized or free
@@ -1019,7 +1019,7 @@ static int
CopyFileAtts(src, dst, statBufPtr)
CONST char *src; /* Path name of source file (native). */
CONST char *dst; /* Path name of target file (native). */
- CONST struct stat *statBufPtr;
+ CONST Tcl_StatBuf *statBufPtr;
/* Stat info for source file */
{
struct utimbuf tval;
@@ -1078,7 +1078,7 @@ GetGroupAttribute(interp, objIndex, fileName, attributePtrPtr)
Tcl_Obj *fileName; /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr; /* A pointer to return the object with. */
{
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
struct group *groupPtr;
int result;
@@ -1130,7 +1130,7 @@ GetOwnerAttribute(interp, objIndex, fileName, attributePtrPtr)
Tcl_Obj *fileName; /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr; /* A pointer to return the object with. */
{
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
struct passwd *pwPtr;
int result;
@@ -1182,7 +1182,7 @@ GetPermissionsAttribute(interp, objIndex, fileName, attributePtrPtr)
Tcl_Obj *fileName; /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr; /* A pointer to return the object with. */
{
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
char returnString[7];
int result;
@@ -1360,7 +1360,7 @@ SetPermissionsAttribute(interp, objIndex, fileName, attributePtr)
if (Tcl_GetLongFromObj(NULL, attributePtr, &mode) == TCL_OK) {
newMode = (mode_t) (mode & 0x00007FFF);
} else {
- struct stat buf;
+ Tcl_StatBuf buf;
char *modeStringPtr = Tcl_GetString(attributePtr);
/*
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 2c1fb87..99a0731 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFile.c,v 1.17 2002/02/12 14:26:05 davygrvy Exp $
+ * RCS: @(#) $Id: tclUnixFile.c,v 1.18 2002/02/15 14:28:50 dkf Exp $
*/
#include "tclInt.h"
@@ -46,8 +46,7 @@ TclpFindExecutable(argv0)
* (native). */
{
CONST char *name, *p;
-
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
int length;
Tcl_DString buffer, nameString;
@@ -117,8 +116,8 @@ TclpFindExecutable(argv0)
* strings directly.
*/
- if ((access(name, X_OK) == 0) /* INTL: Native. */
- && (stat(name, &statBuf) == 0) /* INTL: Native. */
+ if ((access(name, X_OK) == 0) /* INTL: Native. */
+ && (Tcl_PlatformStat(name, &statBuf) == 0) /* INTL: Native. */
&& S_ISREG(statBuf.st_mode)) {
goto gotName;
}
@@ -209,7 +208,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
CONST char *native, *fname, *dirName;
DIR *d;
Tcl_DString ds;
- struct stat statBuf;
+ Tcl_StatBuf statBuf;
int matchHidden;
int nativeDirLen;
int result = TCL_OK;
@@ -261,7 +260,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
native = Tcl_UtfToExternalDString(NULL, dirName, -1, &ds);
- if ((stat(native, &statBuf) != 0) /* INTL: UTF-8. */
+ if ((Tcl_PlatformStat(native, &statBuf) != 0) /* INTL: UTF-8. */
|| !S_ISDIR(statBuf.st_mode)) {
Tcl_DStringFree(&dsOrig);
Tcl_DStringFree(&ds);
@@ -299,9 +298,9 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
while (1) {
Tcl_DString utfDs;
CONST char *utf;
- struct dirent *entryPtr;
+ Tcl_DirEntry *entryPtr;
- entryPtr = readdir(d); /* INTL: Native. */
+ entryPtr = Tcl_PlatformReaddir(d); /* INTL: Native. */
if (entryPtr == NULL) {
break;
}
@@ -334,7 +333,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
Tcl_DStringAppend(&dsOrig, utf, -1);
fname = Tcl_DStringValue(&dsOrig);
if (types != NULL) {
- struct stat buf;
+ Tcl_StatBuf buf;
char *nativeEntry;
Tcl_DStringSetLength(&ds, nativeDirLen);
nativeEntry = Tcl_DStringAppend(&ds, entryPtr->d_name, -1);
@@ -344,7 +343,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
*/
if (types->perm != 0) {
- if (stat(nativeEntry, &buf) != 0) {
+ if (Tcl_PlatformStat(nativeEntry, &buf) != 0) {
/*
* Either the file has disappeared between the
* 'readdir' call and the 'stat' call, or
@@ -379,7 +378,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
if (typeOk && (types->type != 0)) {
if (types->perm == 0) {
/* We haven't yet done a stat on the file */
- if (stat(nativeEntry, &buf) != 0) {
+ if (Tcl_PlatformStat(nativeEntry, &buf) != 0) {
/* Posix error occurred */
typeOk = 0;
}
@@ -408,12 +407,10 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
} else {
typeOk = 0;
#ifdef S_ISLNK
- if (types->type & TCL_GLOB_TYPE_LINK) {
- if (lstat(nativeEntry, &buf) == 0) {
- if (S_ISLNK(buf.st_mode)) {
- typeOk = 1;
- }
- }
+ if ((types->type & TCL_GLOB_TYPE_LINK)
+ && Tcl_PlatformLStat(nativeEntry, &buf)==0
+ && S_ISLNK(buf.st_mode)) {
+ typeOk = 1;
}
#endif
}
@@ -554,13 +551,13 @@ TclpObjChdir(pathPtr)
int
TclpObjLstat(pathPtr, bufPtr)
Tcl_Obj *pathPtr; /* Path of file to stat */
- struct stat *bufPtr; /* Filled with results of stat call. */
+ Tcl_StatBuf *bufPtr; /* Filled with results of stat call. */
{
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
- return lstat(path, bufPtr);
+ return Tcl_PlatformLStat(path, bufPtr);
}
}
@@ -690,13 +687,13 @@ TclpReadlink(path, linkPtr)
int
TclpObjStat(pathPtr, bufPtr)
Tcl_Obj *pathPtr; /* Path of file to stat */
- struct stat *bufPtr; /* Filled with results of stat call. */
+ Tcl_StatBuf *bufPtr; /* Filled with results of stat call. */
{
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
- return stat(path, bufPtr);
+ return Tcl_PlatformStat(path, bufPtr);
}
}
@@ -740,6 +737,3 @@ TclpObjLink(pathPtr, toPtr)
}
#endif
-
-
-
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index a7facd6..f3f67f5 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPipe.c,v 1.20 2002/02/08 02:52:54 dgp Exp $
+ * RCS: @(#) $Id: tclUnixPipe.c,v 1.21 2002/02/15 14:28:50 dkf Exp $
*/
#include "tclInt.h"
@@ -140,7 +140,7 @@ TclpOpenFile(fname, mode)
Tcl_DString ds;
native = Tcl_UtfToExternalDString(NULL, fname, -1, &ds);
- fd = open(native, mode, 0666); /* INTL: Native. */
+ fd = Tcl_PlatformOpen(native, mode, 0666); /* INTL: Native. */
Tcl_DStringFree(&ds);
if (fd != -1) {
fcntl(fd, F_SETFD, FD_CLOEXEC);
@@ -151,7 +151,7 @@ TclpOpenFile(fname, mode)
*/
if (mode & O_WRONLY) {
- lseek(fd, (off_t) 0, SEEK_END);
+ Tcl_PlatformSeek(fd, (Tcl_SeekOffset) 0, SEEK_END);
}
/*
@@ -215,7 +215,7 @@ TclpCreateTempFile(contents)
return NULL;
}
Tcl_DStringFree(&dstring);
- lseek(fd, (off_t) 0, SEEK_SET);
+ Tcl_PlatformSeek(fd, (Tcl_SeekOffset) 0, SEEK_SET);
}
return MakeFile(fd);
}
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index f37d272..5b3b160 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPort.h,v 1.20 2002/02/12 14:39:48 davygrvy Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.21 2002/02/15 14:28:50 dkf Exp $
*/
#ifndef _TCLUNIXPORT
@@ -56,6 +56,35 @@
# include <dirent.h>
#endif
#endif
+
+#ifdef HAVE_STRUCT_DIRENT64
+typedef struct dirent64 Tcl_DirEntry;
+# define Tcl_PlatformReaddir readdir64
+# define Tcl_PlatformReaddir_r readdir64_r
+#else
+typedef struct dirent Tcl_DirEntry;
+# define Tcl_PlatformReaddir readdir
+# define Tcl_PlatformReaddir_r readdir_r
+#endif
+
+#ifdef HAVE_TYPE_OFF64_T
+typedef off64_t Tcl_SeekOffset;
+# define Tcl_PlatformSeek lseek64
+# define Tcl_PlatformOpen open64
+#else
+typedef off_t Tcl_SeekOffset;
+# define Tcl_PlatformSeek lseek
+# define Tcl_PlatformOpen open
+#endif
+
+#ifdef HAVE_STRUCT_STAT64
+# define Tcl_PlatformStat stat64
+# define Tcl_PlatformLStat lstat64
+#else
+# define Tcl_PlatformStat stat
+# define Tcl_PlatformLStat lstat
+#endif
+
#include <sys/file.h>
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
@@ -501,7 +530,7 @@ typedef pthread_mutex_t TclpMutex;
EXTERN void TclpMutexInit _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void TclpMutexLock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void TclpMutexUnlock _ANSI_ARGS_((TclpMutex *mPtr));
-EXTERN struct dirent * TclpReaddir(DIR *);
+EXTERN Tcl_DirEntry * TclpReaddir(DIR *);
EXTERN struct tm * TclpLocaltime(time_t *);
EXTERN struct tm * TclpGmtime(time_t *);
EXTERN char * TclpInetNtoa(struct in_addr);
@@ -509,6 +538,8 @@ EXTERN char * TclpInetNtoa(struct in_addr);
#define localtime(x) TclpLocaltime(x)
#define gmtime(x) TclpGmtime(x)
#define inet_ntoa(x) TclpInetNtoa(x)
+#undef Tcl_PlatformReaddir
+#define Tcl_PlatformReaddir(x) TclpReaddir(x)
#else
typedef int TclpMutex;
#define TclpMutexInit(a)
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 5086b2d..82b4d24 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -24,7 +24,7 @@ typedef struct ThreadSpecificData {
struct tm gtbuf;
struct tm ltbuf;
struct {
- struct dirent ent;
+ Tcl_DirEntry ent;
char name[PATH_MAX+1];
} rdbuf;
} ThreadSpecificData;
@@ -790,14 +790,14 @@ TclpFinalizeCondition(condPtr)
*----------------------------------------------------------------------
*/
-struct dirent *
+Tcl_DirEntry *
TclpReaddir(DIR * dir)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- struct dirent *ent;
+ Tcl_DirEntry *ent;
ent = &tsdPtr->rdbuf.ent;
- if (readdir_r(dir, ent, &ent) != 0) {
+ if (Tcl_PlatformReaddir_r(dir, ent, &ent) != 0) {
ent = NULL;
}
return ent;