unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Preprocessor defines in MS-Windows build
Date: Sat, 07 Jun 2008 15:04:21 -0400	[thread overview]
Message-ID: <jwv1w396pjh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <uiqwlm9ud.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 Jun 2008 20:30:18 +0300")

> 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




  reply	other threads:[~2008-06-07 19:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07 17:30 Preprocessor defines in MS-Windows build Eli Zaretskii
2008-06-07 19:04 ` Stefan Monnier [this message]
2008-06-07 20:25   ` Eli Zaretskii
2008-06-08  3:09     ` Stefan Monnier
2008-06-07 21:57 ` Jason Rumney
2008-06-07 23:53   ` Óscar Fuentes
2008-06-08  6:36     ` Eli Zaretskii
2008-06-09  1:55       ` David Robinow
2008-06-09  8:42         ` Eli Zaretskii
2008-06-26 22:47 ` Juanma Barranquero
2008-06-27  8:59   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv1w396pjh.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).