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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
acdef43d818ee56e6c1f1dc29f508c02793c8355)
Change-Id: If7dbe6f41f015025447e68eb1fc9ea14e56d6fe2
Reviewed-on: http://gerrit.openafs.org/3496
Tested-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))