X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=alloc%2Falloc.c;h=f7a05e2d9f273d64f98aa36d977b80121094f057;hp=cc1b845b550ef61dfba54c045550ea775846ff65;hb=b27117c6584bbb80b14c589dfc840f658a36aaea;hpb=224a8f1fc009949d7d84bd2cdb89cfd7f4f1e733 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. */