Date: Tue, 5 Mar 2002 00:35:57 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: Garance A Drosihn <drosih@rpi.edu> Cc: freebsd-standards@FreeBSD.org Subject: Re: netinet/in.h vs arpa/inet.h Message-ID: <20020305003557.C33110@espresso.q9media.com> In-Reply-To: <p05101502b8aa0629a3ff@[128.113.24.47]>; from drosih@rpi.edu on Tue, Mar 05, 2002 at 12:31:11AM -0500 References: <p05101502b8aa0629a3ff@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
Garance A Drosihn <drosih@rpi.edu> writes: > Now that I've finally got myself switched over to 5.0-current, > I'm getting back to some lpr changes. I notice that if I > compile lpr with -Wredundant-decls, I get a few warnings from > source files which have: > > #include <netinet/in.h> > #include <arpa/inet.h> > > Eg: > /usr/include/arpa/inet.h:127: warning: redundant redeclaration of > `__htonl' in same scope > /usr/include/machine/endian.h:67: warning: previous declaration of `__htonl' > > (plus similar warnings for __htons __ntohl __ntohs) > > Now, I find I can just comment out the include for arpa/inet.h, > and everything compiles OK (on both current and stable, if I've > tested correctly..). On the other hand, I do not get these > warnings even if I compile with -Wredundant-decls on -stable. > > Should I just remove the arpa/inet.h, or does this indicate that > something isn't quite perfect with the recent changes to various > include files under -current? This should be fixed shortly. The problem mainly stems from POSIX's requirements for the ntohl() family of functions to be defined in multiple headers. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020305003557.C33110>