[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1f88943: Fix malfunctioning cursor display on 32-bi
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 1f88943: Fix malfunctioning cursor display on 32-bit Gtk |
Date: |
Tue, 9 Oct 2018 12:48:42 -0400 (EDT) |
branch: master
commit 1f88943924d4e5c98e209790ee8c69b8ab8621d0
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix malfunctioning cursor display on 32-bit Gtk
This bug on 32-bit platforms was caused by the timespec_hz
definition going haywire because the C expression
FIXNUM_OVERFLOW_P (MOST_POSITIVE_FIXNUM) did not work in #if.
Eventually the numeric problem showed up as a malfunctioning
cursor (Bug#32992). Fix the problem with MOST_POSITIVE_FIXNUM.
By the way, make_fixnum should check for integer overflow when
debugging; this would have made it easier to track this bug down.
But one fix at a time.
* src/lisp.h (INTTYPEBITS): Now a macro, so usable in #if.
(MOST_POSITIVE_FIXNUM): Mention it’s used in #if.
---
src/lisp.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/lisp.h b/src/lisp.h
index ae32926..2c20b48 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -236,13 +236,15 @@ enum Lisp_Bits
/* Number of bits in a Lisp_Object value, not counting the tag. */
VALBITS = EMACS_INT_WIDTH - GCTYPEBITS,
- /* Number of bits in a Lisp fixnum tag. */
- INTTYPEBITS = GCTYPEBITS - 1,
-
/* Number of bits in a Lisp fixnum value, not counting the tag. */
FIXNUM_BITS = VALBITS + 1
};
+/* Number of bits in a Lisp fixnum tag; can be used in #if. */
+DEFINE_GDB_SYMBOL_BEGIN (int, INTTYPEBITS)
+#define INTTYPEBITS (GCTYPEBITS - 1)
+DEFINE_GDB_SYMBOL_END (INTTYPEBITS)
+
/* The maximum value that can be stored in a EMACS_INT, assuming all
bits other than the type bits contribute to a nonnegative signed value.
This can be used in #if, e.g., '#if USE_LSB_TAG' below expands to an
@@ -1034,7 +1036,7 @@ enum More_Lisp_Bits
that cons. */
/* Largest and smallest representable fixnum values. These are the C
- values. They are macros for use in static initializers. */
+ values. They are macros for use in #if and static initializers. */
#define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS)
#define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1f88943: Fix malfunctioning cursor display on 32-bit Gtk,
Paul Eggert <=