From 6e98f30323c9faa4b6394c9efbb60b51ca008e4f Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Thu, 20 Apr 2006 18:11:03 +0200 Subject: [PATCH] separated size of bucket ID (4 vs 5) and size of pointer (4 vs 8) the first one belongs to sherlock.h and depends on the configuration and the second one belongs to lib/config.h and depends on the architecture --- lib/config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/config.h b/lib/config.h index be3d43fa..a3c47389 100644 --- a/lib/config.h +++ b/lib/config.h @@ -2,6 +2,7 @@ * UCW Library -- Configuration-Dependent Definitions * * (c) 1997--2004 Martin Mares + * (c) 2006 Robert Spalek * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -42,4 +43,18 @@ typedef s64 sh_off_t; typedef s32 sh_off_t; #endif +#ifdef CPU_64BIT_POINTERS +#define BYTES_PER_P 8 +#define bgetp(f) bgetq(f) +#define bputp(f,l) bputq(f,l) +#define GET_P(p) GET_U64(p) +#define PUT_P(p,x) PUT_U64(p,x) +#else +#define BYTES_PER_P 4 +#define bgetp(f) bgetl(f) +#define bputp(f,l) bputl(f,l) +#define GET_P(p) GET_U32(p) +#define PUT_P(p,x) PUT_U32(p,x) +#endif + #endif -- 2.39.2