Code

Restore BYTE_ORDER on DARWIN The files matching grep "define _POSIX_C_SOURCE" src...
authorDoug MacEachern <dougm@hyperic.com>
Fri, 10 Apr 2009 21:54:11 +0000 (14:54 -0700)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 11 Apr 2009 07:31:00 +0000 (09:31 +0200)
See /usr/include/i386/endian.h:
 #if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))

 #define LITTLE_ENDIAN   __DARWIN_LITTLE_ENDIAN
 #define BIG_ENDIAN      __DARWIN_BIG_ENDIAN
 #define BYTE_ORDER      __DARWIN_BYTE_ORDER

Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/collectd.h

index 6fed9002e02713d6ce59e13ea5840d207cd2acc0..24e5add3c4ceeb807668851c88900c9e002505b2 100644 (file)
 #  define BYTE_ORDER _BYTE_ORDER
 # elif defined(__BYTE_ORDER)
 #  define BYTE_ORDER __BYTE_ORDER
+# elif defined(__DARWIN_BYTE_ORDER)
+#  define BYTE_ORDER __DARWIN_BYTE_ORDER
 # endif
 #endif
 #ifndef BIG_ENDIAN
 #  define BIG_ENDIAN _BIG_ENDIAN
 # elif defined(__BIG_ENDIAN)
 #  define BIG_ENDIAN __BIG_ENDIAN
+# elif defined(__DARWIN_BIG_ENDIAN)
+#  define BIG_ENDIAN __DARWIN_BIG_ENDIAN
 # endif
 #endif
 #ifndef LITTLE_ENDIAN
 #  define LITTLE_ENDIAN _LITTLE_ENDIAN
 # elif defined(__LITTLE_ENDIAN)
 #  define LITTLE_ENDIAN __LITTLE_ENDIAN
+# elif defined(__DARWIN_LITTLE_ENDIAN)
+#  define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
 # endif
 #endif
 #ifndef BYTE_ORDER