This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: misdefined macro _T in winnt.h
- To: Eric PAIRE <eric dot paire at ri dot silicomp dot com>
- Subject: Re: misdefined macro _T in winnt.h
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Wed, 31 Jan 2001 10:26:47 -0500
- CC: cygwin at cygwin dot com
- References: <200101311041.LAA27771@mailhost.ri.silicomp.fr>
- Reply-To: Earnie Boyd <cygwin at cygwin dot com>
Eric PAIRE wrote:
>
> Hi cygwin people,
>
> I have found a problem with the _T macro definition as it is defined in
> w32api/include/winnt.h: "#define _T TEXT" does not compile correctly the
> following small program:
>
> ------ Cut Here ------ Cut Here ------ Cut Here ------ Cut Here ------
> #include <windows.h>
> #define __DIR "dir"
>
> main() {
> size_t len = wcslen(_T(__DIR)) + wcslen(_T("dir"));
> exit(len);
> }
> ------ Cut Here ------ Cut Here ------ Cut Here ------ Cut Here ------
>
What problems do you see compiling this with the current headers? I'm
not having problems compiling this example.
> In addition, the Microsoft VisualC programming manual also says that _T macro
> is identical to _TEXT macro, which is not defined in winnt.h (but TEXT is
> defined).
>
Ok, I agree that TEXT is incorrect. But the definition of _T I don't
believe to be incorrect. However, the MSDN documentation describes this
macro for tchar.h not for winnt.h. The macro is correct for tchar.h.
> You will find an obvious patch for these 2 problems appended to this mail:
Your patch has problems:
1) you did a reversed patch
2) you don't include a ChangeLog entry.
I will take care of modifying w32api/include/winnt.h and give you credit
for pointing it out.
Earnie.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple