From ab531b66f3a676ef047300f5201daa52993099b9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 8 Jul 2012 16:00:38 -0700 Subject: * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t. See . --- src/ChangeLog | 5 +++++ src/systime.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 98a4f97883..95c8ce2cb5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-07-08 Paul Eggert + + * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t. + See . + 2012-07-08 Eli Zaretskii * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph diff --git a/src/systime.h b/src/systime.h index 938083a5ff..a03630cf93 100644 --- a/src/systime.h +++ b/src/systime.h @@ -80,7 +80,8 @@ typedef unsigned long Time; #define EMACS_GET_TIME(time) gettime (&(time)) /* Put into DEST the result of adding SRC1 to SRC2, or of subtracting - SRC2 from SRC1. On overflow, store an extremal value. */ + SRC2 from SRC1. On overflow, store an extremal value: ergo, if + time_t is unsigned, return 0 if the true answer would be negative. */ #define EMACS_ADD_TIME(dest, src1, src2) ((dest) = timespec_add (src1, src2)) #define EMACS_SUB_TIME(dest, src1, src2) ((dest) = timespec_sub (src1, src2)) -- cgit v1.2.3