Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Apparently-From: Message-ID: <3A782EB7.BD09F881@yahoo.com> Date: Wed, 31 Jan 2001 10:26:47 -0500 From: Earnie Boyd Reply-To: Earnie Boyd X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Eric PAIRE CC: cygwin AT cygwin DOT com Subject: Re: misdefined macro _T in winnt.h References: <200101311041 DOT LAA27771 AT mailhost DOT ri DOT silicomp DOT fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > #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