Subject: standards/12703: gethostbyaddr len paramter has incorrect type
To: None <gnats-bugs@gnats.netbsd.org>
From: None <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 04/20/2001 02:07:14
>Number: 12703
>Category: standards
>Synopsis: gethostbyaddr len paramter has incorrect type
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: standards-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Apr 19 09:08:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Simon Burge
>Release: all versions
>Organization:
Wasabi Systems
>Environment:
System: NetBSD thoreau.thistledown.com.au 1.5 NetBSD 1.5 (THOREAU)
#34: Fri Jan 12 12:03:49 EST 2001
simonb@thoreau.thistledown.com.au:/usr/obj/sys/arch/alpha/compile/THOREAU alpha
>Description:
According to the Single UNIX Specification, Version 2 (ref
http://www.opengroup.org/onlinepubs/007908799/xns/gethostbyaddr.html)
the len (second parameter) of gethostbyaddr should be a size_t
and is currently an int on NetBSD.
>How-To-Repeat:
By inspection.
>Fix:
Change the len parameter to a size_t instead of an int?
Two ABI issues come to mind - changing from a signed type to
an unsigned type (size_t is unsigned on all platforms), and
changing from an int size type to a long sized type. The only
ports where size_t is long are alpha, sparc, sparc64 and ELF-vax
(whether or not this is a bug is a separate question).
>Release-Note:
>Audit-Trail:
>Unformatted: