wrong htons() used?

Scott Bambrough scottb@netwinder.org
Fri Oct 22 08:14:00 GMT 1999


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


More information about the Gdb mailing list