On Tue, Aug 17, 2010 at 9:44 AM, Karel Zak wrote: > On Tue, Aug 17, 2010 at 08:49:50AM -0400, Mike Frysinger wrote: >> On Tue, Aug 17, 2010 at 8:41 AM, Davidlohr Bueso wrote: >> > +static >> > +int get_byteorder(void) >> > +{ >> > + int x = 1; >> > + if (*(char *)&x == LENDIAN) >> > + return LENDIAN; >> > + else return BENDIAN; >> > +} >> >> this looks like aliasing violations. since util-linux is autotooled, >> use AC_C_BIGENDIAN and then WORDS_BIGENDIAN (assuming util-linux >> doesnt already provide something). > > $ grep ENDIAN ./configure.ac > AC_C_BIGENDIAN > > or include bitops.h and use #if (__BYTE_ORDER == __BIG_ENDIAN) or so. a glance at bitops.h looks like it should be respecting WORDS_BIGENDIAN instead of its own system checks ... -mike -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html