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?


Grant Edwards wrote:
> 
> htons(x) with optimization on  reduces to (x)
> htons(x) with optimization off reduces to htons(x)
> 
> > The answer to this should tell you if __BYTE_ORDER == __BIG_ENDIAN
> > or __LITTLE_ENDIAN.
> 
> Apparently it is __BIG_ENDIAN.  Which is wrong, since it's a 386.
> 

Why not edit etherdrv.c and redefine __BYTE_ORDER to something else. 
The compiler might be nice enough to issue a warning about the
redefinition and tell you where the previous definition came from.

Scott

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