summaryrefslogtreecommitdiff
path: root/src/systime.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-07-08 16:00:38 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-07-08 16:00:38 -0700
commitab531b66f3a676ef047300f5201daa52993099b9 (patch)
treed7a199eb5c58195e2d17f6c2765ebb5f6a0ea8b3 /src/systime.h
parent0ccb0b098349c987e35ee1b2ec795f24a743a4e0 (diff)
downloademacs-ab531b66f3a676ef047300f5201daa52993099b9.tar.gz
* systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
See <http://bugs.gnu.org/11825#29>.
Diffstat (limited to 'src/systime.h')
-rw-r--r--src/systime.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systime.h b/src/systime.h
index 938083a5ffc..a03630cf936 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))