[Xcb] [PATCH] cursor: Fix issue with gcc

Stefan Dirsch sndirsch at suse.de
Thu Apr 21 15:37:44 UTC 2016


From: Kristoffer Grönlund <krig at koru.se>

cursor_shape_to_id should not be declared const, else it is not
added to the static library.
---
 NEWS                     | 9 +++++++++
 configure.ac             | 2 +-
 cursor/cursor.h          | 2 +-
 cursor/shape_to_id.gperf | 4 ++--
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 13a13ac..5de201d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+Release 0.1.2  (2015-03-35)
+===========================
+
+- Use CFSwapInt32LittleToHost from CoreFoundation.h on Mac OS X to implement
+  le32toh.
+- Check submodules before running autoconf.
+- darwin: Use OSByteOrder.h rather than CF.
+- Perform safety check before trying to load glyph cursorHEADmaster
+
 Release 0.1.1  (2013-11-12)
 ===========================
 
diff --git a/configure.ac b/configure.ac
index 94798d8..89efe39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl XCB_UTIL_M4_WITH_INCLUDE_PATH requires Autoconf >= 2.62
 AC_PREREQ(2.62)
-AC_INIT([xcb-util-cursor],0.1.1,[xcb at lists.freedesktop.org])
+AC_INIT([xcb-util-cursor],0.1.2,[xcb at lists.freedesktop.org])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/cursor/cursor.h b/cursor/cursor.h
index 455dc34..3fe7096 100644
--- a/cursor/cursor.h
+++ b/cursor/cursor.h
@@ -161,7 +161,7 @@ typedef struct xcint_image_t {
 } __attribute__((packed)) xcint_image_t;
 
 /* shape_to_id.c */
-const int cursor_shape_to_id(const char *name);
+int cursor_shape_to_id(const char *name);
 
 /* parse_cursor_file.c */
 int parse_cursor_file(xcb_cursor_context_t *c, const int fd, xcint_image_t **images, int *nimg);
diff --git a/cursor/shape_to_id.gperf b/cursor/shape_to_id.gperf
index 23615f9..6c8818e 100644
--- a/cursor/shape_to_id.gperf
+++ b/cursor/shape_to_id.gperf
@@ -1,5 +1,5 @@
 struct shape_mapping { const char *name; int number; };
-const int cursor_shape_to_id(const char *name);
+int cursor_shape_to_id(const char *name);
 %%
 X_cursor,0
 arrow,1
@@ -79,7 +79,7 @@ ur_angle,74
 watch,75
 xterm,76
 %%
-const int cursor_shape_to_id(const char *name) {
+int cursor_shape_to_id(const char *name) {
 	struct shape_mapping *mapping = in_word_set(name, strlen(name));
 	return (mapping ? (mapping->number * 2) : -1);
 }
-- 
2.6.2



More information about the Xcb mailing list