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.
Change-Id: Icb35d79f56cf8fec48c863061a524f9e29e6acd8
Reviewed-on: http://gerrit.openafs.org/3341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
#include "map.h"
#undef PRINT_MAP_ERROR
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))
#define NUMBERTOINDEX(n) ((n>>LSHIFT) & ((1<<MSHIFT)-1))