X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2415cf6725d5cfb11f52d29e5d28dfdaa197b366..8e77fd8bca165aab9709649d79a7cbc6a172d4e1:/include/wx/wxcrtbase.h diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index 406190292c..c126980533 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -164,14 +164,15 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); #define wxCRT_StrxfrmW wcsxfrm #endif /* __WXWINCE__ */ -/* Almost all compiler have strdup(), but VC++ for CE doesn't provide it. - Another special case is gcc in strict ANSI mode: normally it doesn't provide - strdup() but MinGW does provide it under MSVC-compatible name so test for it - before checking __WX_STRICT_ANSI_GCC__. */ -#if (defined(__VISUALC__) && __VISUALC__ >= 1400) || \ - defined(__MINGW32__) +/* Almost all compilers have strdup(), but VC++ and MinGW call it _strdup(). + And it's not available in MinGW strict ANSI mode nor under Windows CE. */ +#if (defined(__VISUALC__) && __VISUALC__ >= 1400) #define wxCRT_StrdupA _strdup -#elif !(defined(__WXWINCE__) || defined(__WX_STRICT_ANSI_GCC__)) +#elif defined(__MINGW32__) + #ifndef __WX_STRICT_ANSI_GCC__ + #define wxCRT_StrdupA _strdup + #endif +#elif !defined(__WXWINCE__) #define wxCRT_StrdupA strdup #endif