aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2012-06-23 21:11:19 -0700
committerPaul Eggert2012-06-23 21:11:19 -0700
commitf1dd807386718d2c7c29d13b9f7615759086a954 (patch)
treefd8eefef3df95b6db09d8a03380f53f88be5832a /src/process.c
parentb82c175521ddd7d7ae8183c62fc87587b8b615e5 (diff)
downloademacs-f1dd807386718d2c7c29d13b9f7615759086a954.tar.gz
emacs-f1dd807386718d2c7c29d13b9f7615759086a954.zip
Fix bug when time_t is unsigned and as wide as intmax_t.
* lisp.h (WAIT_READING_MAX): New macro. * dispnew.c (Fsleep_for, sit_for): * keyboard.c (kbd_buffer_get_event): * process.c (Faccept_process_output): Use it to avoid bogus compiler warnings with obsolescent GCC versions. This improves on the previous patch, which introduced a bug when time_t is unsigned and as wide as intmax_t. See <http://bugs.gnu.org/9000#51>.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index b41a77f58fd..457a1a9c7ea 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3996,9 +3996,7 @@ Return non-nil if we received any output before the timeout expired. */)
3996 if (0 < XFLOAT_DATA (seconds)) 3996 if (0 < XFLOAT_DATA (seconds))
3997 { 3997 {
3998 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds)); 3998 EMACS_TIME t = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (seconds));
3999 3999 secs = min (EMACS_SECS (t), WAIT_READING_MAX);
4000 secs = EMACS_SECS (t);
4001 secs = min (secs, INTMAX_MAX);
4002 nsecs = EMACS_NSECS (t); 4000 nsecs = EMACS_NSECS (t);
4003 } 4001 }
4004 } 4002 }