diff options
author | Earnie Boyd <earnie@users.sf.net> | 2001-02-02 21:10:58 +0300 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2001-02-02 21:10:58 +0300 |
commit | 7152ac2bb34810e380f8978df2f7b90360e42094 (patch) | |
tree | 1e9986b25c734b027784453a55d7ab886418a80d /winsup/w32api | |
parent | a562294385ebdba63e7fbe175dfdf86118822751 (diff) |
* include/winnt.h: (__TEXT): Add private macro.
(_TEXT): Modify definition to use __TEXT.
(_T): Ditto.
This change allows the passing of a MACRO as an argument and have that
MACRO resolved first.
Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
Diffstat (limited to 'winsup/w32api')
-rw-r--r-- | winsup/w32api/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/w32api/include/winnt.h | 27 |
2 files changed, 29 insertions, 7 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index c0c0d984e..218515e04 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,4 +1,13 @@ +Fri Feb 2 13:08:09 2001 Earnie Boyd <earnie@users.sourceforge.net> + + * include/winnt.h: (__TEXT): Add private macro. + (_TEXT): Modify definition to use __TEXT. + (_T): Ditto. + This change allows the passing of a MACRO as an argument and have that + MACRO resolved first. + Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com> + Wed Jan 31 17:35:59 2001 Earnie Boyd <earnie@users.sourceforge.net> * Makefile.in: Increment VERSION to 0.5 diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h index a23cb2233..7393d69dc 100644 --- a/winsup/w32api/include/winnt.h +++ b/winsup/w32api/include/winnt.h @@ -69,7 +69,7 @@ typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR; typedef CONST CHAR *LPCCH,*PCSTR,*LPCSTR; #ifndef _TCHAR_DEFINED #define _TCHAR_DEFINED -#ifdef UNICODE +#ifdef _UNICODE typedef WCHAR TCHAR; #else typedef CHAR TCHAR; @@ -78,14 +78,27 @@ typedef CHAR TCHAR; typedef TCHAR TBYTE,*PTCH,*PTBYTE; typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR; typedef const TCHAR *LPCTSTR; -#ifdef UNICODE -#define _TEXT(q) L##q +#ifdef _UNICODE +/* + * __TEXT is a private macro whose specific use is to force the expansion of a + * macro passed as an argument to the macros _T or _TEXT. DO NOT use this + * macro within your programs. It's name and function could change without + * notice. + */ +#undef __TEXT +#define __TEXT(q) L##q #else -#define _TEXT(q) q -#endif -#ifndef _T -#define _T _TEXT +#undef __TEXT +#define __TEXT(q) q #endif +/* + * UNICODE a constant string when _UNICODE is defined else returns the string + * unmodified. Also defined in mingw/tchar.h. + */ +#undef _TEXT +#define _TEXT(q) __TEXT(q) +#undef _T +#define _T(q) __TEXT(q) typedef SHORT *PSHORT; typedef LONG *PLONG; typedef void *HANDLE; |