aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert2014-09-24 13:30:28 -0700
committerPaul Eggert2014-09-24 13:30:28 -0700
commit203a9eb0ec0e1f28958df5fa1a49c5a7e3f4cae8 (patch)
tree52781d0a379ff1927d2461265bd0b94f68254454 /src/ChangeLog
parent0e176389a723f7eec072af62cde12314de7f70e2 (diff)
downloademacs-203a9eb0ec0e1f28958df5fa1a49c5a7e3f4cae8.tar.gz
emacs-203a9eb0ec0e1f28958df5fa1a49c5a7e3f4cae8.zip
Avoid signed integer overflow when converting Time to ptrdiff_t.
* keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN): New macros. (position_to_Time, Time_to_position): New functions. (gen_help_event, kbd_buffer_get_event): Use them. * systime.h (Time) [emacs && !HAVE_X_WINDOWS]: Go back to plain 'unsigned long', so that 'Time' is the same for both X and non-X builds; this is less likely to cause surprise. * termhooks.h: Remove compile-time check that Time and ptrdiff_t are the same size; this is no longer required.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9ee4a3de1d0..5f95c1594ef 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
12014-09-24 Paul Eggert <eggert@cs.ucla.edu> 12014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Avoid signed integer overflow when converting Time to ptrdiff_t.
4 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
5 New macros.
6 (position_to_Time, Time_to_position): New functions.
7 (gen_help_event, kbd_buffer_get_event): Use them.
8 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
9 Go back to plain 'unsigned long', so that 'Time' is the same
10 for both X and non-X builds; this is less likely to cause surprise.
11 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
12 are the same size; this is no longer required.
13
3 * keyboard.c (make_lispy_event): Avoid unnecessary tests 14 * keyboard.c (make_lispy_event): Avoid unnecessary tests
4 of bit 28 and of whether an unsigned value is negative. 15 of bit 28 and of whether an unsigned value is negative.
5 This simplifies the code a bit, and pacifies clang 3.4. 16 This simplifies the code a bit, and pacifies clang 3.4.