From: Andy Fiddaman (no email)
Date: Mon Sep 17 2007 - 09:45:07 EDT
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
---- 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
|
|
|