This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: >/usr/include/arpa/inet.h:67: conflicting types for `htons' (fwd)
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: >/usr/include/arpa/inet.h:67: conflicting types for `htons' (fwd)
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Mon, 5 Jul 1999 20:29:19 -0500
- Cc: law at cygnus dot com, dacoder at dcoder dot com, tangent at cyberport dot net, egcs at egcs dot cygnus dot com
- References: <28156.930816425@upchuck.cygnus.com> <199907051813.TAA26302@phal.cygnus.co.uk>
> > Another might be to conditionalize the inet.h prototypes if there
> > is something we can use to determine if we have already included
> > byteorder.h.
>
> So what would happen if the user included byteorder.h after inet.h ?
The right thing would happen.
1) inet.h includes inet/in.h.
2) inet/in.h includes sys/byteorder.h
3) the GCC-provided sys/byteorder.h is safe from multiple inclusion.
Quick testing confirms what examination told me.
Without the patch, most code that uses networking won't even compile. If
there is a problem I'll deal with it in 2.95.1.
Thanx for looking over our shoulder, Joern.
RJL