From f905fd09ebc71de5ad0504627b392db8c6e7e58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Wed, 3 Oct 2012 08:20:40 -0400 Subject: [PATCH] winpr: fix tchar redefinition --- winpr/include/winpr/tchar.h | 10 ++++++---- winpr/include/winpr/wtypes.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/winpr/include/winpr/tchar.h b/winpr/include/winpr/tchar.h index 5d43a0c74..2050cabf1 100644 --- a/winpr/include/winpr/tchar.h +++ b/winpr/include/winpr/tchar.h @@ -30,21 +30,23 @@ #else #ifdef UNICODE -typedef WCHAR TCHAR; +typedef WCHAR TCHAR; +#else +typedef CHAR TCHAR; +#endif + +#ifdef UNICODE #define _tprintf wprintf #define _tcsdup _wcsdup #define _tcscmp wcscmp #define _tcscpy wcscpy #else -typedef CHAR TCHAR; #define _tprintf printf #define _tcsdup _strdup #define _tcscmp strcmp #define _tcscpy strcpy #endif -typedef TCHAR *LPTSTR, *LPTCH; - #endif #endif /* WINPR_TCHAR_H */ diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index a405ef2ff..3b3669123 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -148,9 +148,11 @@ typedef struct _LUID #endif #ifdef UNICODE +typedef LPWSTR LPTCH; typedef LPWSTR LPTSTR; typedef LPCWSTR LPCTSTR; #else +typedef LPSTR LPTCH; typedef LPSTR LPTSTR; typedef LPCSTR LPCTSTR; #endif