From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Litterio Newsgroups: gmane.emacs.bugs Subject: bug#722: More Visual Studio 6.0 compiler errors on Windows XP Date: Fri, 15 Aug 2008 09:35:11 -0400 Message-ID: References: Reply-To: Francis Litterio , 722@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218810484 683 80.91.229.12 (15 Aug 2008 14:28:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Aug 2008 14:28:04 +0000 (UTC) To: Andreas Schwab , 722@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 15 16:28:56 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KU0IQ-00064E-SN for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Aug 2008 16:28:55 +0200 Original-Received: from localhost ([127.0.0.1]:36686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KU0HU-0003PB-7u for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Aug 2008 10:27:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KU0H9-0003Ho-CB for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 10:27:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KU0H7-0003H8-Oj for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 10:27:34 -0400 Original-Received: from [199.232.76.173] (port=40930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KU0H7-0003H3-E1 for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 10:27:33 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40612) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KU0H7-0006i1-4P for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 10:27:33 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7FERP8r018162; Fri, 15 Aug 2008 07:27:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7FEK4vM015464; Fri, 15 Aug 2008 07:20:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Francis Litterio Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Fri, 15 Aug 2008 14:20:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 722 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 722-submit@emacsbugs.donarmstrong.com id=B722.121880942813477 (code B ref 722); Fri, 15 Aug 2008 14:20:04 +0000 Original-Received: (at 722) by emacsbugs.donarmstrong.com; 15 Aug 2008 14:10:28 +0000 Original-Received: from TheWorld.com (pcls6.std.com [192.74.137.146]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7FEALvC013460 for <722@emacsbugs.donarmstrong.com>; Fri, 15 Aug 2008 07:10:23 -0700 Original-Received: from shell.TheWorld.com (IDENT:105@shell01.theworld.com [192.74.137.71]) by TheWorld.com (8.13.6/8.13.6) with ESMTP id m7FEA0SP023009; Fri, 15 Aug 2008 10:10:03 -0400 Original-Received: from usenlittefl1c.theworld.com (localhost.theworld.com [127.0.0.1]) by shell.TheWorld.com (8.13.6/8.12.8) with ESMTP id m7FE5eTx8141452; Fri, 15 Aug 2008 10:05:40 -0400 (EDT) X-Random-Quote: Although the whole of this life were said to be nothing but a dream and the physical world nothing but a phantasm, I should call this dream or phatasm real enough, if, using reason well, we were never deceived by it. -- Baron Gottfried Wilhelm von Leibniz In-Reply-To: (Andreas Schwab's message of "Fri\, 15 Aug 2008 11\:33\:32 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (windows-nt) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Fri, 15 Aug 2008 10:27:34 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19463 Archived-At: Andreas Schwab wrote: > Francis Litterio writes: > >> --- dired.c~ 2008-08-14 17:09:53.759788900 -0400 >> +++ dired.c 2008-08-14 17:13:16.585787100 -0400 >> @@ -961,7 +961,7 @@ >> values[7] = make_number (s.st_size); >> /* If the size is out of range for an integer, return a float. */ >> if (XINT (values[7]) != s.st_size) >> - values[7] = make_float ((double)s.st_size); >> + values[7] = make_float ((signed __int64)s.st_size); > > Tell Microsoft to fix their compiler, you are changeing perfectly valid > C into unportable junk. You are preaching to the choir. :) I just want a clean build on Windows. Emacs has always compiled using VC++ 6.0 in the past, so some change must have introduced this problem. I forgot that dired.c is not Windows-only code, so this patch is more correct: --- dired.c~ 31 Jul 2008 05:33:51 -0000 1.153 +++ dired.c 15 Aug 2008 14:04:04 -0000 @@ -961,7 +961,11 @@ values[7] = make_number (s.st_size); /* If the size is out of range for an integer, return a float. */ if (XINT (values[7]) != s.st_size) +#if defined(WINDOWSNT) + values[7] = make_float ((signed __int64)s.st_size); +#else values[7] = make_float ((double)s.st_size); +#endif /* If the size is negative, and its type is long, convert it back to positive. */ if (s.st_size < 0 && sizeof (s.st_size) == sizeof (long)) Also, a 64-bit integer (signed or unsigned) cannot safely be cast to double without loss of data. An IEEE 754 64-bit floating value only has 52-bits of mantissa. So the non-Windows implementation is not 100% correct either. -- Fran