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#720: Patch to fix CVS Emacs compilation error on Windows XP SP2. Date: Fri, 15 Aug 2008 09:22:31 -0400 Message-ID: References: Reply-To: Francis Litterio , 720@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 1218808073 25188 80.91.229.12 (15 Aug 2008 13:47:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Aug 2008 13:47:53 +0000 (UTC) To: Eli Zaretskii , 720@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 15 15:48:45 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 1KTzfU-0007tx-C1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Aug 2008 15:48:40 +0200 Original-Received: from localhost ([127.0.0.1]:47330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTzeX-0002uO-Nj for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Aug 2008 09:47:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTzeT-0002tj-L1 for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 09:47:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTzeQ-0002sm-U7 for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 09:47:37 -0400 Original-Received: from [199.232.76.173] (port=43721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTzeQ-0002sj-OG for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 09:47:34 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39460) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTzeQ-0007EW-3Z for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2008 09:47:34 -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 m7FDlPoS005334; Fri, 15 Aug 2008 06:47:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7FDe4aR002574; Fri, 15 Aug 2008 06:40: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 13:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 720 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: patch Original-Received: via spool by 720-submit@emacsbugs.donarmstrong.com id=B720.121880701432348 (code B ref 720); Fri, 15 Aug 2008 13:40:04 +0000 Original-Received: (at 720) by emacsbugs.donarmstrong.com; 15 Aug 2008 13:30:14 +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 m7FDU9YP032046 for <720@emacsbugs.donarmstrong.com>; Fri, 15 Aug 2008 06:30:11 -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 m7FDTX9G003428; Fri, 15 Aug 2008 09:29:35 -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 m7FDTU3N8136148; Fri, 15 Aug 2008 09:29:31 -0400 (EDT) X-Random-Quote: Why do we drive on parkways and park on driveways? In-Reply-To: (Eli Zaretskii's message of "Fri\, 15 Aug 2008 11\:22\:07 +0300") 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 09:47:37 -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:19459 Archived-At: Eli Zaretskii wrote: >> From: Francis Litterio >> >> w32.c(3820) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64 > > "Not implemented"? I'm not sure we want to support such a deficient > compiler. I would happily use a newer compiler. The file emacs/nt/INSTALL says this: To compile Emacs, you will need either Microsoft Visual C++ 2.0, or later up to 7.0, and nmake I didn't realize that I could use a version of VC++ newer than 6.0. I would be happy to abandon 6.0 for building Emacs on Windows. Is VC++ 7.0 the compiler that comes with Visual Studio 2003? What compiler do the Emacs developers use to build on Windows? > How about this: > > DWORD tot_hi = memstex.ullTotalPhys >> 32; > DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10; > DWORD tot_lo = memstex.ullTotalPhys % 1024LL; > totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0; > > Does this work? Nope: w32.c(3823) : error C2059: syntax error : 'bad suffix on number' w32.c(3823) : error C2146: syntax error : missing ')' before identifier 'L' w32.c(3823) : error C2059: syntax error : ')' w32.c(3824) : error C2059: syntax error : 'bad suffix on number' w32.c(3824) : error C2146: syntax error : missing ';' before identifier 'L' w32.c(3824) : error C2065: 'L' : undeclared identifier Here's the relevant code with line numbers: 3819 if (global_memory_status_ex (&memstex)) 3820 #if 1 3821 { 3822 DWORD tot_hi = memstex.ullTotalPhys >> 32; 3823 DWORD tot_md = (memstex.ullTotalPhys & 0x00000000ffffffffLL) >> 10; 3824 DWORD tot_lo = memstex.ullTotalPhys % 1024LL; 3825 totphys = tot_hi * 4194304.0 + tot_md + tot_lo / 1024.0; 3826 } 3827 #else 3828 totphys = (signed __int64)memstex.ullTotalPhys / 1024.0; 3829 #endif -- Fran