From: Ken Murchison (no email)
Date: Mon Sep 17 2007 - 13:47:59 EDT
Andy Fiddaman wrote:
> On Mon, 17 Sep 2007, Ken Murchison wrote:
> ; Good point. I'm wondering if we need the struct at all, and can just use a
> ; union.
>
> You're right, I've just tested the following and it works fine:
>
> #define ALIGNBUF(buf, size) \
> union { \
> bit64 align8; \
> char buf[(size)]; \
> } align8buf; \
> char *buf = align8buf.buf
I didn't like the way that the macro looked in the code, so I just
typedef'd it instead. Here is my current patch. If it works, I'll
commit it.
-- Kenneth Murchison Systems Programmer Project Cyrus Developer/Maintainer Carnegie Mellon University
---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
|
|
|