From 987c93276e7a43944cdaef61f7b2aa8fbf7f4d87 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 24 Oct 2009 16:32:06 +0000 Subject: [PATCH] (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned types again. --- src/ChangeLog | 3 +++ src/lisp.h | 6 ++++-- 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 + * 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. */ -- 2.39.2