X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FRts.h;h=ec84ed9671bff494da24861d42f360ea7c6bfc4c;hb=5f15c042606033ce3b953837fc4a2f76674c4839;hp=5aff979fd914cdab966a49d44ada802f194f88f0;hpb=e9fdcd7b7d8ae466d83ce9f77f34e9b62b2a4fa7;p=ghc-hetmet.git diff --git a/includes/Rts.h b/includes/Rts.h index 5aff979..ec84ed9 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -51,7 +51,9 @@ extern "C" { * We often want to know the size of something in units of an * StgWord... (rounded up, of course!) */ -#define sizeofW(t) ((sizeof(t)+sizeof(W_)-1)/sizeof(W_)) +#define ROUNDUP_BYTES_TO_WDS(n) (((n) + sizeof(W_) - 1) / sizeof(W_)) + +#define sizeofW(t) ROUNDUP_BYTES_TO_WDS(sizeof(t)) /* * It's nice to be able to grep for casts