Danny Smith wrote:
> Hello all
> I'm still having concerns about _TEXT() and friends.
> With recent CVS commits, these are now conditional on _UNICODE in both
> tchar.h and winnt.h.
> So are TCHAR, LPTSTR and friends in winnt.h
> But all the w32api Unicode function and structure mappings are still
> conditional on UNICODE.
> So do we need to:
> 1) Replace all #ifdef UNICODES with
> #if defined (UNICODE) || defined (_UNICODE)
> throughout the w32api
> 2) Put something like this in winnt.h
> #if defined(UNICODE) && !defined(_UNICODE)
> #warning "defining _UNICODE because application defined UNICODE"
> #define _UNICODE
> #if defined(_UNICODE) && !defined(UNICODE)
> #warning "defining UNICODE because application defined _UNICODE"
> #define UNICODE
> 3) Am I getting too pedantic?
> The problem is that legacy code and makefiles will still expect UNICODE
> to do the same thing it used to.
Hmm... Ok, I suppose that MSDN says that it should be _UNICODE,
I would propose doing 1) eventually. I would propose for the immediate
a modified 2) where warn that UNICODE is deprecated and will be removed
in some future release if the UNICODE is defined and define _UNICODE if
it isn't. If _UNICODE is defined then define UNICODE if it isn't
We now have a w32api.h file that defines _W32API_VERSION so possibly we
could use it to control this.
Danny, can you work up a patch and send it directly to me?
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com