Mercurial > emacs
changeset 31907:b786c3535d32
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 26 Sep 2000 13:02:50 +0000 |
parents | d3866cec14e8 |
children | 06869c11cb90 |
files | src/lisp.h |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lisp.h Tue Sep 26 13:02:21 2000 +0000 +++ b/src/lisp.h Tue Sep 26 13:02:50 2000 +0000 @@ -67,6 +67,13 @@ #endif +/* Used for making sure that Emacs is compilable in all + conigurations. */ + +#ifdef USE_LISP_UNION_TYPE +#undef NO_UNION_TYPE +#endif + /* Define an Emacs version of "assert", since some system ones are flaky. */ #ifndef ENABLE_CHECKING @@ -331,14 +338,15 @@ /* Extract the value of a Lisp_Object as a signed integer. */ #ifndef XINT /* Some machines need to do this differently. */ -#define XINT(a) (((a) << (BITS_PER_EMACS_INT-VALBITS)) >> (BITS_PER_EMACS_INT-VALBITS)) +#define XINT(a) ((EMACS_INT) (((a) << (BITS_PER_EMACS_INT - VALBITS)) \ + >> (BITS_PER_EMACS_INT - VALBITS))) #endif /* Extract the value as an unsigned integer. This is a basis for extracting it as a pointer to a structure in storage. */ #ifndef XUINT -#define XUINT(a) ((a) & VALMASK) +#define XUINT(a) ((EMACS_UINT) ((a) & VALMASK)) #endif #ifndef XPNTR @@ -419,7 +427,8 @@ #ifdef EXPLICIT_SIGN_EXTEND /* Make sure we sign-extend; compilers have been known to fail to do so. */ -#define XINT(a) (((a).i << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS)) +#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \ + >> (BITS_PER_EMACS_INT - VALBITS)) #else #define XINT(a) ((a).s.val) #endif /* EXPLICIT_SIGN_EXTEND */