summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2009-06-03 20:50:32 +0900
committerArnaud Fontaine <arnau@debian.org>2009-06-03 21:40:23 +0900
commitf68336d94fdb8f2f4758cc0fd4c0fc7e9e667e1e (patch)
treecfc10cb0c3bc16b39f886080cd488ff938109dd2
parentd153adcab9128318753099c1fad24e40c18ab134 (diff)
Check for ssize_t in configure for xcb-util-common.h
-rw-r--r--configure.ac6
-rw-r--r--xcb-util-common.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a1140b6..714b617 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,5 @@
-AC_PREREQ(2.57)
+dnl AC_TYPE_SSIZE_T is defined from 2.59c
+AC_PREREQ(2.59c)
AC_INIT([xcb-util],0.3.5,[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -41,6 +42,9 @@ fi
AC_SUBST(CWARNFLAGS)
AC_CHECK_FUNCS_ONCE(vasprintf)
+dnl Checking whether ssize_t is defined (xcb-util-common.h)
+AC_TYPE_SSIZE_T
+
xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)
diff --git a/xcb-util-common.h b/xcb-util-common.h
index b325bf5..a76fbb3 100644
--- a/xcb-util-common.h
+++ b/xcb-util-common.h
@@ -29,5 +29,9 @@
*
*/
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
#define ssizeof(foo) (ssize_t)sizeof(foo)
#define countof(foo) (ssizeof(foo) / ssizeof(foo[0]))