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 11:31:34 +0200 Message-ID: References: <47035169.8070402@gnu.org> <4703869F.6070909@gnu.org> <47038922.10105@gnu.org> <4705652C.5070803@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1191576715 11964 80.91.229.12 (5 Oct 2007 09:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2007 09:31:55 +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 11:31:53 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 1IdjXD-0005fa-Fp for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 11:31:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdjX8-000292-Kx for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 05:31:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdjX5-00027t-6E for emacs-devel@gnu.org; Fri, 05 Oct 2007 05:31:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdjX3-00025i-ER for emacs-devel@gnu.org; Fri, 05 Oct 2007 05:31:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdjX3-00025a-A0 for emacs-devel@gnu.org; Fri, 05 Oct 2007 05:31:41 -0400 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IdjWy-0002PM-C3; Fri, 05 Oct 2007 05:31:36 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-18-77.inter.net.il [80.230.18.77]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id HYM78473 (AUTH halo1); Fri, 5 Oct 2007 11:28:54 +0200 (IST) In-reply-to: <4705652C.5070803@gnu.org> (message from Jason Rumney on Thu, 04 Oct 2007 23:11:56 +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:80284 Archived-At: > Date: Thu, 04 Oct 2007 23:11:56 +0100 > From: Jason Rumney > Cc: emacs-devel@gnu.org > > There are several other files that include stdlib.h after lisp.h > conditional on WINDOWSNT too. Does that not also cause the same problem? > Also msdos.c includes lisp.h before stdlib.h, so there could be a > problem there too. No, msdos.c doesn't suffer from this problem, and I think I know why. You will see in src/config.in that if HAVE_STDLIB_H is defined, config.h will include stdlib.h. Since we always include config.h before any other headers, if some source file includes stdlib.h explicitly, that second inclusion is effectively ignored (due to idempotency of system headers), and the fact that meanwhile lisp.h defined `abs' as a macro does not have any adverse effects. However, the Windows build uses its own config.h that is produced from nt/config.nt, not from src/config.in. And config.nt does NOT include stdlib.h. Which is why I think the Windows build is the only one affected by the macro `abs' in lisp.h, since even the MSDOS build produces config.h from config.in (by editing it with Sed scripts in the msdos/ subdirectory). I still think that we should avoid a macro with a name that's identical to a standard function. We should rename it to something that cannot clash with the standard C library.