From b1a8ce8354b1b9f5bc8d65efad33416652f0da24 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Nov 2020 14:06:18 +0100 Subject: [PATCH] Test for wxHAVE_TCHAR_SUPPORT instead of individual _txxx() This is more consistent and slightly simpler. Testing for _tsystem() explicitly is not needed any more as _wsystem() is supported since MinGW 3.4.5, i.e. certainly present in all supported MinGW versions. See #18958. --- include/wx/wxcrtbase.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index 015e63d18a..f52a543d91 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -500,7 +500,7 @@ WXDLLIMPEXP_BASE int wxCRT_FputcW(wchar_t wc, FILE *stream); ------------------------------------------------------------------------- */ #define wxCRT_GetenvA getenv -#ifdef _tgetenv +#ifdef wxHAVE_TCHAR_SUPPORT #define wxCRT_GetenvW _wgetenv #endif @@ -510,8 +510,7 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name); #define wxCRT_SystemA system -/* mingw32 doesn't provide _tsystem() or _wsystem(): */ -#if defined(_tsystem) +#ifdef wxHAVE_TCHAR_SUPPORT #define wxCRT_SystemW _wsystem #endif