Sat Jun 16 10:42:33 PDT 2012
On Tue, Jun 12, 2012 at 03:36:37PM +0200, pek at kth.se wrote:
> Whats the story with the *BYTE_ORDER macros?
Long history and multiple different places where these could be set..
> crypto/md4-internal.c checks BYTE_ORDER, is this a bug?
> It is unclear to me if this is ever defined in the general case.
This is defined by endian.h (from C library).. Could be cleaner to
change that to use __BYTE_ORDER to match with the eap_peer/ikev2.c use
or move to WORDS_BIGENDIAN which is used in some more places.
> driver_atheros.c can define _BYTE_ORDER (but doesn't use it). It doesn't
> feel like this file should diddle around with these macros at all.
> It seems to the uninitiated that __BYTE_ORDER is the macro that all code
> is intended to use since common.h defines it. Is this correct?
Well, not necessarily.. This is a question of whether to use the
__BYTE_ORDER from system headers (with possible compatibility code from
common.h) or to move something specific to hostap.git (like
WORDS_BIGENDIAN). I'm not aware of places where the current
implementation would not work, but well, it could certainly be cleaned
Jouni Malinen PGP id EFC895FA
More information about the Hostap