[Xcb-commit] xcb/util-cursor: configure.ac cursor

Michael Stapelberg stapelberg at kemper.freedesktop.org
Tue Dec 24 02:08:26 PST 2013


 configure.ac               |    2 +-
 cursor/parse_cursor_file.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d25806902ee6050ec3d52480d0bc8f4889942350
Author: Marcus Crestani <crestani at informatik.uni-tuebingen.de>
Date:   Mon Dec 23 23:30:04 2013 +0100

    Use CFSwapInt32LittleToHost from CoreFoundation.h on Mac OS X to implement le32toh.

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>


More information about the xcb-commit mailing list