Tcl Source Code

Artifact [58708699b6]
Login

Artifact 58708699b66a09d55218d73fdc3e81e6ba2841f2:

Attachment "patch" to ticket [945150ffff] added by nobody 2004-04-30 15:59:01.
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./ChangeLog /home/dev1usr/src/tcl8.4.6/ChangeLog
*** ./ChangeLog	2004-04-30 10:40:02.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/ChangeLog	2004-03-01 21:18:43.000000000 +0100
***************
*** 1,20 ****
- 2004-04-27  Andreas Otto <[email protected]>
- 
- 	* adding support for Interix:
- 	* build as native Unix application at the Windows (XP) SFU subsystem
- 	* SFU = Service For Unix; changed files:
- 	*   tests/fileName.test
- 	*   tests/http.test
- 	*   tests/socket.test
- 	*   unix/configure.in
- 	*   unix/Makefile.in
- 	*   unix/tcl.m4
- 	*   unix/tclUnixChan.c
- 	*   unix/tclUnixInit.c
- 	*   unix/tclUnixTime.c
- 
  2004-03-01  Don Porter	<[email protected]>
  
  	*** 8.4.6 TAGGED FOR RELEASE ***
  
  	* unix/tcl.m4 (SC_CONFIG_CFLAGS):	Allow 64-bit enabling on
--- 1,5 ----
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./tests/fileName.test /home/dev1usr/src/tcl8.4.6/tests/fileName.test
*** ./tests/fileName.test	2004-04-30 09:10:41.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/tests/fileName.test	2003-10-06 11:49:20.000000000 +0200
***************
*** 18,32 ****
  }
  
  tcltest::testConstraint testsetplatform [string equal testsetplatform [info commands testsetplatform]]
  tcltest::testConstraint testtranslatefilename [string equal testtranslatefilename [info commands testtranslatefilename]]
  
- # Interix is unix but has the NTFS filesytem.
- if {$tcl_platform(os) ne "Interix"} {
-     configure -constraints notInterix
- }
- 
  global env
  if {[tcltest::testConstraint testsetplatform]} {
      set platform [testgetplatform]
  }
  
--- 18,27 ----
***************
*** 1868,1882 ****
        [glob -nocomplain ~ ~blah ~wontexist]
  } {1}
  test filename-15.5 {unix specific globbing} {unixOnly nonPortable} {
      glob ~ouster/.csh*
  } "/home/ouster/.cshrc"
- 
- # Interx has NTFS as filesystem and is not been able to create 
- # a file like "odd\\\[\]*?\{\}name"
  catch {close [open globTest/odd\\\[\]*?\{\}name w]}
! test filename-15.6 {unix specific globbing} {unixOnly notInterix} {
      global env
      set temp $env(HOME)
      set env(HOME) $env(HOME)/globTest/odd\\\[\]*?\{\}name
      set result [list [catch {glob ~} msg] $msg]
      set env(HOME) $temp
--- 1863,1874 ----
        [glob -nocomplain ~ ~blah ~wontexist]
  } {1}
  test filename-15.5 {unix specific globbing} {unixOnly nonPortable} {
      glob ~ouster/.csh*
  } "/home/ouster/.cshrc"
  catch {close [open globTest/odd\\\[\]*?\{\}name w]}
! test filename-15.6 {unix specific globbing} {unixOnly} {
      global env
      set temp $env(HOME)
      set env(HOME) $env(HOME)/globTest/odd\\\[\]*?\{\}name
      set result [list [catch {glob ~} msg] $msg]
      set env(HOME) $temp
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./tests/http.test /home/dev1usr/src/tcl8.4.6/tests/http.test
*** ./tests/http.test	2004-04-30 09:10:41.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/tests/http.test	2003-07-18 21:41:17.000000000 +0200
***************
*** 17,31 ****
  if {[lsearch [namespace children] ::tcltest] == -1} {
      package require tcltest 2
      namespace import -force ::tcltest::*
  }
  
- # Interix is unix with some windows-limitations
- if {$tcl_platform(os) ne "Interix"} {
-     configure -constraints notInterix
- }
- 
  if {[catch {package require http 2} version]} {
      if {[info exists http2]} {
  	catch {puts "Cannot load http 2.* package"}
  	return
      } else {
--- 17,26 ----
***************
*** 437,449 ****
  } {timeout}
  
  #	Longer timeout to good host, bad port, gets an error
  #	after the connection "completes" but the socket is bad
  
! # Interix (WinSocket) does not create an error-msg on async sockets
! 
! test http-4.14 {http::Event} {notInterix} {
      set code [catch {
  	set token [http::geturl $badurl/?timeout=10 -timeout 10000 -command {#}]
  	if {[string length $token] == 0} {
  	    error "bogus return from http::geturl"
  	}
--- 432,442 ----
  } {timeout}
  
  #	Longer timeout to good host, bad port, gets an error
  #	after the connection "completes" but the socket is bad
  
! test http-4.14 {http::Event} {
      set code [catch {
  	set token [http::geturl $badurl/?timeout=10 -timeout 10000 -command {#}]
  	if {[string length $token] == 0} {
  	    error "bogus return from http::geturl"
  	}
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./tests/socket.test /home/dev1usr/src/tcl8.4.6/tests/socket.test
*** ./tests/socket.test	2004-04-30 09:10:44.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/tests/socket.test	2004-02-26 00:38:17.000000000 +0100
***************
*** 63,77 ****
  # using the remote server are not performed.
  
  package require tcltest 2
  namespace import -force ::tcltest::*
  
- # Interix is unix with some windows-limitations
- if {$tcl_platform(os) ne "Interix"} {
-     configure -constraints notInterix
- }
- 
  # Some tests require the testthread and exec commands
  testConstraint testthread [llength [info commands testthread]]
  testConstraint exec [llength [info commands exec]]
  
  # If remoteServerIP or remoteServerPort are not set, check in the
--- 63,72 ----
***************
*** 519,530 ****
      set x
  } -cleanup {
      removeFile script
  } -result {done 50}
  set path(script) [makeFile {} script]
! #Interix (WinSocket) allows two server-connections on the same port
! test socket-2.9 {socket conflict} {socket stdio notInterix} {
      set s [socket -server accept 0]
      file delete $path(script)
      set f [open $path(script) w]
      puts -nonewline $f "socket -server accept [lindex [fconfigure $s -sockname] 2]"
      close $f
--- 514,524 ----
      set x
  } -cleanup {
      removeFile script
  } -result {done 50}
  set path(script) [makeFile {} script]
! test socket-2.9 {socket conflict} {socket stdio} {
      set s [socket -server accept 0]
      file delete $path(script)
      set f [open $path(script) w]
      puts -nonewline $f "socket -server accept [lindex [fconfigure $s -sockname] 2]"
      close $f
***************
*** 587,598 ****
      close $sock
      set result
  } {a:one b: c:two}
  
  
! #Interix (WinSocket) allows two server-connections on the same port
! test socket-3.1 {socket conflict} {socket stdio notInterix} {
      file delete $path(script)
      set f [open $path(script) w]
      puts $f {
  	set f [socket -server accept 0]
  	puts ready
--- 581,591 ----
      close $sock
      set result
  } {a:one b: c:two}
  
  
! test socket-3.1 {socket conflict} {socket stdio} {
      file delete $path(script)
      set f [open $path(script) w]
      puts $f {
  	set f [socket -server accept 0]
  	puts ready
***************
*** 741,753 ****
  	close $msg
      }
      set x
  } ok
  
- #Interix (WinSocket) allows connections to low-ports
  test socket-5.1 {byte order problems, socket numbers, htons} \
! 	{socket unixOnly notRoot notInterix} {
      set x {couldn't open socket: not owner}
      if {![catch {socket -server dodo 0x1} msg]} {
          set x {htons problem, should be disallowed, are you running as SU?}
  	close $msg
      }
--- 734,745 ----
  	close $msg
      }
      set x
  } ok
  
  test socket-5.1 {byte order problems, socket numbers, htons} \
! 	{socket unixOnly notRoot} {
      set x {couldn't open socket: not owner}
      if {![catch {socket -server dodo 0x1} msg]} {
          set x {htons problem, should be disallowed, are you running as SU?}
  	close $msg
      }
***************
*** 759,771 ****
  	set x {port resolution problem, should be disallowed}
  	close $msg
      }
      set x
  } {couldn't open socket: port number too high}
- #Interix (WinSocket) allows connections to low-ports
  test socket-5.3 {byte order problems, socket numbers, htons} \
! 	{socket unixOnly notRoot notInterix} {
      set x {couldn't open socket: not owner}
      if {![catch {socket -server dodo 21} msg]} {
  	set x {htons problem, should be disallowed, are you running as SU?}
  	close $msg
      }
--- 751,762 ----
  	set x {port resolution problem, should be disallowed}
  	close $msg
      }
      set x
  } {couldn't open socket: port number too high}
  test socket-5.3 {byte order problems, socket numbers, htons} \
! 	{socket unixOnly notRoot} {
      set x {couldn't open socket: not owner}
      if {![catch {socket -server dodo 21} msg]} {
  	set x {htons problem, should be disallowed, are you running as SU?}
  	close $msg
      }
***************
*** 1156,1168 ****
      }
      close $f
      sendCommand {close $socket10_7_test_server}
      set cnt
  } 50
! # Macintosh (and Interix) sockets can have more than one server per port
! if {$tcl_platform(platform) == "macintosh" || 
!     $tcl_platform(os)       == "Interix" } {
      set conflictResult {0 2836}
  } else {
      set conflictResult {1 {couldn't open socket: address already in use}}
  }
  test socket-11.6 {socket conflict} {socket doTestsWithRemoteServer} {
--- 1147,1158 ----
      }
      close $f
      sendCommand {close $socket10_7_test_server}
      set cnt
  } 50
! # Macintosh sockets can have more than one server per port
! if {$tcl_platform(platform) == "macintosh"} {
      set conflictResult {0 2836}
  } else {
      set conflictResult {1 {couldn't open socket: address already in use}}
  }
  test socket-11.6 {socket conflict} {socket doTestsWithRemoteServer} {
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/configure.in /home/dev1usr/src/tcl8.4.6/unix/configure.in
*** ./unix/configure.in	2004-04-30 09:41:41.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/configure.in	2004-03-02 00:58:59.000000000 +0100
***************
*** 128,158 ****
  #	This appears to be true only on the RS/6000 under AIX.  Some
  #	systems like OSF/1 have a sys/select.h that's of no use, and
  #	other systems like SCO UNIX have a sys/select.h that's
  #	pernicious.  If "fd_set" isn't defined anywhere then set a
  #	special flag.
- #       Interix defines fd_set in sys/times.h included by sys/select.h
  #--------------------------------------------------------------------
  
  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_set in sys/select])
-     AC_CACHE_VAL(tcl_cv_type_fd_set_in_select,
- 	AC_TRY_COMPILE([#include <sys/select.h>],[fd_set readMask, writeMask;],
- 	    tcl_cv_type_fd_set_in_select=yes, tcl_cv_type_fd_set_in_select=no))
-     AC_MSG_RESULT($tcl_cv_type_fd_set_in_select)
-     if test $tcl_cv_type_fd_set_in_select = yes; then
- 	AC_DEFINE(HAVE_SYS_SELECT_H)
- 	tk_ok=yes
-     fi
- fi
- if test $tcl_cv_type_fd_set = no && test $tcl_cv_type_fd_set_in_select = 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)
--- 128,146 ----
***************
*** 290,300 ****
      #include <stddef.h>
      #endif
      ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
  AC_MSG_RESULT($ac_cv_type_socklen_t)
  if test $ac_cv_type_socklen_t = no; then
!     SC_SOCKLEN_TYPE
  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
--- 278,288 ----
      #include <stddef.h>
      #endif
      ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
  AC_MSG_RESULT($ac_cv_type_socklen_t)
  if test $ac_cv_type_socklen_t = no; then
!     AC_DEFINE(socklen_t, unsigned)
  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
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/Makefile.in /home/dev1usr/src/tcl8.4.6/unix/Makefile.in
*** ./unix/Makefile.in	2004-04-30 09:10:45.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/Makefile.in	2004-03-02 00:58:59.000000000 +0100
***************
*** 727,742 ****
  	$(SHELL) config.status
  
  clean:
  	rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
  		errors tclsh tcltest lib.exp
! 	-cd dltest ; $(MAKE) clean
  
  distclean: clean
  	rm -rf Makefile config.status config.cache config.log tclConfig.sh \
  		$(PACKAGE).* prototype
! 	-cd dltest ; $(MAKE) distclean
  
  depend:
  	makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
  
  # Test binaries.  The rules for tclTestInit.o and xtTestInit.o are
--- 727,742 ----
  	$(SHELL) config.status
  
  clean:
  	rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
  		errors tclsh tcltest lib.exp
! 	cd dltest ; $(MAKE) clean
  
  distclean: clean
  	rm -rf Makefile config.status config.cache config.log tclConfig.sh \
  		$(PACKAGE).* prototype
! 	cd dltest ; $(MAKE) distclean
  
  depend:
  	makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
  
  # Test binaries.  The rules for tclTestInit.o and xtTestInit.o are
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/tcl.m4 /home/dev1usr/src/tcl8.4.6/unix/tcl.m4
*** ./unix/tcl.m4	2004-04-30 09:23:07.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/tcl.m4	2004-03-02 00:58:59.000000000 +0100
***************
*** 508,519 ****
  #		DBGX		Debug library extension
  #
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with [symbols]])
!     AC_ARG_ENABLE([[symbols]], [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
  	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
  	DBGX=""
--- 508,519 ----
  #		DBGX		Debug library extension
  #
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with symbols])
!     AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
  	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
  	DBGX=""
***************
*** 538,548 ****
  	AC_DEFINE(TCL_COMPILE_STATS)
      fi
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled [symbols] mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
      fi
  ])
--- 538,548 ----
  	AC_DEFINE(TCL_COMPILE_STATS)
      fi
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled symbols mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
      fi
  ])
***************
*** 1562,1585 ****
  	    LDFLAGS=""
  	    fi
  	    CC_SEARCH_FLAGS=""
  	    LD_SEARCH_FLAGS=""
  	    ;;
- 	Interix*)
- 	    AC_CHECK_HEADER(dlfcn.h,, [AC_MSG_ERROR([cannot find dlfcn.h, bailing out])])
- 	    CFLAGS="${CFLAGS} -D_ALL_SOURCE -D_INTERIX"
- 	    CPPFLAGS="${CPPFLAGS} -D_ALL_SOURCE"
- 	    SHLIB_CFLAGS=""
- 	    SHLIB_LD="gcc -shared"
- 	    SHLIB_LD_LIBS='${LIBS}'
- 	    SHLIB_SUFFIX=".so"
- 	    DL_OBJS="tclLoadDl.o"
- 	    DL_LIBS="-ldl"
- 	    LDFLAGS=""
- 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -Wl,--export-dynamic'
- 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- 	    ;;
      esac
  
      if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
      AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
      fi
--- 1562,1571 ----
***************
*** 1706,1717 ****
  		    ;;
  		SCO_SV-3.2*)
  		    ;;
  		ULTRIX-4.*)
  		    ;;
- 		Interix*)
- 		    ;;
  		*)
  		    SHLIB_CFLAGS="-fPIC"
  		    ;;
  	    esac
  	fi
--- 1692,1701 ----
***************
*** 2090,2140 ****
      if test "$XLIBSW" = nope ; then
  	AC_MSG_RESULT(couldn't find any!  Using -lX11.)
  	XLIBSW=-lX11
      fi
  ])
- 
- #--------------------------------------------------------------------
- # SC_SOCKLEN_TYPE
- #
- #	Interix uses "int" as type for socklen_t 
- #
- # Arguments:
- #	none
- #	
- # Results:
- #
- #	Defines the following var:
- #		socklen_t
- #
- #--------------------------------------------------------------------
- 
- AC_DEFUN(SC_SOCKLEN_TYPE, [
-     if test -f /usr/lib/NextStep/software_version; then
- 	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-     else
- 	system=`uname -s`-`uname -r`
- 	if test "$?" -ne 0 ; then
- 	    system=unknown
- 	else
- 	    # Special check for weird MP-RAS system (uname returns weird
- 	    # results, and the version is kept in special file).
- 	
- 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- 		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
- 	    fi
- 	    if test "`uname -s`" = "AIX" ; then
- 		system=AIX-`uname -v`.`uname -r`
- 	    fi
- 	fi
-     fi
-     case $system in
-         Interix*)   AC_DEFINE(socklen_t, int)  ;;
-         *)          AC_DEFINE(socklen_t, unsigned)  ;;
-     esac
- ])
- 
  #--------------------------------------------------------------------
  # SC_BLOCKING_STYLE
  #
  #	The statements below check for systems where POSIX-style
  #	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
--- 2074,2083 ----
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/tclUnixChan.c /home/dev1usr/src/tcl8.4.6/unix/tclUnixChan.c
*** ./unix/tclUnixChan.c	2004-04-30 09:10:45.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/tclUnixChan.c	2004-02-25 15:54:52.000000000 +0100
***************
*** 54,64 ****
  #   endif /* HAVE_SYS_MODEM_H */
  #   define IOSTATE			struct termios
  #   define GETIOSTATE(fd, statePtr)	tcgetattr((fd), (statePtr))
  #   define SETIOSTATE(fd, statePtr)	tcsetattr((fd), TCSADRAIN, (statePtr))
  #   define GETCONTROL(fd, intPtr)	ioctl((fd), TIOCMGET, (intPtr))
! #   define SETCONTROL(fd, intPtr)	ioctl((fd), (int)TIOCMSET, (intPtr))
      /*
       * TIP #35 introduced a different on exit flush/close behavior that
       * doesn't work correctly with standard channels on all systems.
       * The problem is tcflush throws away waiting channel data.	 This may
       * be necessary for true serial channels that may block, but isn't
--- 54,64 ----
  #   endif /* HAVE_SYS_MODEM_H */
  #   define IOSTATE			struct termios
  #   define GETIOSTATE(fd, statePtr)	tcgetattr((fd), (statePtr))
  #   define SETIOSTATE(fd, statePtr)	tcsetattr((fd), TCSADRAIN, (statePtr))
  #   define GETCONTROL(fd, intPtr)	ioctl((fd), TIOCMGET, (intPtr))
! #   define SETCONTROL(fd, intPtr)	ioctl((fd), TIOCMSET, (intPtr))
      /*
       * TIP #35 introduced a different on exit flush/close behavior that
       * doesn't work correctly with standard channels on all systems.
       * The problem is tcflush throws away waiting channel data.	 This may
       * be necessary for true serial channels that may block, but isn't
***************
*** 1125,1137 ****
      if (len==0 || (len>1 && strncmp(optionName, "-xchar", len)==0)) {
  	IOSTATE iostate;
  	valid = 1;
  
  	GETIOSTATE(fsPtr->fd, &iostate);
! 	sprintf(buf, "%c", (int) iostate.c_cc[VSTART]);
  	Tcl_DStringAppendElement(dsPtr, buf);
! 	sprintf(buf, "%c", (int) iostate.c_cc[VSTOP]);
  	Tcl_DStringAppendElement(dsPtr, buf);
      }
      if (len == 0) {
  	Tcl_DStringEndSublist(dsPtr);
      }
--- 1125,1137 ----
      if (len==0 || (len>1 && strncmp(optionName, "-xchar", len)==0)) {
  	IOSTATE iostate;
  	valid = 1;
  
  	GETIOSTATE(fsPtr->fd, &iostate);
! 	sprintf(buf, "%c", iostate.c_cc[VSTART]);
  	Tcl_DStringAppendElement(dsPtr, buf);
! 	sprintf(buf, "%c", iostate.c_cc[VSTOP]);
  	Tcl_DStringAppendElement(dsPtr, buf);
      }
      if (len == 0) {
  	Tcl_DStringEndSublist(dsPtr);
      }
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/tclUnixInit.c /home/dev1usr/src/tcl8.4.6/unix/tclUnixInit.c
*** ./unix/tclUnixInit.c	2004-04-30 10:43:35.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/tclUnixInit.c	2004-02-18 00:46:54.000000000 +0100
***************
*** 521,536 ****
  		/* if langinfo reports "ibm*" we should use "cp*" */
  		p = Tcl_DStringValue(&ds);
  		*p++ = 'c'; *p++ = 'p';
  		for(q = p+1; *p ; *p++ = *q++);
  	    } else if ((*encoding == '\0')
! 		    || !strcmp(encoding, "ansi_x3.4-1968")
! #		    ifdef _INTERIX
! 		    || !strcmp(encoding, "ascii")
! #		    endif
! 		    ) {
! 		/* Use iso8859-1 for empty or 'ansi_x3.4-1968' or 'Interix:ascii' encoding */
  		encoding = "iso8859-1";
  	    }
  #ifdef HAVE_LANGINFO_DEBUG
  	    fprintf(stderr, " ?%s?", encoding);
  #endif
--- 521,532 ----
  		/* if langinfo reports "ibm*" we should use "cp*" */
  		p = Tcl_DStringValue(&ds);
  		*p++ = 'c'; *p++ = 'p';
  		for(q = p+1; *p ; *p++ = *q++);
  	    } else if ((*encoding == '\0')
! 		    || !strcmp(encoding, "ansi_x3.4-1968")) {
! 		/* Use iso8859-1 for empty or 'ansi_x3.4-1968' encoding */
  		encoding = "iso8859-1";
  	    }
  #ifdef HAVE_LANGINFO_DEBUG
  	    fprintf(stderr, " ?%s?", encoding);
  #endif
diff -r -C 5 -x configure -x .MkPatch -x CVS -x 'build_*' -x .cvsignore -x '*.swp' -I '.*RCS.*' -I '.*tcl.spec.*' -I '.*strftime.*' -I '.*CVS.*' ./unix/tclUnixTime.c /home/dev1usr/src/tcl8.4.6/unix/tclUnixTime.c
*** ./unix/tclUnixTime.c	2004-04-30 09:10:45.000000000 +0200
--- /home/dev1usr/src/tcl8.4.6/unix/tclUnixTime.c	2002-07-19 14:31:10.000000000 +0200
***************
*** 39,58 ****
   * Forward declarations for procedures defined later in this file.
   */
  
  static struct tm *ThreadSafeGMTime _ANSI_ARGS_(( CONST time_t* ));
  static struct tm *ThreadSafeLocalTime _ANSI_ARGS_(( CONST time_t* ));
- 
- #ifdef _INTERIX
- /*
-  * Interix defines gmtime_r and localtime_r only with _REENTRANT defined.
-  * to avoid global defining _REENTRANT, I shadow the prototype from
-  * /usr/include/time.h
-  */
- extern struct tm* __cdecl gmtime_r(const time_t *, struct tm*);
- extern struct tm* __cdecl localtime_r(const time_t *, struct tm*);
- #endif
  
  /*
   *-----------------------------------------------------------------------------
   *
   * TclpGetSeconds --
--- 39,48 ----