unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Robinow <drobinow@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Preprocessor defines in MS-Windows build
Date: Mon, 09 Jun 2008 11:42:22 +0300	[thread overview]
Message-ID: <u7iczknip.fsf@gnu.org> (raw)
In-Reply-To: <4eb0089f0806081855t120c9327of5897b87c21b616d@mail.gmail.com>

> Date: Sun, 8 Jun 2008 21:55:44 -0400
> From: "David Robinow" <drobinow@gmail.com>
> Cc: eliz@gnu.org
> 
> > Can someone with MSVC please see if removing these two switches causes
> > any trouble?
>  Removing -Di386 does not seem to cause a problem   (MSVC 2003). That
> is, I've been running the result for 5 minutes.

Thanks for testing.

> I haven't tried compiling without _X86_ yet.
>  i386 is not present in any of the standard include files. _X86_
> appears in several places.
> 
> _X86_ is not present by default.

I think the compiler defines it by default, because it knows it was
built for x86 architecture.  But I cannot be sure, since the MSDN docs
don't mention it, they document _M_IX86 instead...  Wait, I think I
found it: in Windows.h there's this snippet:

  #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86)
  #define _X86_
  #endif

So I think _X86_ is a legacy macro that was replaced with _M_IX86
(which has a value that indicates the architecture for which the
program is built, like the GCC's -mtune switch), and the above takes
care of defining it when the compiler builds a native x86 program.

Again, thanks for helping us understand the meaning and effect of
these macros.




  reply	other threads:[~2008-06-09  8:42 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
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 [this message]
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=u7iczknip.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drobinow@gmail.com \
    --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).