From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Preprocessor defines in MS-Windows build Date: Sat, 07 Jun 2008 15:04:21 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212865526 6107 80.91.229.12 (7 Jun 2008 19:05:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Jun 2008 19:05:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 07 21:06:09 2008 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 1K53jI-00080U-4D for ged-emacs-devel@m.gmane.org; Sat, 07 Jun 2008 21:05:51 +0200 Original-Received: from localhost ([127.0.0.1]:33084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K53iU-0005nV-ST for ged-emacs-devel@m.gmane.org; Sat, 07 Jun 2008 15:04:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K53iQ-0005lE-A6 for emacs-devel@gnu.org; Sat, 07 Jun 2008 15:04:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K53iP-0005jr-Jq for emacs-devel@gnu.org; Sat, 07 Jun 2008 15:04:38 -0400 Original-Received: from [199.232.76.173] (port=49066 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K53iP-0005jV-9S for emacs-devel@gnu.org; Sat, 07 Jun 2008 15:04:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:20766) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K53iA-0000VT-9i; Sat, 07 Jun 2008 15:04:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvABAIx4SkjO+ISodGdsb2JhbACBVpAzASecQQ X-IronPort-AV: E=Sophos;i="4.27,605,1204520400"; d="scan'208";a="22260109" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 07 Jun 2008 15:04:21 -0400 Original-Received: from pastel.home ([206.248.132.168]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id NZL75021; Sat, 07 Jun 2008 15:04:21 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6EC908864; Sat, 7 Jun 2008 15:04:21 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Sat, 07 Jun 2008 20:30:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:98603 Archived-At: > Here's an example of a typical compilation command line on Windows: > gcc -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 -D_X86_=1 -c -gstabs+ -g3 -mtune=pentium4 -O2 -Di386 -D_CRTAPI1=_cdecl -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I../nt/inc -D_UCHAR_T -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o oo-spd/i386/dispnew.o dispnew.c > This uses a lot -f -DSOMETHING switches, and it looks like most of Similar issues show on other platforms. I recently made minro changes to remove on or the other of those defines and move it into src/config.h instead. > these are not needed, and almost all the rest can be put on > src/s/ms-w32.h. Ideally src/config.h, no (tho maybe it's more difficult)? > Can someone help understanding the purpose of each switch? > Below I summarize what I gleaned from grepping fo each symbol in the > Emacs sources and in the system headers: Look at admin/CPP-DEFINES as well (and update/improve it whenever possible, of course). > HAVE_NTGUI -- can be replaced with WINDOWSNT, since the W32 > build doesn't use any other GUI Don't we support W32 builds without GUI? > Does someone know anything that contradicts the above? If not, I > think we should remove those defines that are not needed anymore, and > put those which are needed in ms-w32.h. Sounds fine to me, Stefan