Ticket UUID: | 651811 | |||
Title: | Fix broken sockets on HPUX 64-bit | |||
Type: | Patch | Version: | None | |
Submitter: | jdmartin | Created on: | 2002-12-11 03:26:22 | |
Subsystem: | 24. Channel Commands | Assigned To: | andreas_kupries | |
Priority: | 9 Immediate | Severity: | ||
Status: | Closed | Last Modified: | 2003-02-20 13:06:39 | |
Resolution: | Accepted | Closed By: | andreas_kupries | |
Closed on: | 2003-02-20 06:06:39 | |||
Description: |
The socket tests on Tcl/Tk 8.4.1 HPUX 11.00 64-bit were blowing up due to broken 'socket' and 'fconfigure' commands. First, the XOPEN sources were being used, but the xnet lib was never included, causing the wrong system functions to be called. A patch was made to unix/tcl.m4 to fix this problem. Second, the inet_ntoa() c function called by 'fconfigure' on sockets was always returning "0.0.0.0" for the network address. I never figured out why, so I wrote a function which duplicates inet_ntoa() and wrapped a macro around it. A patch was made to unix/tclUnixChan.c to fix this problem. Note that while this patch fixes the problem within the intended file scope, it is not very platform specific, and a more elegant solution may be desired. Note that after applying these patches on my HPUX 11.00 64-bit system all the tests involving the 'socket' command stopped failing. | |||
User Comments: |
andreas_kupries added on 2003-02-20 13:06:39:
Logged In: YES user_id=75003 Comparing the results of "fixinet_ntoa" and "inet_ntoa" for my machine I see no differences in the output at all. More credibility for the theory that the bug is in the HP libraries and that they fixed it via a patch. The patch to tcl.m4 has been accepted, after testing that it also works on a HPUX/IA-64 platform. The second patch (tclUnixChan.c) has not been accepted, as its effect cannot be reproduced on the machines available to me. I nevertheless thank the submitter for creating them. andreas_kupries added on 2003-02-19 05:57:43: Logged In: YES user_id=75003 Confirm for HPUX B.11.0 hppa2.0w (CC=cc CFLAGS=+DA2.0W): 44 errors in the testsuite + one hang. ... Of these we have 4 errors which are not socket related. We ignore these from now on in the counts. Leaves 40 errors + 1 hang (event-11.5, numerous http, io, iocmd, socket). Using verbose output I see that it is test socket-8.1 which is hanging. Excluding the test. 6 more tests are listed as failing. 12.2 hangs. Excluding. One more failure. Final: 47 failures + 2 hangs. Apply tcl.m4.diff - Ok Reconfigure - Ok. Recompile everything - Ok. Retest - Down to 4 failures and no hangups anymore (http- 3.8, socket 11.11/12/13). Note: The failing tests in socket are new. Without the patch they passed. Additionally apply tclUnixChan.c.diff - Ok. Reconfigure - Ok. Recompile everything - Ok. Retest - No change, still 4 errors, and exactly the same as before. tclUnixChan.c.diff does not seem to be effective for my machine. This could an OS problem, and one possibility is that my machine has a higher patchlevel than the machine of the submitter. Can't check. hobbs added on 2003-02-15 09:14:02: Logged In: YES user_id=72656 Should be tested and verified for 8.4.2. jdmartin added on 2002-12-11 10:28:51: File Added - 37330: tclUnixChan.c.diff jdmartin added on 2002-12-11 10:28:04: File Added - 37329: tcl.m4.diff |