summaryrefslogtreecommitdiff
path: root/src/mem-limits.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-11-16 00:45:34 +0000
committerJim Blandy <jimb@redhat.com>1992-11-16 00:45:34 +0000
commit5c7285e691fc6a0d654a7a1f62523fe765dcaa9f (patch)
tree5f2e5e1fc286c38ffcd0a498e351651f0922b1d0 /src/mem-limits.h
parentb2598992dc45f8f9bdee98318f0cfd8ab2afc5cb (diff)
downloademacs-5c7285e691fc6a0d654a7a1f62523fe765dcaa9f.tar.gz
* mem-limits.h [DATA_SEG_BITS] (EXCEEDS_LISP_PTR): Remember to
remove DATA_SEG_BITS from the pointer before testing if the pointer fits in VALBITS.
Diffstat (limited to 'src/mem-limits.h')
-rw-r--r--src/mem-limits.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mem-limits.h b/src/mem-limits.h
index 0150b83b1ea..06c8e1f5dd0 100644
--- a/src/mem-limits.h
+++ b/src/mem-limits.h
@@ -44,7 +44,12 @@ typedef unsigned long SIZE;
#define NULL ((POINTER) 0)
extern POINTER start_of_data ();
+#ifdef DATA_SEG_BITS
+#define EXCEEDS_LISP_PTR(ptr) \
+ (((unsigned int) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
+#else
#define EXCEEDS_LISP_PTR(ptr) ((unsigned int) (ptr) >> VALBITS)
+#endif
#ifdef BSD
#ifndef DATA_SEG_BITS