From: Rusty Russell Date: Sun, 18 May 2008 06:20:39 +0000 (+1000) Subject: Use new alignof package X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=b27117c6584bbb80b14c589dfc840f658a36aaea Use new alignof package --- diff --git a/alloc/alloc.c b/alloc/alloc.c index cc1b845b..f7a05e2d 100644 --- a/alloc/alloc.c +++ b/alloc/alloc.c @@ -6,16 +6,11 @@ #include #include "alloc.h" #include "build_assert/build_assert.h" +#include "alignof/alignof.h" #include "config.h" /* FIXME: We assume getpagesize() doesnt change. Remapping file with * different pagesize should still work. */ -#if HAVE_ALIGNOF -#define ALIGNOF(t) __alignof__(t) -#else -/* Alignment by measuring structure padding. */ -#define ALIGNOF(t) (sizeof(struct { char c; t _h; }) - 1 - sizeof(t)) -#endif /* FIXME: Doesn't handle non-page-aligned poolsize. */