[MSVCRT] Cross build fix

Dimitrie O. Paun dpaun at rogers.com
Tue Jun 1 07:55:29 CDT 2004

On Tue, Jun 01, 2004 at 11:42:28AM +0200, Hans Leidekker wrote:
> Hi,
> This patch:
>   http://www.winehq.org/hypermail/wine-cvs/2004/04/0357.html
> broke the MinGW build of msvcrt. The changelog says it's a compatibility
> fix. Dimi: what compatibility were you aiming at with this patch?

Compatibility with other headers. _WCTYPE_T_DEFINED is in a way
part of the public interface, and when we use the headers in
Winelib apps, we need to define it so we don't end up with
duplicate declarations for wint_t/wctype_t. When we build
msvcrt it's a different story of course, and we seem to need
the exact opposite. Which is why I find the entire MSVCRT()
thing not only ugly, but a bit problematic also.

Alexandre, why don't we just remove all those MSVCRT() macros,
use the headers in Winelib apps, and duplicate what we need
with a MSVCRT_ prefix in an internal header that we use just
for building? These things are quite stable, so the risk of
diverging is small, and for thinks like structures we can
write tests to make sure we have the same sizes/layouts.


P.S. Please note that in theory the same situation holds true
for all the other sentries. So it's not like we only have a
problem with wint_t/wctype_t.

More information about the wine-devel mailing list