]> git.eshelyaron.com Git - emacs.git/commitdiff
* systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Jul 2012 23:00:38 +0000 (16:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Jul 2012 23:00:38 +0000 (16:00 -0700)
See <http://bugs.gnu.org/11825#29>.

src/ChangeLog
src/systime.h

index 98a4f978830ac87c6da2fcbc42f1f8201d884355..95c8ce2cb51d330b202030737985947a2c51aad8 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
+       See <http://bugs.gnu.org/11825#29>.
+
 2012-07-08  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
index 938083a5ffc3cb70503fac4b48e8f4cfeb4341db..a03630cf9362a0be6aeef4cd6324f40e593c3d03 100644 (file)
@@ -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))