Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-02-20
13:06 • Closed ticket [651811ffff]: Fix broken sockets on HPUX 64-bit plus 7 other c... artifact: b94a5cc5c0 user: andreas_kupries
2003-02-19
05:57 • Ticket [651811ffff]: 4 changes artifact: c6da2bb5cd user: andreas_kupries
2003-02-15
09:14 • Ticket [651811ffff]: 5 changes artifact: 163a6ea36e user: hobbs
2002-12-11
10:28 • Add attachment tclUnixChan.c.diff to ticket [651811ffffffffff|651811fff... artifact: 2fc0e4d440 user: jdmartin
10:28 • Ticket [651811ffff] Fix broken sockets on HPUX 64-bit status still Open with... artifact: d8bcd59b4e user: jdmartin
10:28 • Ticket [651811ffff]: 4 changes artifact: 5c7d85a0c9 user: jdmartin
10:28 • Add attachment tcl.m4.diff to ticket [651811ffff] artifact: 173276a78e user: jdmartin
03:26 • New ticket [651811ffff] Fix broken sockets on HPUX 64-bit. artifact: ef609afee9 user: jdmartin

Fix broken sockets on HPUX 64-bit

Closed / Accepted651811ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-12-11 03:26:22
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.
jdmartinplain2002-12-11 10:28:04
File Added - 37329: tcl.m4.diff
jdmartinplain2002-12-11 10:28:51
File Added - 37330: tclUnixChan.c.diff
hobbsplain2003-02-15 09:14:02
Logged In: YES 
user_id=72656

Should be tested and verified for 8.4.2.
andreas_kupriesplain2003-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.
andreas_kupriesplain2003-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.
Log in (anonymous is fine) to add a comment.

Attachments: