From 853723f7101cc42b7e76b72c70dfd7d7f804cc75 Mon Sep 17 00:00:00 2001 From: teodor Date: Tue, 13 Apr 2010 17:15:30 +0000 Subject: [PATCH] use uintptr_t instead of long in TYPEALIGN macros --- tools.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.37.3