diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-03-11 20:32:04 -0800 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-03-11 20:32:04 -0800 |
commit | 5cdc02e3441dc623e91ebc5d7f735565b83f8435 (patch) | |
tree | db6d750e0799966c3809a081e66f9072aee54e7d /src | |
parent | 5b0ae3421dd373a8575b7a0d60989edfc056cf71 (diff) |
Portability fixes. Should help DragonFly and Solaris, and should not hurt anything else. Tested only on linux so far though.
Diffstat (limited to 'src')
-rw-r--r-- | src/c-client.xsl | 4 | ||||
-rw-r--r-- | src/xcb.h | 1 | ||||
-rw-r--r-- | src/xcb_conn.c | 6 | ||||
-rw-r--r-- | src/xcb_out.c | 2 | ||||
-rw-r--r-- | src/xcb_util.c | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/src/c-client.xsl b/src/c-client.xsl index c35fe33..054d84a 100644 --- a/src/c-client.xsl +++ b/src/c-client.xsl @@ -596,13 +596,13 @@ authorization from the authors. mode="assign" /> <l /> - <l>xcb_parts[2].iov_base = &xcb_out;</l> + <l>xcb_parts[2].iov_base = (char *) &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 & 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" /><!-- @@ -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/src/xcb_conn.c b/src/xcb_conn.c index 5839ed8..2fed0ba 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -73,18 +73,18 @@ static int write_setup(XCBConnection *c, XCBAuthInfo *auth_info) 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/src/xcb_out.c b/src/xcb_out.c index 2494ef3..10ef775 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -101,7 +101,7 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c 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/src/xcb_util.c b/src/xcb_util.c index 3d6006c..3524899 100644 --- a/src/xcb_util.c +++ b/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> |