From: teodor Date: Tue, 13 Apr 2010 17:15:30 +0000 (+0000) Subject: use uintptr_t instead of long in TYPEALIGN macros X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=853723f7101cc42b7e76b72c70dfd7d7f804cc75;p=tedtools.git use uintptr_t instead of long in TYPEALIGN macros --- diff --git a/tools.h b/tools.h index a7c9b09..7a4ffe4 100644 --- a/tools.h +++ b/tools.h @@ -52,7 +52,7 @@ double elapsedtime(struct timeval *begin); #ifndef TYPEALIGN #define TYPEALIGN(ALIGNVAL,LEN) \ - (((long) (LEN) + ((ALIGNVAL) - 1)) & ~((long) ((ALIGNVAL) - 1))) + (((uintptr_t) (LEN) + ((ALIGNVAL) - 1)) & ~((uintptr_t) ((ALIGNVAL) - 1))) #define SHORTALIGN(LEN) TYPEALIGN(sizeof(int16_t), (LEN)) #define INTALIGN(LEN) TYPEALIGN(sizeof(int32_t), (LEN))