[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#265245: acknowledged by developer (Re: Bug#265245: glibc-doc: htonl/ntohl belong in arpa/inet.h)

At Fri, 14 Jan 2005 19:55:19 +1100,
Herbert Xu wrote:
> > At Thu, 12 Aug 2004 21:08:42 +1000,
> > <herbert@gondor.apana.org.au> wrote:
> > > According to POSIX, htonl/ntohl are declared in arpa/inet.h.  So
> > > the info text should be modified to refer to that file instead of
> > > netinet/in.h.
> > 
> > Exactly POSIX says it should be arpa/inet.h.  However glibc put such
> > definitions in netinet/in.h.  But don't worry because arpa/inet.h
> > always includes netinet/in.h, so we don't violate POSIX definition.  I
> > close this report.
> Sorry I think you didn't get my point.  What I mean is that the
> documentation should refer the user to the POSIX standard location
> either by itself or in addition to where glibc actually puts it.

Exactly.  Actually the latest POSIX defines it in arpa/inet.h, however
historically it has been defined in netinet/in.h.  So I don't know
that your argument point is the real serious issue:

> Otherwise someone referring to the glibc documentation may unwittingly
> produce programs that don't work on other POSIX platforms.

Do you have more pointers which says we should change into arpa/inet.h?

The recent BSDs defines htonl in both netinet/in.h and arpa/inet.h.
Thinking about the definition of arpa/inet.h (definitions for internet
operations) and netinet/in.h (Internet address family) described in
SUSv3, moving it to arpa/inet.h makes sense for me.

However, I don't know why the recent POSIX wants to move it from
netinet/in.h to arpa/inet.h.  htonl entry in manual/socket.texi says
"@comment BSD", but I have difficulty to change this comment entry.
So, before modifying it, I would like to know your point more.

-- gotom

Reply to: