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

Michael Stapelberg stapelberg at kemper.freedesktop.org
Mon Aug 12 00:07:34 PDT 2013


 configure.ac               |    2 ++
 cursor/parse_cursor_file.c |    7 +++++++
 cursor/shape_to_id.gperf   |    1 +
 3 files changed, 10 insertions(+)

New commits:
commit 6a09059f67217f15573fd88f44d57623a5f1402d
Author: Michael Stapelberg <michael at stapelberg.de>
Date:   Mon Aug 12 09:07:02 2013 +0200

    Silence compiler warning (Thanks Niclas Zeising)

diff --git a/cursor/shape_to_id.gperf b/cursor/shape_to_id.gperf
index 1b7b971..23615f9 100644
--- a/cursor/shape_to_id.gperf
+++ b/cursor/shape_to_id.gperf
@@ -1,4 +1,5 @@
 struct shape_mapping { const char *name; int number; };
+const int cursor_shape_to_id(const char *name);
 %%
 X_cursor,0
 arrow,1
commit 37f1e431279998966caabebae3daf7e44d901768
Author: Niclas Zeising <zeising at daemonic.se>
Date:   Sat Aug 10 16:11:40 2013 +0200

    Fix build on FreeBSD (and possibly other BSDs)
    
    FreeBSD have the le32toh macro in <sys/endian.h>, and this file is not
    indirectly included by any other header in util-cursor.  Add a configure
    check that checks for <endian.h> (Linux) and <sys/endian.h> (FreeBSD),
    and include the right file based on this check.
    
    Signed-off-by:	Niclas Zeising <zeising at daemonic.se>

diff --git a/configure.ac b/configure.ac
index 55317fc..61ff046 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,8 @@ XCB_UTIL_COMMON([1.4], [1.6])
 
 AM_MISSING_PROG([GPERF], [gperf])
 
+AC_CHECK_HEADERS([endian.h sys/endian.h], [break])
+
 PKG_CHECK_MODULES(XCB_RENDER, xcb-render)
 PKG_CHECK_MODULES(XCB_RENDERUTIL, xcb-renderutil)
 PKG_CHECK_MODULES(XCB_IMAGE, xcb-image)
diff --git a/cursor/parse_cursor_file.c b/cursor/parse_cursor_file.c
index e8a47bc..8c52cfe 100644
--- a/cursor/parse_cursor_file.c
+++ b/cursor/parse_cursor_file.c
@@ -36,6 +36,13 @@
 #include <fcntl.h>
 #include <unistd.h>
 
+#ifdef HAVE_ENDIAN_H
+#include <endian.h>
+#endif
+#ifdef HAVE_SYS_ENDIAN_H
+#include <sys/endian.h>
+#endif
+
 #include <xcb/xcb.h>
 
 #include "cursor.h"


More information about the xcb-commit mailing list