emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108957: * systime.h (EMACS_SUB_TIME)


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108957: * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
Date: Sun, 08 Jul 2012 16:00:38 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108957
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-07-08 16:00:38 -0700
message:
  * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
  
  See <http://bugs.gnu.org/11825#29>.
modified:
  src/ChangeLog
  src/systime.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-08 16:38:43 +0000
+++ b/src/ChangeLog     2012-07-08 23:00:38 +0000
@@ -1,3 +1,8 @@
+2012-07-08  Paul Eggert  <address@hidden>
+
+       * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
+       See <http://bugs.gnu.org/11825#29>.
+
 2012-07-08  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph

=== modified file 'src/systime.h'
--- a/src/systime.h     2012-07-07 01:57:42 +0000
+++ b/src/systime.h     2012-07-08 23:00:38 +0000
@@ -80,7 +80,8 @@
 #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))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]