summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Crestani <crestani@informatik.uni-tuebingen.de>2013-12-23 23:30:04 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-12-24 11:06:51 +0100
commitd25806902ee6050ec3d52480d0bc8f4889942350 (patch)
tree1e8901a01cac595a26623632947e8fc8dc79be44
parentf557760c56ba4eb44063936d8fa49473532e21c6 (diff)
Use CFSwapInt32LittleToHost from CoreFoundation.h on Mac OS X to implement le32toh.
-rw-r--r--configure.ac2
-rw-r--r--cursor/parse_cursor_file.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4baa90a..7b45299 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ XCB_UTIL_COMMON([1.4], [1.6])
AM_MISSING_PROG([GPERF], [gperf])
-AC_CHECK_HEADERS([endian.h sys/endian.h sys/byteorder.h], [break])
+AC_CHECK_HEADERS([endian.h sys/endian.h sys/byteorder.h CoreFoundation/CoreFoundation.h], [break])
AC_CHECK_FUNCS([le32toh])
PKG_CHECK_MODULES(XCB_RENDER, xcb-render)
diff --git a/cursor/parse_cursor_file.c b/cursor/parse_cursor_file.c
index 30c6a58..0226b01 100644
--- a/cursor/parse_cursor_file.c
+++ b/cursor/parse_cursor_file.c
@@ -48,6 +48,9 @@
# ifndef HAVE_LE32TOH
# define le32toh(x) LE_32(x)
# endif
+#elif defined(HAVE_COREFOUNDATION_COREFOUNDATION_H)
+#include <CoreFoundation/CoreFoundation.h>
+#define le32toh(x) CFSwapInt32LittleToHost(x)
#endif
#include <xcb/xcb.h>