From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: Preprocessor defines in MS-Windows build Date: Fri, 27 Jun 2008 00:47:37 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1214520493 17924 80.91.229.12 (26 Jun 2008 22:48:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2008 22:48:13 +0000 (UTC) To: "emacs-devel Mailinglist" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 27 00:48:58 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 1KC0Gt-0006sW-Oq for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 00:48:56 +0200 Original-Received: from localhost ([127.0.0.1]:51336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC0G4-0004mQ-4T for ged-emacs-devel@m.gmane.org; Thu, 26 Jun 2008 18:48:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KC0Fg-0004O3-GF for emacs-devel@gnu.org; Thu, 26 Jun 2008 18:47:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KC0Ff-0004N4-TM for emacs-devel@gnu.org; Thu, 26 Jun 2008 18:47:40 -0400 Original-Received: from [199.232.76.173] (port=46770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC0Ff-0004Mm-Iw for emacs-devel@gnu.org; Thu, 26 Jun 2008 18:47:39 -0400 Original-Received: from ik-out-1112.google.com ([66.249.90.182]:7013) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KC0Ff-0005y8-1S for emacs-devel@gnu.org; Thu, 26 Jun 2008 18:47:39 -0400 Original-Received: by ik-out-1112.google.com with SMTP id c21so74200ika.2 for ; Thu, 26 Jun 2008 15:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=CK57nlVPiQ7BJUNhUOvYf2MiYr4FFFShRLlDGwgl1z4=; b=OU+CNIjt+QcYQKiQ0j8J9jjVoeMvE/ndiM3Gpq3U6mGZWrtrX9pLKDLLH9mWDQyrIn 7g7SphVgYFSPEXDhjLUt2A9kxyXweDrzN6yo1OGCeWwl/H/p7YAemXbH8DPiecMRpEiH TgJCROGJ1WcthbE1HlvfTHWnNr1DU7DXkmHd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Q7t9j2XGnveKvKROd5nT6s/0hdUwtMWh/rUzm3h51dxJXPaAJTqOD434nhFn6JnqjE l4T583S9oakGkgpZAn/e4uv6Snupy/jiVYbdV/fv3spVUUF2adsFsoqan4ddThio5Izv G00pQerS2PBhJ5CVFlDQLrsEaHZFG4sPvU3/s= Original-Received: by 10.210.65.17 with SMTP id n17mr429977eba.92.1214520457770; Thu, 26 Jun 2008 15:47:37 -0700 (PDT) Original-Received: by 10.210.71.14 with HTTP; Thu, 26 Jun 2008 15:47:37 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 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:99980 Archived-At: On Sat, Jun 7, 2008 at 19:30, Eli Zaretskii wrote: > 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 I've committed changes removing (or moving to nt/config.nt) everything that seems safe to (re)move. > WIN32_LEAN_AND_MEAN -- needed to produce a leaner executable > _WIN32_WINNT -- needed to prevent accidental use of features Moved to nt/config.nt. > _X86_ -- not needed, defined automatically by MinGW > headers > i386 -- not needed > _CRTAPI1 -- used only in sysdep.c, can be replaced by a > literal _cdecl Removed. > WINDOWSNT -- needed for W32-specific code in Emacs > DOS_NT -- needed for code that is specific to both DOS > and W32 ports Removed, they are defined in src/s/ms-w32.h if not already defined. > _UCHAR_T -- not needed Removed. > HAVE_NTGUI -- can be replaced with WINDOWSNT, since the W32 > build doesn't use any other GUI Not removed. Stefan felt that it could be useful in case we ever do a non-GUI Windows build. > USE_CRT_DLL -- looks like it's unneeded, since we never use > anything but the CRTDLL.dll runtime Not removed. According to Jason, it could be useful when building with newer MSVC compilers. I've tested the changes with MinGW. They should work also with MSVC; if not, please holler. Juanma