]> rtime.felk.cvut.cz Git - orte.git/commitdiff
Linux OMK configuration supports little- and big-endian targets without reconfigure.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 12 Sep 2013 16:18:23 +0000 (18:18 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 12 Sep 2013 16:18:23 +0000 (18:18 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
orte/include/orte/orte_config_omk_linux.h

index 3b9a89cb138291232910da1af63caf471b35d167..280afef16569b40d5703d8cbb77890e658539a3b 100644 (file)
@@ -52,6 +52,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define HAVE_DLFCN_H 1
 
+/* Define to 1 if you have the <endian.h> header file. */
+#define HAVE_ENDIAN_H 1
+
 /* Define to 1 if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H 1
 
 #ifndef __cplusplus
 /* #undef inline */
 #endif
+
+
+#ifdef HAVE_ENDIAN_H
+  #include <endian.h>
+  #ifdef __BYTE_ORDER
+    #if __BYTE_ORDER == __BIG_ENDIAN
+      #define WORDS_BIGENDIAN 1
+    #endif
+    #if __BYTE_ORDER == __LITTLE_ENDIAN
+      #undef WORDS_BIGENDIAN
+    #endif
+  #endif
+#endif
+