[Xcb] Number of iovecs for xcb_send_request()

Alan Coopersmith alan.coopersmith at oracle.com
Sun Aug 12 13:24:38 PDT 2012


On 08/12/12 12:42 PM, Uli Schlachter wrote:
> Fixing this is straight forward, but it makes me wonder how portable IOV_MAX is.

It's defined in Unix98, which at this point makes it pretty damned portable:
   http://pubs.opengroup.org/onlinepubs/007908799/xsh/write.html

xcb should probably be compiling with AC_USE_SYSTEM_EXTENSIONS to set all
necessary standards extension flags for the various platforms to help with
things like this:

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Posix-Variants.html

This should take care of that (copied from libX11's configure.ac):

diff --git a/configure.ac b/configure.ac
index e94e32c..ab36524 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,8 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.

-AC_PREREQ(2.57)
+# Minimum of autoconf 2.60 needed for AC_USE_SYSTEM_EXTENSIONS
+AC_PREREQ(2.60)
 AC_INIT([libxcb],
         1.8.1,
         [xcb at lists.freedesktop.org])
@@ -9,6 +10,11 @@ AC_CONFIG_SRCDIR([xcb.pc.in])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
+# to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
 AM_PATH_PYTHON([2.6])

 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the Xcb mailing list