From d6202519ae0dfb7421b64f823a0aaa54e1fc5951 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 17 Jun 2011 01:14:30 -0700 Subject: [PATCH] * buffer.c: Include . (init_buffer_once): Check at compile-time, not run-time. --- src/ChangeLog | 4 +++- src/buffer.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a82ba93320a..aa605cb7559 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,12 +1,14 @@ 2011-06-17 Paul Eggert - * buffer.c (struct sortvec.priority, struct sortstr.priority): + * buffer.c: Include . + (struct sortvec.priority, struct sortstr.priority): Now EMACS_INT, not int. (compare_overlays, cmp_for_strings): Avoid subtraction overflow. (struct sortstr.size, record_overlay_string) (struct sortstrlist.size, struct sortlist.used): Don't truncate size to int. (record_overlay_string): Check for size-calculation overflow. + (init_buffer_once): Check at compile-time, not run-time. 2011-06-16 Paul Eggert diff --git a/src/buffer.c b/src/buffer.c index 93f739c0d4b..fd51f50dcac 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -27,6 +27,8 @@ along with GNU Emacs. If not, see . */ #include #include +#include + #include "lisp.h" #include "intervals.h" #include "window.h" @@ -4975,7 +4977,7 @@ init_buffer_once (void) The local flag bits are in the local_var_flags slot of the buffer. */ /* Nothing can work if this isn't true */ - if (sizeof (EMACS_INT) != sizeof (Lisp_Object)) abort (); + { verify (sizeof (EMACS_INT) == sizeof (Lisp_Object)); } /* 0 means not a lisp var, -1 means always local, else mask */ memset (&buffer_local_flags, 0, sizeof buffer_local_flags); -- 2.39.2