
P at draigBrady
Sep 5, 2011, 8:02 AM
Post #1 of 4
(300 views)
Permalink
|
|
endian oddity in cluster glue
|
|
I was looking at extricating some logic from cluster-glue-libs and noticed strangeness wrt the endianess checking. CONFIG_BIG_ENDIAN is defined on my x86 machine, which is due to configure.ac referencing a non existent byteorder_test.c To fix this I would suggest the following patch. However, I'm wary that this may introduce compatibility issues with generated md5 sums which is the only code that inspects the above defines. If we stick with BIG_ENDIAN always then there will be interoperability issues between x86 and ppc hosts for example (which may not be an issue)? cheers, Pádraig. diff -r 177de02442d5 configure.ac --- a/configure.ac Wed Aug 17 18:00:09 2011 +0200 +++ b/configure.ac Mon Sep 05 15:49:12 2011 +0100 @@ -466,11 +466,7 @@ [AC_MSG_RESULT(fail); AC_DEFINE(GETPID_INCONSISTENT, 1 , [pid inconsistent])],) LIBS=$ac_save_LIBS -dnl check byte order -AC_MSG_CHECKING(for byteorder) -AC_TRY_RUN(`cat $srcdir/config/byteorder_test.c`, -[AC_MSG_RESULT(little-endian); AC_DEFINE(CONFIG_LITTLE_ENDIAN, 1, [little-endian])], -[AC_MSG_RESULT(big-endian); AC_DEFINE(CONFIG_BIG_ENDIAN, 1, [big-endian])],) +AC_C_BIGENDIAN([AC_DEFINE(CONFIG_BIG_ENDIAN, 1, [big])], [AC_DEFINE(CONFIG_LITTLE_ENDIAN, 1, [little])]) _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev [at] lists http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
|