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?


On Fri, Oct 22, 1999 at 08:08:27AM -0700, J.T. Conklin wrote:
> >>>>> "Grant" == Grant Edwards <grante@visi.com> writes:

> Grant> Apparently it is __BIG_ENDIAN.  Which is wrong, since it's a
> Grant> 386.
> 
> You might want to examine the preprocessed output again, but this time
> invoke gcc with the -dD flag as well.  The preprocessing results will
> be output along with the #define directives that are normally removed.
> Scan the output for where __BIG_ENDIAN is defined, and then track it
> down from there.

Neither __BIG_ENDIAN nor __LITTLE_ENDIAN is defined, since the file
rdi-share/endian.h is shadowing /usr/include/endian.h.  I think that
this means things default to BIG_ENDIAN behavior.

I thing the best option is to rename rdi-share/endian.h so that it
doesn't shadow /usr/include/endian.h.  rdi-share/endian.h doesn't
appeart to be some strictly local stuff and not intented as a
replacement for /usr/include/endian.h.

One would also think that this all could have been avoided by proper
usage of

#include <foo.h> 

  bs.

#include "foo.h"

--
Grant

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