diff -r --unified tcl8.3.0/generic/tclIOSock.c betcl8.3.0/generic/tclIOSock.c --- tcl8.3.0/generic/tclIOSock.c Fri Nov 19 06:34:23 1999 +++ betcl8.3.0/generic/tclIOSock.c Sun Feb 27 07:03:27 2000 @@ -93,14 +93,22 @@ int current; size_t len; +#ifdef __BEOS__ + current = 0; +#else len = sizeof(int); getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)¤t, &len); +#endif if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&size, len); } +#ifdef __BEOS__ + current = 0; +#else len = sizeof(int); getsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)¤t, &len); +#endif if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&size, len); diff -r --unified tcl8.3.0/tests/basic.test betcl8.3.0/tests/basic.test --- tcl8.3.0/tests/basic.test Tue Oct 19 18:08:44 1999 +++ betcl8.3.0/tests/basic.test Sun Feb 27 06:54:30 2000 @@ -422,6 +422,7 @@ # string would have been freed, leaving garbage bytes for the error # message. + error {Hangs on BeOS} proc bgerror {args} {set ::x $::errorInfo} set f [open test1 w] fileevent $f writable "fileevent $f writable {}; error foo" diff -r --unified tcl8.3.0/tests/cmdAH.test betcl8.3.0/tests/cmdAH.test --- tcl8.3.0/tests/cmdAH.test Fri Oct 29 03:04:37 1999 +++ betcl8.3.0/tests/cmdAH.test Sun Feb 27 06:54:30 2000 @@ -78,7 +78,8 @@ set result } 1 test cmdAH-2.5 {Tcl_CdObjCmd} { - list [catch {cd ~~} msg] $msg + error {Causes incorrect change-dir on BeOS} + list [catch {cd ~~} msg] $msg } {1 {user "~" doesn't exist}} test cmdAH-2.6 {Tcl_CdObjCmd} { list [catch {cd _foobar} msg] $msg diff -r --unified tcl8.3.0/unix/Makefile.in betcl8.3.0/unix/Makefile.in --- tcl8.3.0/unix/Makefile.in Thu Feb 10 11:09:57 2000 +++ betcl8.3.0/unix/Makefile.in Sun Feb 27 07:11:47 2000 @@ -234,7 +234,7 @@ ${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \ ${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\" -LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) -lc +LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) DEPEND_SWITCHES = ${CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \ ${AC_FLAGS} ${MATH_FLAGS} \ @@ -421,6 +421,32 @@ ${CC} @LDFLAGS@ ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \ @TCL_LD_SEARCH_FLAGS@ -o tcltest +BEOS_TEST_FILES= \ +append.test assocd.test async.test autoMkindex.test basic.test \ +binary.test case.test clock.test cmdAH.test cmdIL.test cmdInfo.test \ +cmdMZ.test compExpr-old.test compExpr.test compile.test concat.test \ +dcall.test dstring.test encoding.test env.test error.test eval.test \ +exec.test execute.test expr-old.test expr.test \ +fCmd.test fileName.test \ +for-old.test for.test foreach.test format.test get.test history.test \ +if-old.test if.test incr-old.test incr.test indexObj.test info.test \ +init.test interp.test ioCmd.test \ +ioUtil.test join.test lindex.test \ +link.test linsert.test list.test listObj.test llength.test load.test \ +lrange.test lreplace.test lsearch.test macFCmd.test misc.test \ +msgcat.test namespace-old.test namespace.test obj.test opt.test \ +osa.test parse.test parseExpr.test parseOld.test pid.test pkg.test \ +pkgMkIndex.test platform.test proc-old.test proc.test pwd.test \ +reg.test regexp.test registry.test rename.test resource.test \ +result.test safe.test scan.test security.test set-old.test set.test \ +socket.test source.test split.test stack.test string.test stringObj.test \ +subst.test switch.test tcltest.test thread.test timer.test trace.test \ +unixFCmd.test unixFile.test \unixInit.test unknown.test uplevel.test \ +upvar.test utf.test util.test var.test while-old.test \ +while.test winConsole.test winDde.test winFCmd.test winFile.test \ +winNotify.test winPipe.test winTime.test + +BEOS_HANG_TESTS=event.test http.test io.test unixNotfy.test # Note, in the target below TCL_LIBRARY needs to be set or else # "make test" won't work in the case where the compilation directory @@ -431,7 +457,8 @@ LIBPATH=`pwd`:${LIBPATH}; export LIBPATH; \ SHLIB_PATH=`pwd`:${SHLIB_PATH}; export SHLIB_PATH; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest $(TOP_DIR)/tests/all.tcl $(TCLTESTARGS) + for i in $(BEOS_TEST_FILES) ; do ./tcltest $(TOP_DIR)/tests/$$i $(TCLTESTARGS) ; done; \ + echo "The following tests hang on BeOS: $(BEOS_HANG_TESTS)" # Useful target to launch a built tcltest with the proper path,... runtest: tcltest Only in betcl8.3.0/unix: config Only in betcl8.3.0/unix: script diff -r --unified tcl8.3.0/unix/tclUnixChan.c betcl8.3.0/unix/tclUnixChan.c --- tcl8.3.0/unix/tclUnixChan.c Wed Jan 26 03:38:00 2000 +++ betcl8.3.0/unix/tclUnixChan.c Sun Feb 27 06:54:31 2000 @@ -1741,8 +1741,12 @@ int err, ret; optlen = sizeof(int); +#ifdef __BEOS__ + ret = -1; +#else ret = getsockopt(statePtr->fd, SOL_SOCKET, SO_ERROR, (char *)&err, &optlen); +#endif if (ret < 0) { err = errno; } diff -r --unified tcl8.3.0/unix/tclUnixPort.h betcl8.3.0/unix/tclUnixPort.h --- tcl8.3.0/unix/tclUnixPort.h Mon Jan 24 02:30:17 2000 +++ betcl8.3.0/unix/tclUnixPort.h Sun Feb 27 06:54:31 2000 @@ -43,6 +43,11 @@ #endif #include #include + +#ifdef __BEOS__ +#undef SIGBUS +#endif + #ifdef HAVE_SYS_PARAM_H # include #endif @@ -105,9 +110,17 @@ # include /* uname system call. */ #endif #include /* struct in_addr, struct sockaddr_in */ +#ifndef __BEOS__ #include /* inet_ntoa() */ +#endif #include /* gethostbyname() */ +#ifdef __BEOS__ +#define SO_ERROR 4 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#endif + /* * Some platforms (e.g. SunOS) don't define FLT_MAX and FLT_MIN, so we * look for an alternative definition. If no other alternative is available @@ -377,7 +390,7 @@ # ifndef _AIX typedef long fd_mask; # endif -# if defined(_IBMR2) +# if defined(_IBMR2) || defined(__BEOS__) # define SELECT_MASK void # else # define SELECT_MASK int diff -r --unified tcl8.3.0/unix/tclUnixTest.c betcl8.3.0/unix/tclUnixTest.c --- tcl8.3.0/unix/tclUnixTest.c Wed Oct 13 00:32:50 1999 +++ betcl8.3.0/unix/tclUnixTest.c Sun Feb 27 06:54:31 2000 @@ -21,7 +21,9 @@ */ #include +#ifndef __BEOS__ #include +#endif /* * The following macros convert between TclFile's and fd's. The conversion