This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: >/usr/include/arpa/inet.h:67: conflicting types for `htons' (fwd)


> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]