diff options
author | Andreas Schwab <[email protected]> | 2009-10-24 16:32:06 +0000 |
---|---|---|
committer | Andreas Schwab <[email protected]> | 2009-10-24 16:32:06 +0000 |
commit | 987c93276e7a43944cdaef61f7b2aa8fbf7f4d87 (patch) | |
tree | 8a9b9fc3754b79f9a266a3b6131b5a5b66fdb460 /src | |
parent | 10d66ec001d9292656cdebcc1e944eac403712dc (diff) |
(FIXNUM_OVERFLOW_P): Fix last change to handle unsigned
types again.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 3 | ||||
-rw-r--r-- | src/lisp.h | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ff6e0551d9..8ff2ec0fa8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2009-10-24 Andreas Schwab <[email protected]> + * 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 3838aff753..6444aac84d 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. */ |