From: Andreas Schwab Date: Sat, 24 Oct 2009 16:32:06 +0000 (+0000) Subject: (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned X-Git-Tag: emacs-pretest-23.1.90~669 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=987c93276e7a43944cdaef61f7b2aa8fbf7f4d87;p=emacs.git (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned types again. --- 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. */