[Xcb] xcb with BSD make and on DragonFly

Jamey Sharp jamey at minilop.net
Sat Mar 11 11:01:56 PST 2006


In summary:

Solaris and DragonFly use a char* for iov_base (though Solaris hides it
behind the "caddr_t" name), while {Open,Net,Free}BSD and Linux use
void*.

Linux and Solaris both have the caddr_t typedef, which is a char* in
both cases. I'm guessing this typedef is available everywhere.

I could choose to cast all pointers either to char* or to void*, and
either choice would work on all of these platforms. I'm tempted to pick
char*, for two dumb reasons: it might make porting to really old
compilers easier (as if I care), and I often do byte-wise pointer math
on the iov_base elements (but I'll still have to explicitly cast in
those cases for Linux etc.). If I use char*, I could hide it behind
caddr_t, or not; but I'll probably drop all uses of caddr_t.

So I guess I have a plan for making this bit portable now.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060311/89018103/attachment.pgp


More information about the Xcb mailing list