[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preprocessor defines in MS-Windows build
From: |
Juanma Barranquero |
Subject: |
Re: Preprocessor defines in MS-Windows build |
Date: |
Fri, 27 Jun 2008 00:47:37 +0200 |
On Sat, Jun 7, 2008 at 19:30, Eli Zaretskii <address@hidden> 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
Re: Preprocessor defines in MS-Windows build,
Juanma Barranquero <=