summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-20 22:32:39 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-20 22:32:39 +0000
commitee258b7ce095e9fca0ec829079dba7db20d67854 (patch)
tree575dd9013cb729e4f0328b32394efa81bdb670f4
parentf987497d5df1e9a9080e579fd586d2f920562550 (diff)
downloadgcc-ee258b7ce095e9fca0ec829079dba7db20d67854.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92437 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libobjc/ChangeLog6
-rw-r--r--libobjc/gc.c15
2 files changed, 9 insertions, 12 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 2d5fb1b4fe9..9968b12016e 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2004-12-12 Alexander Malmberg <alexander@malmberg.org>
* selector.c (__objc_init_selector_tables): Add missing void to
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 <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>