[Xcb-commit] xcb

Jamey Sharp jamey at kemper.freedesktop.org
Sat Mar 11 20:33:44 PST 2006


 xcb/src/c-client.xsl |    4 ++--
 xcb/src/xcb.h        |    1 +
 xcb/src/xcb_conn.c   |    6 +++---
 xcb/src/xcb_out.c    |    2 +-
 xcb/src/xcb_util.c   |    1 +
 5 files changed, 8 insertions(+), 6 deletions(-)

New commits:
diff-tree 284d28a2a968f4e520a60cda1c7c326074ca9f65 (from 6a84941b1a69aea7013f752d3582c1862b64feb0)
Author: Jamey Sharp <jamey at minilop.net>
Date:   Sat Mar 11 20:32:04 2006 -0800

    Portability fixes. Should help DragonFly and Solaris, and should not hurt anything else. Tested only on linux so far though.

diff --git a/xcb/src/c-client.xsl b/xcb/src/c-client.xsl
index c35fe33..054d84a 100644
--- a/xcb/src/c-client.xsl
+++ b/xcb/src/c-client.xsl
@@ -596,13 +596,13 @@ authorization from the authors.
                          mode="assign" />
 
     <l />
-    <l>xcb_parts[2].iov_base = &amp;xcb_out;</l>
+    <l>xcb_parts[2].iov_base = (char *) &amp;xcb_out;</l>
     <l>xcb_parts[2].iov_len = sizeof(xcb_out);</l>
     <l>xcb_parts[3].iov_base = 0;</l>
     <l>xcb_parts[3].iov_len = -xcb_parts[2].iov_len &amp; 3;</l>
 
     <xsl:for-each select="$struct/list">
-      <l>xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_base = (void *) <!--
+      <l>xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_base = (char *) <!--
       --><xsl:value-of select="@name" />;</l>
       <l>xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_len = <!--
       --><xsl:apply-templates mode="output-expression" /><!--
diff --git a/xcb/src/xcb.h b/xcb/src/xcb.h
index ee87a99..68c32a8 100644
--- a/xcb/src/xcb.h
+++ b/xcb/src/xcb.h
@@ -27,6 +27,7 @@
 
 #ifndef __XCB_H
 #define __XCB_H
+#include <sys/types.h>
 #include <X11/Xmd.h>
 #include <X11/X.h>
 #include <sys/uio.h>
diff --git a/xcb/src/xcb_conn.c b/xcb/src/xcb_conn.c
index 5839ed8..2fed0ba 100644
--- a/xcb/src/xcb_conn.c
+++ b/xcb/src/xcb_conn.c
@@ -73,18 +73,18 @@ static int write_setup(XCBConnection *c,
     parts[count].iov_len = sizeof(XCBConnSetupReq);
     parts[count++].iov_base = &out;
     parts[count].iov_len = XCB_PAD(sizeof(XCBConnSetupReq));
-    parts[count++].iov_base = (caddr_t) pad;
+    parts[count++].iov_base = (char *) pad;
 
     if(auth_info)
     {
         parts[count].iov_len = out.authorization_protocol_name_len = auth_info->namelen;
         parts[count++].iov_base = auth_info->name;
         parts[count].iov_len = XCB_PAD(out.authorization_protocol_name_len);
-        parts[count++].iov_base = (caddr_t) pad;
+        parts[count++].iov_base = (char *) pad;
         parts[count].iov_len = out.authorization_protocol_data_len = auth_info->datalen;
         parts[count++].iov_base = auth_info->data;
         parts[count].iov_len = XCB_PAD(out.authorization_protocol_data_len);
-        parts[count++].iov_base = (caddr_t) pad;
+        parts[count++].iov_base = (char *) pad;
     }
     assert(count <= sizeof(parts) / sizeof(*parts));
 
diff --git a/xcb/src/xcb_out.c b/xcb/src/xcb_out.c
index 2494ef3..10ef775 100644
--- a/xcb/src/xcb_out.c
+++ b/xcb/src/xcb_out.c
@@ -101,7 +101,7 @@ unsigned int XCBSendRequest(XCBConnectio
             longlen += vector[i].iov_len;
             if(!vector[i].iov_base)
             {
-                vector[i].iov_base = (caddr_t) pad;
+                vector[i].iov_base = (char *) pad;
                 assert(vector[i].iov_len <= sizeof(pad));
             }
         }
diff --git a/xcb/src/xcb_util.c b/xcb/src/xcb_util.c
index 3d6006c..3524899 100644
--- a/xcb/src/xcb_util.c
+++ b/xcb/src/xcb_util.c
@@ -26,6 +26,7 @@
 /* Utility functions implementable using only public APIs. */
 
 #include <assert.h>
+#include <sys/types.h>
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/un.h>


More information about the xcb-commit mailing list