Francois Gouget wrote:

> On Wed, 13 Dec 2000, David Elliott wrote:
>
> > In order to allow __cdecl and __stdcall to be defined correctly without
> > including Windows headers it is necessary to split their definition out into
> > a new include file.  This include file is then included into windef.h in the
> > same place it was before.  This include file will also be included in the
> > msvcrt headers so that they don't have to include all of windef.h just to
> > get the definition of __cdecl and __stdcall.
>
>    I made a similar proposal to Alexandre recently but he wasn't too
> hot.
>    One difference is that I chose to isolate all the things that would
> normally be provided by the compiler on Windows, and a few widely used
> very basic Wine-specific items, not just the calling convention macros.
> I had:
>  - CPU macros (as part of the calling convetion, maybe it should be
>    handled separately)
>  - calling convention
>  - anonymous struct/unions
>  - ANSI/Unicode type/prototype support (the _AW macros)
>  - Macros for structure packing (actually WINE_UNUSED, WINE_PACKED, ...)
>
>    I called the new file 'wine/winedef.h' and I expected that it might
> be used in other Windows headers, should it turn out that one of them is
> not supposed to include 'windef.h'. But I actually don't know of such a
> header (except the C headers), so my case was a bit weak.
>    I attached it so that you can have a look at it. Maybe I should
> revive it?
>

You should definitely revive it IMHO.  Alexandre has said himself that it is
inappropriate for C library headers to #include windef.h.  The most reasonable
way to do this is to seperate all of the Windows compiler definitions into a new
include file or to seperate them out into several new include files.  At the very
least the C headers themselves need __cdecl defined correctly so it definitely
makes sense to seperate that out.

However, I can not think of many programs that would use the other items on your
list and not #include windef.h except for the anonymous structs/unions but that
is probably a rare case anyway.

In any case, something has to be done about this before Alexandre will even
accept my patch for msvcrt since otherwise I will need to include windef.h and he
has already expressed a dislike for that approach (which seems completely
reasonable to me)

-Dave


Reply via email to