From 6e245f307be77d67eacfdfd5b3c3eae4115bb61d Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Fri, 19 Nov 2010 21:30:21 +0100 Subject: [PATCH] use proper 64bit casting for pointer-math building with "./configure --enable-checking --enable-supergroups" fails, because on 64bit, the casting in map.c gives a warning. Just add another ifdef and cast according to the size of a pointer. Reviewed-on: http://gerrit.openafs.org/3341 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit acdef43d818ee56e6c1f1dc29f508c02793c8355) Change-Id: If7dbe6f41f015025447e68eb1fc9ea14e56d6fe2 Reviewed-on: http://gerrit.openafs.org/3496 Tested-by: Derrick Brashear --- src/ptserver/map.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ptserver/map.c b/src/ptserver/map.c index 3ea4b26d6..c82351633 100644 --- a/src/ptserver/map.c +++ b/src/ptserver/map.c @@ -36,6 +36,9 @@ #include #include #include +#ifdef HAVE_STDINT_H +# include +#endif #include "map.h" #undef PRINT_MAP_ERROR @@ -51,10 +54,10 @@ struct bitmap { int m_data[MDATA]; }; -#define MAP(p) ((struct bitmap*)((int)(p)&~1)) -#define NEGMAP(p) (((int)(p))&1) +#define MAP(p) ((struct bitmap*)((intptr_t)(p)&~1)) +#define NEGMAP(p) (((intptr_t)(p))&1) #define POSMAP(p) (!NEGMAP(p)) -#define NOT_MAP(mp) ((struct map *) (((int)(mp)) ^ 1)) +#define NOT_MAP(mp) ((struct map *) (((intptr_t)(mp)) ^ 1)) #define NUMBERTOBIT(n) ((n) & ((1<>LSHIFT) & ((1<