summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2023-06-27 15:26:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2023-06-27 15:26:00 (GMT)
commitb500985e25c71d8b419bbae2246fcc07df1b4532 (patch)
treee914008008965e60b757f06ebf196e47b4c1adf2 /unix
parent630e9dd05304c35030985547ccf0aef934647a47 (diff)
parentd273c052a59ec196e09cf2f9b87d466ed08d6b2e (diff)
downloadtcl-b500985e25c71d8b419bbae2246fcc07df1b4532.zip
tcl-b500985e25c71d8b419bbae2246fcc07df1b4532.tar.gz
tcl-b500985e25c71d8b419bbae2246fcc07df1b4532.tar.bz2
merge trunk
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in17
-rwxr-xr-xunix/configure435
-rw-r--r--unix/configure.ac38
-rw-r--r--unix/tcl.m436
-rw-r--r--unix/tclConfig.h.in18
-rw-r--r--unix/tclUnixPort.h17
6 files changed, 55 insertions, 506 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index e7dee7a..eaca5bc 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -279,7 +279,7 @@ VALGRINDARGS = --tool=memcheck --num-callers=24 \
STUB_CC_SWITCHES = -I"${BUILD_DIR}" -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \
${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
${AC_FLAGS} ${ENV_FLAGS} ${EXTRA_CFLAGS} @EXTRA_CC_SWITCHES@ \
- ${NO_DEPRECATED_FLAGS} -DMP_FIXED_CUTOFFS -DMP_NO_STDINT
+ ${NO_DEPRECATED_FLAGS} -DMP_FIXED_CUTOFFS
CC_SWITCHES = $(STUB_CC_SWITCHES) -DBUILD_tcl
@@ -1885,27 +1885,12 @@ tclXtTest.o: $(UNIX_DIR)/tclXtTest.c
# relocatable.
#--------------------------------------------------------------------------
-opendir.o: $(COMPAT_DIR)/opendir.c
- $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/opendir.c
-
mkstemp.o: $(COMPAT_DIR)/mkstemp.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/mkstemp.c
-memcmp.o: $(COMPAT_DIR)/memcmp.c
- $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/memcmp.c
-
strncasecmp.o: $(COMPAT_DIR)/strncasecmp.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strncasecmp.c
-strstr.o: $(COMPAT_DIR)/strstr.c
- $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strstr.c
-
-strtol.o: $(COMPAT_DIR)/strtol.c
- $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtol.c
-
-strtoul.o: $(COMPAT_DIR)/strtoul.c
- $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoul.c
-
waitpid.o: $(COMPAT_DIR)/waitpid.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/waitpid.c
diff --git a/unix/configure b/unix/configure
index ff2e7b2..19c7deb 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1604,53 +1604,6 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
- }
-then :
- ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1722,6 +1675,53 @@ fi
} # ac_fn_c_try_cpp
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -4158,102 +4158,6 @@ printf "%s\n" "$ac_cv_path_EGREP" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
-printf %s "checking dirent.h... " >&6; }
-if test ${tcl_cv_dirent_h+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <dirent.h>
-int
-main (void)
-{
-
-#ifndef _POSIX_SOURCE
-# ifdef __Lynx__
- /*
- * Generate compilation error to make the test fail: Lynx headers
- * are only valid if really in the POSIX environment.
- */
-
- missing_procedure();
-# endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- tcl_cv_dirent_h=yes
-else $as_nop
- tcl_cv_dirent_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
-printf "%s\n" "$tcl_cv_dirent_h" >&6; }
-
- if test $tcl_cv_dirent_h = no; then
-
-printf "%s\n" "#define NO_DIRENT_H 1" >>confdefs.h
-
- fi
-
- ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes
-then :
- tcl_ok=1
-else $as_nop
- tcl_ok=0
-fi
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtol" >/dev/null 2>&1
-then :
-
-else $as_nop
- tcl_ok=0
-fi
-rm -rf conftest*
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtoul" >/dev/null 2>&1
-then :
-
-else $as_nop
- tcl_ok=0
-fi
-rm -rf conftest*
-
- if test $tcl_ok = 0; then
-
-printf "%s\n" "#define NO_STDLIB_H 1" >>confdefs.h
-
- fi
ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
if test "x$ac_cv_header_string_h" = xyes
then :
@@ -8120,32 +8024,6 @@ else $as_nop
esac
fi
-ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
-if test "x$ac_cv_func_opendir" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
-
-else $as_nop
- case " $LIBOBJS " in
- *" opendir.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS opendir.$ac_objext"
- ;;
-esac
-
-fi
-ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-if test "x$ac_cv_func_strtol" = xyes
-then :
- printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
-
-else $as_nop
- case " $LIBOBJS " in
- *" strtol.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
- ;;
-esac
-
-fi
ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
if test "x$ac_cv_func_waitpid" = xyes
then :
@@ -9537,77 +9415,6 @@ fi
#--------------------------------------------------------------------
-# Some system have no memcmp or it does not work with 8 bit data, this
-# checks it and add memcmp.o to LIBOBJS if needed
-#--------------------------------------------------------------------
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
-printf %s "checking for working memcmp... " >&6; }
-if test ${ac_cv_func_memcmp_working+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
-then :
- ac_cv_func_memcmp_working=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main (void)
-{
-
- /* Some versions of memcmp are not 8-bit clean. */
- char c0 = '\100', c1 = '\200', c2 = '\201';
- if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
- return 1;
-
- /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
- or more and with at least one buffer not starting on a 4-byte boundary.
- William Lewis provided this test program. */
- {
- char foo[21];
- char bar[21];
- int i;
- for (i = 0; i < 4; i++)
- {
- char *a = foo + i;
- char *b = bar + i;
- strcpy (a, "--------01111111");
- strcpy (b, "--------10000000");
- if (memcmp (a, b, 16) >= 0)
- return 1;
- }
- return 0;
- }
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
- ac_cv_func_memcmp_working=yes
-else $as_nop
- ac_cv_func_memcmp_working=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-printf "%s\n" "$ac_cv_func_memcmp_working" >&6; }
-test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
- *" memcmp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
- ;;
-esac
-
-
-
-#--------------------------------------------------------------------
# Some system like SunOS 4 and other BSD like systems have no memmove
# (we assume they have bcopy instead). {The replacement define is in
# compat/string.h}
@@ -9629,136 +9436,6 @@ fi
#--------------------------------------------------------------------
-# On some systems strstr is broken: it returns a pointer even if
-# the original string is empty.
-#--------------------------------------------------------------------
-
-
- ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
-if test "x$ac_cv_func_strstr" = xyes
-then :
- tcl_ok=1
-else $as_nop
- tcl_ok=0
-fi
-
- if test "$tcl_ok" = 1; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking proper strstr implementation" >&5
-printf %s "checking proper strstr implementation... " >&6; }
-if test ${tcl_cv_strstr_unbroken+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
-then :
- tcl_cv_strstr_unbroken=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdlib.h>
-#include <string.h>
-int main() {
- exit(strstr("\0test", "test") ? 1 : 0);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
- tcl_cv_strstr_unbroken=ok
-else $as_nop
- tcl_cv_strstr_unbroken=broken
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strstr_unbroken" >&5
-printf "%s\n" "$tcl_cv_strstr_unbroken" >&6; }
- if test "$tcl_cv_strstr_unbroken" = "ok"; then
- tcl_ok=1
- else
- tcl_ok=0
- fi
- fi
- if test "$tcl_ok" = 0; then
- case " $LIBOBJS " in
- *" strstr.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
- ;;
-esac
-
- USE_COMPAT=1
- fi
-
-
-#--------------------------------------------------------------------
-# Check for strtoul function. This is tricky because under some
-# versions of AIX strtoul returns an incorrect terminator
-# pointer for the string "0".
-#--------------------------------------------------------------------
-
-
- ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
-if test "x$ac_cv_func_strtoul" = xyes
-then :
- tcl_ok=1
-else $as_nop
- tcl_ok=0
-fi
-
- if test "$tcl_ok" = 1; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking proper strtoul implementation" >&5
-printf %s "checking proper strtoul implementation... " >&6; }
-if test ${tcl_cv_strtoul_unbroken+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
-then :
- tcl_cv_strtoul_unbroken=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdlib.h>
-#include <string.h>
-int main() {
- char *term, *string = "0";
- exit(strtoul(string,&term,0) != 0 || term != string+1);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
- tcl_cv_strtoul_unbroken=ok
-else $as_nop
- tcl_cv_strtoul_unbroken=broken
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtoul_unbroken" >&5
-printf "%s\n" "$tcl_cv_strtoul_unbroken" >&6; }
- if test "$tcl_cv_strtoul_unbroken" = "ok"; then
- tcl_ok=1
- else
- tcl_ok=0
- fi
- fi
- if test "$tcl_ok" = 0; then
- case " $LIBOBJS " in
- *" strtoul.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
- ;;
-esac
-
- USE_COMPAT=1
- fi
-
-
-#--------------------------------------------------------------------
# Check for various typedefs and provide substitutes if
# they don't exist.
#--------------------------------------------------------------------
@@ -9917,24 +9594,6 @@ fi
#--------------------------------------------------------------------
-# If a system doesn't have an opendir function (man, that's old!)
-# then we have to supply a different version of dirent.h which
-# is compatible with the substitute version of opendir that's
-# provided. This version only works with V7-style directories.
-#--------------------------------------------------------------------
-
-ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
-if test "x$ac_cv_func_opendir" = xyes
-then :
-
-else $as_nop
-
-printf "%s\n" "#define USE_DIRENT2_H 1" >>confdefs.h
-
-fi
-
-
-#--------------------------------------------------------------------
# The check below checks whether <sys/wait.h> defines the type
# "union wait" correctly. It's needed because of weirdness in
# HP-UX where "union wait" is defined in both the BSD and SYS-V
diff --git a/unix/configure.ac b/unix/configure.ac
index 885d36f..f5d5a59 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -229,7 +229,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])])
# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
# define USEGETWD even if the posix getcwd exists. Add a test ?
-AC_REPLACE_FUNCS(mkstemp opendir strtol waitpid)
+AC_REPLACE_FUNCS(mkstemp waitpid)
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])])
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])])
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])])
@@ -377,13 +377,6 @@ AC_CHECK_TYPES([blkcnt_t])
AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])])
#--------------------------------------------------------------------
-# Some system have no memcmp or it does not work with 8 bit data, this
-# checks it and add memcmp.o to LIBOBJS if needed
-#--------------------------------------------------------------------
-
-AC_FUNC_MEMCMP
-
-#--------------------------------------------------------------------
# Some system like SunOS 4 and other BSD like systems have no memmove
# (we assume they have bcopy instead). {The replacement define is in
# compat/string.h}
@@ -394,26 +387,6 @@ AC_CHECK_FUNC(memmove, , [
AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) ])
#--------------------------------------------------------------------
-# On some systems strstr is broken: it returns a pointer even if
-# the original string is empty.
-#--------------------------------------------------------------------
-
-SC_TCL_CHECK_BROKEN_FUNC(strstr, [
- exit(strstr("\0test", "test") ? 1 : 0);
-])
-
-#--------------------------------------------------------------------
-# Check for strtoul function. This is tricky because under some
-# versions of AIX strtoul returns an incorrect terminator
-# pointer for the string "0".
-#--------------------------------------------------------------------
-
-SC_TCL_CHECK_BROKEN_FUNC(strtoul, [
- char *term, *string = "0";
- exit(strtoul(string,&term,0) != 0 || term != string+1);
-])
-
-#--------------------------------------------------------------------
# Check for various typedefs and provide substitutes if
# they don't exist.
#--------------------------------------------------------------------
@@ -439,15 +412,6 @@ AC_CHECK_TYPES([intptr_t, uintptr_t],,,[[
]])
#--------------------------------------------------------------------
-# If a system doesn't have an opendir function (man, that's old!)
-# then we have to supply a different version of dirent.h which
-# is compatible with the substitute version of opendir that's
-# provided. This version only works with V7-style directories.
-#--------------------------------------------------------------------
-
-AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H, 1, [May we include <dirent2.h>?])])
-
-#--------------------------------------------------------------------
# The check below checks whether <sys/wait.h> defines the type
# "union wait" correctly. It's needed because of weirdness in
# HP-UX where "union wait" is defined in both the BSD and SYS-V
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 5ac917c..9dc39f2 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1932,8 +1932,6 @@ dnl # preprocessing tests use only CPPFLAGS.
# Results:
#
# Defines some of the following vars:
-# NO_DIRENT_H
-# NO_STDLIB_H
# NO_STRING_H
# NO_SYS_WAIT_H
# NO_DLFCN_H
@@ -1943,38 +1941,6 @@ dnl # preprocessing tests use only CPPFLAGS.
#--------------------------------------------------------------------
AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
- AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <dirent.h>]], [[
-#ifndef _POSIX_SOURCE
-# ifdef __Lynx__
- /*
- * Generate compilation error to make the test fail: Lynx headers
- * are only valid if really in the POSIX environment.
- */
-
- missing_procedure();
-# endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-]])],[tcl_cv_dirent_h=yes],[tcl_cv_dirent_h=no])])
-
- if test $tcl_cv_dirent_h = no; then
- AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
- fi
-
- AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
- AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
- AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
- if test $tcl_ok = 0; then
- AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
- fi
AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
@@ -2388,7 +2354,7 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
case 1: case (sizeof(long long)==sizeof(long)): ;
}]])],[tcl_cv_type_64bit="long long"],[])])
if test "${tcl_cv_type_64bit}" = none ; then
- AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, ['long' and 'long long' have the same size])
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index 4d8230a..fe2c6d9 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -178,9 +178,6 @@
/* Define to 1 if you have the `open64' function. */
#undef HAVE_OPEN64
-/* Define to 1 if you have the `opendir' function. */
-#undef HAVE_OPENDIR
-
/* Define to 1 if you have the `OSSpinLockLock' function. */
#undef HAVE_OSSPINLOCKLOCK
@@ -217,9 +214,6 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
/* Define to 1 if the system has the type `struct addrinfo'. */
#undef HAVE_STRUCT_ADDRINFO
@@ -244,6 +238,9 @@
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
+/* Define to 1 if `st_rdev' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_RDEV
+
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H
@@ -331,9 +328,6 @@
/* Is Darwin CoreFoundation unavailable for 64-bit? */
#undef NO_COREFOUNDATION_64
-/* Do we have <dirent.h>? */
-#undef NO_DIRENT_H
-
/* Do we have <dlfcn.h>? */
#undef NO_DLFCN_H
@@ -361,9 +355,6 @@
/* Do we have realpath() */
#undef NO_REALPATH
-/* Do we have <stdlib.h>? */
-#undef NO_STDLIB_H
-
/* Do we have strerror() */
#undef NO_STRERROR
@@ -453,9 +444,6 @@
/* Is getcwd Posix-compliant? */
#undef USEGETWD
-/* May we include <dirent2.h>? */
-#undef USE_DIRENT2_H
-
/* Are we building with DTrace support? */
#undef USE_DTRACE
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index cb1adc5..33c8971 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -7,7 +7,7 @@
* file that contains #ifdefs to handle different flavors of UNIX. This
* file sets up the union of all UNIX-related things needed by any of the
* Tcl core files. This file depends on configuration #defines such as
- * NO_DIRENT_H that are set up by the "configure" script.
+ * HAVE_SYS_PARAM_H that are set up by the "configure" script.
*
* Much of the material in this file was originally contributed by Karl
* Lehenbauer, Mark Diekhans and Peter da Silva.
@@ -40,15 +40,7 @@
# include <sys/param.h>
#endif
#include <sys/types.h>
-#ifdef USE_DIRENT2_H
-# include "../compat/dirent2.h"
-#else
-#ifdef NO_DIRENT_H
-# include "../compat/dirent.h"
-#else
-# include <dirent.h>
-#endif
-#endif
+#include <dirent.h>
/*
*---------------------------------------------------------------------------
@@ -155,11 +147,6 @@ extern "C" {
# include <inttypes.h>
#endif
#include <limits.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#else
-# include "../compat/stdint.h"
-#endif
#include <unistd.h>
MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode);