From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076332421172.tru64-unix-managers.marc@archive.invalid> From: Jeff Putsch Date: Fri, 03 May 1996 17:27:03 +0000 To: tru64-unix-managers Subject: SUMMARY: Tcl 7.5/Tk 4.1 on DU 3.2c X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076332421172 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===_0_Fri_May__3_13:19:53_EDT_1996" This is a multipart MIME message. --===_0_Fri_May__3_13:19:53_EDT_1996 Content-Type: text/plain; charset=us-ascii Howdy, Thanks to Albert De Knuydt for pointing out that comp.lang.tcl recently had a posting correcting this problem. Thanks also to Drew Kramer for offering to find and fix the problem for me. Drew asked where I found Tcl 7.5 so here are some pointers: http://www.sunlabs.com/research/tcl contains pointers to obtaining the Tcl/Tk releases. ftp://ftp.sunlabs.com/pub/tcl contains the latest releases of Tcl/Tk. My original question was: >Has anyone built this successfully yet? > >The compilation proceeds smoothly, but when I run 'make test' the socket tests >hang. I have narrowed it down to test 2.1 of the socket tests (at least that's > the first test to hang). > >Any help will be greatly appreciated. > I've also enclosed a copy of the patch Albert was referring to. Thanks again for the help! Jeff. --===_0_Fri_May__3_13:19:53_EDT_1996 Content-Type: text/plain; charset=us-ascii Content-Description: tcl7.5.article Subject: [BUG FIX] Tcl 7.5, DEC Alpha 3.2, CreateSocketAddress() From: man@imrryr.magwien.gv.at (Andreas Manessinger) Date: 1996/04/23 Message-Id: Sender: man@imrryr.adv.magwien.gv.at Organization: Gemeinde Wien MD-ADV/Ma; A-1010 Wien; Austria Newsgroups: comp.lang.tcl In the current distribution `CreateSocketAddress()' fails on Alphas (and maybe on other 64 bit machines too) if the host is specified by name. This means, that the command `socket localhost echo' fails, but not so `socket 127.0.0.1 echo'. This happens on `alpha-dec-osf3.2' when configuring with `configure --enable-shared' using `cc' as compiler. The problem is, that on the Alpha internet addresses in are defined as struct in_addr { u_int s_addr; }; but everywhere else as a variant of struct in_addr { u_long s_addr; }; After trying to convert the string given by the user to an internet address, the value of the address is compared with `(unsigned long) -1' to check for failure. It is better to drop the cast and let the compiler decide how to do it right. The following patch fixes the problem for me: *** tcl7.5/unix/tclUnixChan.c Tue Apr 23 14:03:59 1996 --- tcl7.5/unix/tclUnixChan.c.orig Fri Apr 19 02:05:40 1996 *************** *** 1380,1386 **** addr.s_addr = INADDR_ANY; } else { addr.s_addr = inet_addr(host); ! if (addr.s_addr == -1) { hostent = gethostbyname(host); if (hostent != NULL) { memcpy((VOID *) &addr, --- 1380,1386 ---- addr.s_addr = INADDR_ANY; } else { addr.s_addr = inet_addr(host); ! if (addr.s_addr == (unsigned long) -1) { hostent = gethostbyname(host); if (hostent != NULL) { memcpy((VOID *) &addr, -- Andreas Manessinger man@adv.magwien.gv.at ----------------------------------------------------------------------------- "Time is a jet plane, it moves too fast" Bob Dylan, -You're a big girl now- --===_0_Fri_May__3_13:19:53_EDT_1996 Content-Type: text/plain; charset=us-ascii ----------------------------------------------------------------------------- Jeff Putsch | Internet: putsch@uicc.com Unitrode Integrated Circuits Corp. | Fax : (US) 603-429-8564 Merrimack, NH USA | Voice : (US) 603-429-8626 (daytime) --===_0_Fri_May__3_13:19:53_EDT_1996--