]> git.eshelyaron.com Git - emacs.git/commit
Don’t assume timersub and gettimeofday
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Feb 2019 21:47:52 +0000 (13:47 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Feb 2019 22:12:49 +0000 (14:12 -0800)
commit975893b229072aa1b5565cc1a73987fa83ed5b21
tree2e87a83eb3836afc2507c4126dfb328b3f1049e0
parente96923c188a2a38d09917c5b7f606187a1413a96
Don’t assume timersub and gettimeofday

POSIX does not specify timersub, and marks gettimeofday as
obsolescent.  Avoid porting problems by using timespec.h
functions instead.
* src/editfns.c: Include systime.h instead of sys/time.h.
(EXTRA_CONTEXT_FIELDS): Replace start and max_secs with
time_limit.  All uses changed.  This removes the need to call
gettimeofday or timersub.
* src/term.c (timeval_to_Time): Remove.  Replace all uses with ...
(current_Time): ... this new function, removing the need to
call gettimeofday.
src/editfns.c
src/term.c