cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-499074 ] More 64-bit woes

From: <noreply_at_sourceforge.net>
Date: Thu, 03 Jan 2002 11:05:38 -0800

Bugs item #499074, was opened at 2002-01-03 11:05
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=499074&group_id=976

Category: ftp
Group: crash
Status: Open
Resolution: None
Priority: 5
Submitted By: Philip Gladstone (philipjsg)
Assigned to: Daniel Stenberg (bagder)
Summary: More 64-bit woes

Initial Comment:
There are a couple of bugs in lib/ftp.c when running
under 64-bit solaris with optimization on.

1) The function inet_ntoa_r is used, but the relevant
bit of header file magic is not performed to ensure
that it is defined. The problem arises as INET_NTOA_R
is defined but the _DECL is not on solaris 8.

2) The buffer passed into gethostbyaddr is declared as
a char buffer. However, it needs to be aligned on an 8-
byte boundary so that 'char *' can be stored into it.

Suggested fix is to change the declaration of
hostent_buf to

long hostent_buf[9000 / sizeof(long)];

and then cast hostent_buf to (char *) in the three or
so places that it is used.

Once these two changes are made, the tests run cleanly
with CFLAGS='-xarch=v9a -mt -g -xO4'

Thanks

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=499074&group_id=976
Received on 2002-01-03