From 5e115e2441ed32f5fa495370b36b01c03bbff66d Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Thu, 2 Mar 2006 15:35:31 -0800 Subject: [PATCH] API/ABI change: XCBSendRequest callers must pad to 4-byte boundaries now. When not in RAW mode, a null pointer for iov_base is replaced by up to 3 padding bytes. --- configure.ac | 1 - src/c-client.xsl | 12 ++++++--- src/xcb_out.c | 70 +++++++++++++++--------------------------------- 3 files changed, 29 insertions(+), 54 deletions(-) diff --git a/configure.ac b/configure.ac index a07a89e..5e4405c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,6 @@ AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR) AC_SUBST(XCBPROTO_XCBINCLUDEDIR) AC_HEADER_STDC -AC_FUNC_ALLOCA AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(connect, socket) diff --git a/src/c-client.xsl b/src/c-client.xsl index 3ab2889..bee7275 100644 --- a/src/c-client.xsl +++ b/src/c-client.xsl @@ -567,7 +567,7 @@ authorization from the authors. - + static const XCBProtocolRequest xcb_req = { @@ -586,7 +586,7 @@ authorization from the authors. }; - struct iovec xcb_parts[]; + struct iovec xcb_parts[]; xcb_ret; xcb_out; @@ -598,17 +598,21 @@ authorization from the authors. xcb_parts[0].iov_base = &xcb_out; xcb_parts[0].iov_len = sizeof(xcb_out); + xcb_parts[1].iov_base = 0; + xcb_parts[1].iov_len = -xcb_parts[0].iov_len & 3; - xcb_parts[].iov_base = (void *) ; - xcb_parts[].iov_len = * sizeof( ) ; + xcb_parts[ * 2 + 1].iov_base = 0; + xcb_parts[ * 2 + 1].iov_len = -xcb_parts[ * 2].iov_len & 3; XCBSendRequest(c, &xcb_ret.sequence,