64-bit alignment problems.

Andy Fiddaman cyrus at fiddaman.net
Mon Sep 17 09:45:07 EDT 2007


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




More information about the Info-cyrus mailing list