From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 23.0.50 compile problem on Windows XP Date: Fri, 05 Oct 2007 10:19:33 +0200 Message-ID: References: <47035169.8070402@gnu.org> <4703869F.6070909@gnu.org> <4705F100.2000107@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1191572400 29666 80.91.229.12 (5 Oct 2007 08:20:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2007 08:20:00 +0000 (UTC) Cc: sridhar_ml@yahoo.com, emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 05 10:19:57 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IdiPV-0007F0-Og for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 10:19:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdiPQ-0000tP-TE for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 04:19:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdiPN-0000pA-5N for emacs-devel@gnu.org; Fri, 05 Oct 2007 04:19:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdiPM-0000mQ-34 for emacs-devel@gnu.org; Fri, 05 Oct 2007 04:19:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdiPL-0000m4-NQ for emacs-devel@gnu.org; Fri, 05 Oct 2007 04:19:39 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IdiPH-0001eK-IR; Fri, 05 Oct 2007 04:19:35 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-18-77.inter.net.il [80.230.18.77]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DTY54847 (AUTH halo1); Fri, 5 Oct 2007 10:19:33 +0200 (IST) In-reply-to: <4705F100.2000107@gnu.org> (message from Jason Rumney on Fri, 05 Oct 2007 09:08:32 +0100) X-Detected-Kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80275 Archived-At: > Date: Fri, 05 Oct 2007 09:08:32 +0100 > From: Jason Rumney > Cc: sridhar_ml@yahoo.com, emacs-devel@gnu.org > > Eli Zaretskii wrote: > > What constant? I don't see it in the MinGW headers, but maybe MSVC > > headers are different. > > > mingw only defines abs in stdlib.h It defines a _function_ `abs', not a macro. A macro is not defined anywhere, AFAICS. > > And I still didn't get an answer to my question from yesterday: What > > is on and around line 182 of VC's math.h that causes the failure below? > > > I have a different version of VC, but it seems it is the declaration of > abs that causes the problem: > > int __cdecl abs(__in int _X); > > Since lisp.h has already been included, this gets expanded as the macro > defined there, which causes a syntax error. So we are talking about a function-vs-macro mess? If so, I'd suggest to rename the macro to something like `emacs_abs', because there's no good solution to this that I know of. Carefully crafted headers can avoid this by taking function names in parens, like this: int __cdecl (abs)(__in int _X); but if they don't, there's nothing we can do to fix this in general. Changing the order of headers is just a temporary kludge, IMHO; if we do that, the problem will continue to haunt us.