# HG changeset patch # User Andreas Schwab # Date 1256401926 0 # Node ID 35e7b757c6062252bc6c5c7574bdc09ffa861053 # Parent 41169068dcab9c657eb7dfaff06196380d28db4c (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned types again. diff -r 41169068dcab -r 35e7b757c606 src/ChangeLog --- a/src/ChangeLog Sat Oct 24 14:01:03 2009 +0000 +++ b/src/ChangeLog Sat Oct 24 16:32:06 2009 +0000 @@ -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 -r 41169068dcab -r 35e7b757c606 src/lisp.h --- a/src/lisp.h Sat Oct 24 14:01:03 2009 +0000 +++ b/src/lisp.h Sat Oct 24 16:32:06 2009 +0000 @@ -486,11 +486,13 @@ 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. */