From d4397d3110936776b9a725284cf80472ae448066 Mon Sep 17 00:00:00 2001 From: pinskia <> Date: Mon, 20 Dec 2004 22:32:39 +0000 Subject: 2004-12-20 Andrew Pinski PR libobjc/12035 * gc.c: Remove definition of LOGWL, modWORDSZ, and divWORDSZ since they are not used. Include limits.h and stdlib.h. --- libobjc/gc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'libobjc/gc.c') diff --git a/libobjc/gc.c b/libobjc/gc.c index 8f13dbc33ca..66aa78a32ee 100644 --- a/libobjc/gc.c +++ b/libobjc/gc.c @@ -31,26 +31,17 @@ Boston, MA 02111-1307, USA. */ #include #include +#include #if OBJC_WITH_GC #include +#include /* gc_typed.h uses the following but doesn't declare them */ typedef GC_word word; typedef GC_signed_word signed_word; - -#if BITS_PER_WORD == 32 -# define LOGWL 5 -# define modWORDSZ(n) ((n) & 0x1f) /* n mod size of word */ -#endif - -#if BITS_PER_WORD == 64 -# define LOGWL 6 -# define modWORDSZ(n) ((n) & 0x3f) /* n mod size of word */ -#endif - -#define divWORDSZ(n) ((n) >> LOGWL) /* divide n by size of word */ +#define BITS_PER_WORD (CHAR_BIT * sizeof (word)) #include -- cgit v1.2.3