diff options
author | Earnie Boyd <earnie@users.sf.net> | 2001-02-02 16:50:06 +0000 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2001-02-02 16:50:06 +0000 |
commit | a562294385ebdba63e7fbe175dfdf86118822751 (patch) | |
tree | fde4b99e77f5b398e7549d1b479cfff3eed4f7ff | |
parent | 47f810920afff067666bd6496a3c92e92e2d65a8 (diff) | |
download | cygnal-a562294385ebdba63e7fbe175dfdf86118822751.tar.gz cygnal-a562294385ebdba63e7fbe175dfdf86118822751.tar.bz2 cygnal-a562294385ebdba63e7fbe175dfdf86118822751.zip |
Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net>
* include/tchar.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>
-rw-r--r-- | winsup/mingw/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/mingw/include/tchar.h | 34 |
2 files changed, 30 insertions, 13 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index e8b5ff6d4..c99156319 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,4 +1,13 @@ +Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net> + + * include/tchar.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:12:51 2001 Earnie Boyd <earnie@users.sourceforge.net> * Makefile.in: Increment version to 0.5 diff --git a/winsup/mingw/include/tchar.h b/winsup/mingw/include/tchar.h index c2eb90527..5ec224ebb 100644 --- a/winsup/mingw/include/tchar.h +++ b/winsup/mingw/include/tchar.h @@ -61,14 +61,13 @@ typedef wchar_t TCHAR; /* - * Enclose constant strings and literal characters in the _TEXT macro to make - * them unicode constant strings when _UNICODE is defined. + * __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. */ -#define _TEXT(x) L ## x - -#ifndef _T -#define _T(x) L ## x -#endif +#undef __TEXT +#define __TEXT(x) L ## x /* for porting from other Windows compilers */ #if 0 // no wide startup module @@ -213,13 +212,13 @@ typedef char TCHAR; #endif /* - * Enclose constant strings and characters in the _TEXT macro. + * __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. */ -#define _TEXT(x) x - -#ifndef _T -#define _T(x) x -#endif +#undef __TEXT +#define __TEXT(x) x /* for porting from other Windows compilers */ #define _tmain main @@ -351,5 +350,14 @@ typedef char TCHAR; #endif /* Not _UNICODE */ +/* + * UNICODE a constant string when _UNICODE is defined else returns the string + * unmodified. Also defined in w32api/winnt.h. + */ +#undef _TEXT +#define _TEXT(x) __TEXT(x) +#undef _T +#define _T(x) __TEXT(x) + #endif /* Not _TCHAR_H_ */ |