XSH ERN 22 and XBD ERN 24, requesting a correction to the data
type of the flags argument of the getnameinfo() function, were
rejected with the following rationale:
"During the development of XNS5.2 it was felt that the flag
need not be signed, and consensus would be reduced for it
to be changed at this stage."
I take issue with this decision. I believe this was an
error of oversight in XNS 5.2. For many years, starting
years before the publication of XNS 5.2, the consensus of
the implementors, and of the IETF IPv6 working group which
defined the API, has been to use data type 'int'.
Also, I take issue with a number of the statements recorded
in the meeting minutes of the discussion of XSH ERN 22.
"Leaving it as unsigned is better engineering."
This is not about engineering, it is about standardizing
widespread practice.
"Forcing implementations to change from int to usigned is
actually not a big deal"
Forcing an implementation to change anything is absolutely a big deal,
involving real costs for development, testing, and documentation.
Forcing nine (or more) implementations to change is an even bigger deal.
"General consensus is reject on the grounds that it makes no
difference to apps only to implementations"
If it makes no difference to apps, only to implementations, that's a
stronger argument for accepting this change than it is for rejecting it.
"(half of which are right already)"
The aardvark mentions 10 implementations, 9 of which implement 'int',
and 1 of which implements 'unsigned int'. That's 90% and 10%, neither
of which is close to "half". I'll skip the debate about which group
is "right".
In addition to this Austin change request, I have now filed an
interpretation request against XNS 5.2 which states:
CAE specification:
C808 Networking Services (XNS) Issue 5.2
Request Summary:
The data type of the flags argument of the getnameinfo()
function should be 'int'. The data type is currently
specified as 'unsigned int'.
Supporting Information:
The getnameinfo() function was originally specified by the IETF
IPv6 working group in RFC 2133 (April 1997) and RFC 2553 (March
1999). Both of these RFCs specified the data type of the flags
argument of the getnameinfo() function to be 'int'.
Although these IETF documents are informational only, they were
the basis for most implementations of the getnameinfo() function.
The following implementations use type 'int' for the flags
argument of getnameinfo():
Solaris 9
Solaris 8
IBM AIX
HP-UX
Windows XP
FreeBSD
OpenBSD
NetBSD
Tru64 UNIX
OpenVMS
Type 'int' is also documented in the book "UNIX Network
Programming", Volume 1, second edition, 1998, by W. Richard
Stevens.
When the getnameinfo() function was incorporated into the
Networking Services (XNS) Issue 5.2 (January 2000) specification,
the data type of the flags argument of the getnameinfo()
function was changed to be 'unsigned int'. We believe this
was an oversight, and that the XNS 5.2 specification should
be modified to specify the data type to be 'int'.
Requested Changes:
On page 89 getnameinfo() in the SYNOPSIS section, change
"unsigned int flags" to "int flags".
On page 100 <netdb.h> in the prototype for the getnameinfo()
function, change "unsigned int" to "int". Note: the prototype
for getnameinfo() was added by Corrigendum U050.
- Jack McCann
|