]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libobjc/12035 (Patch for libobjc/gc.c that fixes compilation error of Objective...
authorAndrew Pinski <pinskia@physics.uc.edu>
Mon, 20 Dec 2004 22:34:18 +0000 (22:34 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Mon, 20 Dec 2004 22:34:18 +0000 (14:34 -0800)
2004-12-20  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/12035
        * gc.c: Remove definition of LOGWL, modWORDSZ, and divWORDSZ since
        they are not used.
        Include limits.h and stdlib.h.
        Define BITS_PER_WORD.

From-SVN: r92438

libobjc/ChangeLog
libobjc/gc.c

index 5844eadd977dff9ce106c3b17367b9fb0ff85a08..8f8428478825978f33e42c5a4f7ae35d6b2b2ea5 100644 (file)
@@ -1,3 +1,11 @@
+2004-12-20  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR libobjc/12035
+       * gc.c: Remove definition of LOGWL, modWORDSZ, and divWORDSZ since
+       they are not used.
+       Include limits.h and stdlib.h.
+       Define BITS_PER_WORD.
+
 2004-11-04  Release Manager
 
        * GCC 3.4.3 released.
index 8f13dbc33ca644a7984693eefdf3805d932aba05..66aa78a32ee9540a1a80715387ecfefd05ac0cd0 100644 (file)
@@ -31,26 +31,17 @@ Boston, MA 02111-1307, USA.  */
 
 #include <assert.h>
 #include <string.h>
+#include <stdlib.h>
 
 #if OBJC_WITH_GC
 
 #include <gc.h>
+#include <limits.h>
 
 /* 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 <gc_typed.h>