From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#9000: patch for higher-resolution time stamps Date: Sat, 23 Jun 2012 15:45:26 -0700 Organization: UCLA Computer Science Department Message-ID: <4FE64706.4030807@cs.ucla.edu> References: <4FE4E1EE.7060305@cs.ucla.edu> <83vciibewj.fsf@gnu.org> <83txy2b8xi.fsf@gnu.org> <4FE6038B.9000906@cs.ucla.edu> <83ipehc0bd.fsf@gnu.org> <83hau1bysd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340491584 31657 80.91.229.3 (23 Jun 2012 22:46:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Jun 2012 22:46:24 +0000 (UTC) Cc: 9000@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 24 00:46:23 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SiZ5x-0000xY-82 for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Jun 2012 00:46:21 +0200 Original-Received: from localhost ([::1]:45239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZ5x-0004R7-9c for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jun 2012 18:46:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZ5u-0004R0-NN for bug-gnu-emacs@gnu.org; Sat, 23 Jun 2012 18:46:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiZ5t-0006f7-0L for bug-gnu-emacs@gnu.org; Sat, 23 Jun 2012 18:46:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZ5s-0006f0-TL for bug-gnu-emacs@gnu.org; Sat, 23 Jun 2012 18:46:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SiZ9W-0000c4-7d for bug-gnu-emacs@gnu.org; Sat, 23 Jun 2012 18:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jun 2012 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9000 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 9000-submit@debbugs.gnu.org id=B9000.13404917562295 (code B ref 9000); Sat, 23 Jun 2012 22:50:02 +0000 Original-Received: (at 9000) by debbugs.gnu.org; 23 Jun 2012 22:49:16 +0000 Original-Received: from localhost ([127.0.0.1]:54434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiZ8m-0000ay-Ju for submit@debbugs.gnu.org; Sat, 23 Jun 2012 18:49:16 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:55417) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiZ8j-0000ap-H5 for 9000@debbugs.gnu.org; Sat, 23 Jun 2012 18:49:14 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id E5368A60122; Sat, 23 Jun 2012 15:45:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yrqMqGo18AKp; Sat, 23 Jun 2012 15:45:26 -0700 (PDT) Original-Received: from [192.168.1.10] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8145FA60002; Sat, 23 Jun 2012 15:45:26 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: <83hau1bysd.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61233 Archived-At: On 06/23/2012 12:42 PM, Eli Zaretskii wrote: > Never mind, I fixed that myself. Unfortunately the patch that you installed can break Emacs on hosts where time_t is unsigned, because it assigns time_t values to intmax_t variables, and this does not always work correctly when INTMAX_MAX < TIME_T_MAX. Which version of GCC are you running? What is INTMAX_MAX defined to, on your platform? Does it work to pacify your old GCC if you replace this: intmax_t secs = EMACS_SECS (t); wait_reading_process_output (min (secs, INTMAX_MAX), EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); with this? intmax_t max = INTMAX_MAX; wait_reading_process_output (min (secs, max), EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); Or how about this? static intmax_t intmax_max = INTMAX_MAX; ... wait_reading_process_output (min (secs, intmax_max), EMACS_NSECS (t), 0, 0, Qnil, NULL, 0); We could make this latter rewrite conditional only for older GCC versions.