summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2009-10-24 16:32:06 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2009-10-24 16:32:06 +0000
commit987c93276e7a43944cdaef61f7b2aa8fbf7f4d87 (patch)
tree8a9b9fc3754b79f9a266a3b6131b5a5b66fdb460
parent10d66ec001d9292656cdebcc1e944eac403712dc (diff)
downloademacs-987c93276e7a43944cdaef61f7b2aa8fbf7f4d87.tar.gz
(FIXNUM_OVERFLOW_P): Fix last change to handle unsigned
types again.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/lisp.h6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ff6e0551d9e..8ff2ec0fa80 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2009-10-24 Andreas Schwab <schwab@linux-m68k.org>
+ * lisp.h (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned
+ types again.
+
* sysdep.c (procfs_ttyname): Fix sprintf format to match argument
type.
(system_process_attributes): Likewise.
diff --git a/src/lisp.h b/src/lisp.h
index 3838aff7531..6444aac84d3 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -486,11 +486,13 @@ extern size_t pure_size;
I.e. (x & INTMASK) == XUINT (make_number (x)). */
#define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1)
-/* Value is non-zero if I doesn't fit into a Lisp fixnum. */
+/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
+ written this way so that it also works if I is of unsigned
+ type. */
#define FIXNUM_OVERFLOW_P(i) \
((i) > MOST_POSITIVE_FIXNUM \
- || (i) < MOST_NEGATIVE_FIXNUM)
+ || ((i) < 0 && (i) < MOST_NEGATIVE_FIXNUM))
/* Extract a value or address from a Lisp_Object. */