wrong htons() used?
Grant Edwards
grante@visi.com
Fri Oct 22 08:16:00 GMT 1999
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
More information about the Gdb
mailing list