Re: Predefine _M_IX86 in gcc

Danny Smith <[email protected]>
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <000d01c2a593$ca773220$4a99a7cb@DANNY>
----- Original Message -----
From: "Cosmin Truta" <[email protected]>
To: <[email protected]>
Sent: Tuesday, 17 December 2002 04:58
Subject: [MinGW-patches] Predefine _M_IX86 in gcc


>
> Hi,
>
> I needed to use OpenGL/glut under MinGW. I grabbed glut-3.7.6, but
> I needed to do some fixing, so that CALLBACK is defined properly
> (below).
> This is a fragment of glut.h.
>
> #   if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) ||
\
>   defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__)
> #    define CALLBACK __stdcall
> #   else
> #    define CALLBACK
> #   endif
>
> Adding "defined(__GCC__)" was a quick and effective fix for me.
However,
> I think that _M_IX86 should be predefined when compiling a Win32/Intel
> program, regardless of the compiler used.

Those defines are done for you if you include windows.h.
_M_IX86 is defined in winnt.h
CALLBACK is defined in windef.h

Danny



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.