aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-26 13:03:24 +0000
committerGerd Moellmann2000-09-26 13:03:24 +0000
commitc98863bfb9eb38e1f14a62d2094c2498e51b6cc8 (patch)
tree6e76df5f8cd93cce110b779861b28b687b8d31b0 /src
parent45595e0058df8e75f2bd2a67bf135eb90c35b5f9 (diff)
downloademacs-c98863bfb9eb38e1f14a62d2094c2498e51b6cc8.tar.gz
emacs-c98863bfb9eb38e1f14a62d2094c2498e51b6cc8.zip
(XINT) [EXPLICIT_SIGN_EXTEND]: Use BITS_PER_EMACS_INT
instead of BITS_PER_INT. (XINT, XUINT) [NO_UNION_TYPE]: Cast result to EMACS_INT and EMACS_UINT, respectively. (NO_UNION_TYPE) [USE_LISP_UNION_TYPE]: Undefine.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/lisp.h15
2 files changed, 22 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6dcbbbb1ed6..21e3678aef8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12000-09-26 Gerd Moellmann <gerd@gnu.org> 12000-09-26 Gerd Moellmann <gerd@gnu.org>
2 2
3 * lisp.h (XINT) [EXPLICIT_SIGN_EXTEND]: Use BITS_PER_EMACS_INT
4 instead of BITS_PER_INT.
5 (XINT, XUINT) [NO_UNION_TYPE]: Cast result to EMACS_INT and
6 EMACS_UINT, respectively.
7 (NO_UNION_TYPE) [USE_LISP_UNION_TYPE]: Undefine.
8
9 * m/sparc.h (BITS_PER_EMACS_INT) [__arch64__]: Don't define.
10
11 * unexelf.c (ELFSIZE) [__NetBSD__ && __sparc_v9__]: Define to 64.
12
3 * window.c (freeze_window_starts): Construct last argument for 13 * window.c (freeze_window_starts): Construct last argument for
4 foreach_window differently. 14 foreach_window differently.
5 15
diff --git a/src/lisp.h b/src/lisp.h
index f62f83d1152..91fd11eeaec 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -67,6 +67,13 @@ extern void die P_((const char *, const char *, int));
67 67
68#endif 68#endif
69 69
70/* Used for making sure that Emacs is compilable in all
71 conigurations. */
72
73#ifdef USE_LISP_UNION_TYPE
74#undef NO_UNION_TYPE
75#endif
76
70/* Define an Emacs version of "assert", since some system ones are 77/* Define an Emacs version of "assert", since some system ones are
71 flaky. */ 78 flaky. */
72#ifndef ENABLE_CHECKING 79#ifndef ENABLE_CHECKING
@@ -331,14 +338,15 @@ enum pvec_type
331/* Extract the value of a Lisp_Object as a signed integer. */ 338/* Extract the value of a Lisp_Object as a signed integer. */
332 339
333#ifndef XINT /* Some machines need to do this differently. */ 340#ifndef XINT /* Some machines need to do this differently. */
334#define XINT(a) (((a) << (BITS_PER_EMACS_INT-VALBITS)) >> (BITS_PER_EMACS_INT-VALBITS)) 341#define XINT(a) ((EMACS_INT) (((a) << (BITS_PER_EMACS_INT - VALBITS)) \
342 >> (BITS_PER_EMACS_INT - VALBITS)))
335#endif 343#endif
336 344
337/* Extract the value as an unsigned integer. This is a basis 345/* Extract the value as an unsigned integer. This is a basis
338 for extracting it as a pointer to a structure in storage. */ 346 for extracting it as a pointer to a structure in storage. */
339 347
340#ifndef XUINT 348#ifndef XUINT
341#define XUINT(a) ((a) & VALMASK) 349#define XUINT(a) ((EMACS_UINT) ((a) & VALMASK))
342#endif 350#endif
343 351
344#ifndef XPNTR 352#ifndef XPNTR
@@ -419,7 +427,8 @@ extern int pure_size;
419 427
420#ifdef EXPLICIT_SIGN_EXTEND 428#ifdef EXPLICIT_SIGN_EXTEND
421/* Make sure we sign-extend; compilers have been known to fail to do so. */ 429/* Make sure we sign-extend; compilers have been known to fail to do so. */
422#define XINT(a) (((a).i << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS)) 430#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \
431 >> (BITS_PER_EMACS_INT - VALBITS))
423#else 432#else
424#define XINT(a) ((a).s.val) 433#define XINT(a) ((a).s.val)
425#endif /* EXPLICIT_SIGN_EXTEND */ 434#endif /* EXPLICIT_SIGN_EXTEND */