emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/systime.h,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/systime.h,v
Date: Sat, 04 Oct 2008 13:13:47 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/04 13:13:47

Index: systime.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/systime.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- systime.h   31 Jul 2008 05:33:53 -0000      1.51
+++ systime.h   4 Oct 2008 13:13:47 -0000       1.52
@@ -150,10 +150,12 @@
 #endif
 
 /* Compare times T1 and T2.  Value is 0 if T1 and T2 are the same.
-   Value is < 0 if T1 is less than T2.  Value is > 0 otherwise.  */
+   Value is < 0 if T1 is less than T2.  Value is > 0 otherwise.  (Cast
+   to long is for those platforms where time_t is an unsigned
+   type, and where otherwise T1 will always be grater than T2.)  */
 
 #define EMACS_TIME_CMP(T1, T2)                 \
-  (EMACS_SECS (T1) - EMACS_SECS (T2)           \
+  ((long)EMACS_SECS (T1) - (long)EMACS_SECS (T2)       \
    + (EMACS_SECS (T1) == EMACS_SECS (T2)       \
       ? EMACS_USECS (T1) - EMACS_USECS (T2)    \
       : 0))




reply via email to

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