msvcrt: compatibility fixes

Dimitrie O. Paun dimi at intelliware.ca
Mon Apr 26 16:40:50 CDT 2004


On Mon, 26 Apr 2004, Alexandre Julliard wrote:

> Unfortunately _WCHAR_T_DEFINED is also used by gcc in stddef.h.

Hmmm, thinking about it, even more so, shouldn't we also be
compatible with that? I mean, if it was defined by them, we
shouldn't define it again, no?

Currently we have this:

#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif

Maybe we need to transform this to:

#ifndef _WCHAR_T_DEFINED
#define _WCHAR_T_DEFINED
/* hmmm, shouldn't we also deal with WINE_UNICODE_NATIVE? */
typedef unsigned short wchar_t;
#endif

#if defined(MSVCRT) && !defined(MSVCRT_WCHAR_T_DEFINED)
#define MSVCRT_WCHAR_T_DEFINED
typedef unsigned short  MSVCRT(wchar_t);
#endif

This is getting tiredsome -- why not have a wine/msvcrt.h header
to put all this stuff into? We aren't breaking any compatibility,
since we don't include any other header, we're just defining what
we define inline anyway.

-- 
Dimi.





More information about the wine-devel mailing list