diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-03-11 22:49:53 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-03-11 22:49:53 -0800 |
commit | b8d9bd41b7daaa35de8335b20af145a808ae9b07 (patch) | |
tree | bb00176e7801612ad1de68713f9128446bc9751d /src/deps.mk | |
parent | fe31d94c97a6a3702e301a14b84c1f293afe5efd (diff) | |
download | emacs-b8d9bd41b7daaa35de8335b20af145a808ae9b07.tar.gz |
Improve quality of tests for time stamp overflow. For example,
without this patch (encode-time 0 0 0 1 1 1152921504606846976)
returns the obviously-bogus value (-948597 62170) on my RHEL 5.5
x86-64 host. With it, it reports time overflow.
* deps.mk (editfns.o): Depend on ../lib/intprops.h.
* editfns.c: Include limits.h and intprops.h.
(TIME_T_MIN, TIME_T_MAX): New macros.
(time_overflow): Move earlier, to before first use.
(hi_time, lo_time): New functions, for an accurate test for
out-of-range times.
(Fcurrent_time, Fget_internal_run_time, make_time): Use them.
(Fget_internal_run_time): Don't assume time_t fits in int.
(make_time): Use list2 instead of Fcons twice.
(Fdecode_time): More accurate test for out-of-range times.
(check_tm_member): New function.
(Fencode_time): Use it, to test for out-of-range times.
Diffstat (limited to 'src/deps.mk')
-rw-r--r-- | src/deps.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/deps.mk b/src/deps.mk index 2b162b07bb8..fba856c1be3 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -87,7 +87,8 @@ dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ lisp.h $(config_h) editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ - coding.h frame.h blockinput.h atimer.h ../lib/unistd.h ../lib/strftime.h \ + coding.h frame.h blockinput.h atimer.h \ + ../lib/intprops.h ../lib/strftime.h ../lib/unistd.h \ lisp.h globals.h $(config_h) emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ |