From: Gerd Moellmann Date: Tue, 26 Sep 2000 13:03:24 +0000 (+0000) Subject: (XINT) [EXPLICIT_SIGN_EXTEND]: Use BITS_PER_EMACS_INT X-Git-Tag: emacs-pretest-21.0.90~1370 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c98863bfb9eb38e1f14a62d2094c2498e51b6cc8;p=emacs.git (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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6dcbbbb1ed6..21e3678aef8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2000-09-26 Gerd Moellmann + * lisp.h (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. + + * m/sparc.h (BITS_PER_EMACS_INT) [__arch64__]: Don't define. + + * unexelf.c (ELFSIZE) [__NetBSD__ && __sparc_v9__]: Define to 64. + * window.c (freeze_window_starts): Construct last argument for foreach_window differently. 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)); #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 @@ enum pvec_type /* 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 @@ extern int pure_size; #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 */