This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: wrong htons() used?


> More seriously, why is <netinet/in.h> picking up the wrong endian.h? 
> Has this always happened or has something else recently changed?

Probably because it goes 

#include <endian.h> 

and is then compiled with a -I somewhere_with_a_different_endian.h

If I understand gcc's include searching rules properly, netinet/in.h 
should probably go

#include "../endian.h"

so that it will start the search will start from netinet rather than using 
the include path.

R.


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