aboutsummaryrefslogtreecommitdiffstats
path: root/lib/timespec-add.c
diff options
context:
space:
mode:
authorPaul Eggert2013-09-24 20:44:34 -0700
committerPaul Eggert2013-09-24 20:44:34 -0700
commit959c3d24a7ba87716891affbc2c7720e9f020ac6 (patch)
tree110edd830e219e40398bb9a45768e6737946dbd0 /lib/timespec-add.c
parent0c1738785d65e807e9500f6a1200baba66edc80c (diff)
downloademacs-959c3d24a7ba87716891affbc2c7720e9f020ac6.tar.gz
emacs-959c3d24a7ba87716891affbc2c7720e9f020ac6.zip
Merge from gnulib.
This incorporates: 2013-09-24 manywarnings: enable nicer gcc warning messages 2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3 2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere * configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option and -funit-at-a-time, since manywarnings does that for us now.
Diffstat (limited to 'lib/timespec-add.c')
-rw-r--r--lib/timespec-add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/timespec-add.c b/lib/timespec-add.c
index 51323a63207..d628237fe56 100644
--- a/lib/timespec-add.c
+++ b/lib/timespec-add.c
@@ -18,7 +18,7 @@
18/* Written by Paul Eggert. */ 18/* Written by Paul Eggert. */
19 19
20/* Return the sum of two timespec values A and B. On overflow, return 20/* Return the sum of two timespec values A and B. On overflow, return
21 an extremal value. This assumes 0 <= tv_nsec <= 999999999. */ 21 an extremal value. This assumes 0 <= tv_nsec < TIMESPEC_RESOLUTION. */
22 22
23#include <config.h> 23#include <config.h>
24#include "timespec.h" 24#include "timespec.h"
@@ -58,7 +58,7 @@ timespec_add (struct timespec a, struct timespec b)
58 { 58 {
59 high_overflow: 59 high_overflow:
60 rs = TYPE_MAXIMUM (time_t); 60 rs = TYPE_MAXIMUM (time_t);
61 rns = 999999999; 61 rns = TIMESPEC_RESOLUTION - 1;
62 } 62 }
63 } 63 }
64 else 64 else