From 5d023ae8d5e72dcd007b021eacb65508a07cf03f Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Thu, 13 Oct 2005 20:31:50 +0000 Subject: [PATCH] 2005-10-13 Wu Yongwei * include/tchar.h: Include when _UNICODE is defined. (_TEOF): New macro definition for _UNICODE and non_UNICODE cases. --- winsup/mingw/ChangeLog | 5 +++++ winsup/mingw/include/tchar.h | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 76ee8eef0..c81467246 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,8 @@ +2005-10-13 Wu Yongwei + + * include/tchar.h: Include when _UNICODE is defined. + (_TEOF): New macro definition for _UNICODE and non_UNICODE cases. + 2005-10-12 Danny Smith * include/stddef.h: Remove. diff --git a/winsup/mingw/include/tchar.h b/winsup/mingw/include/tchar.h index 241325acd..a07d75f45 100644 --- a/winsup/mingw/include/tchar.h +++ b/winsup/mingw/include/tchar.h @@ -31,6 +31,10 @@ */ #ifdef _UNICODE +/* + * Include for wchar_t and WEOF if _UNICODE. + */ +#include /* * Use TCHAR instead of char or wchar_t. It will be appropriately translated @@ -44,6 +48,11 @@ typedef wchar_t _TCHAR; #define _TCHAR_DEFINED #endif +/* + * Use _TEOF instead of EOF or WEOF. It will be appropriately translated if + * _UNICODE is correctly defined (or not). + */ +#define _TEOF WEOF /* * __TEXT is a private macro whose specific use is to force the expansion of a @@ -212,6 +221,7 @@ typedef wchar_t _TCHAR; #define _trewinddir _wrewinddir #define _ttelldir _wtelldir #define _tseekdir _wseekdir + #else /* Not _UNICODE */ /* @@ -225,6 +235,11 @@ typedef char _TCHAR; #define _TCHAR_DEFINED #endif +/* + * _TEOF, the constant you should use instead of EOF. + */ +#define _TEOF EOF + /* * __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 -- 2.43.5