Allow for compilation under iOS 11

The system() API call has been deprecated since iOS 8, so it's better not to use it at all, eventhough compilation only breaks in iOS 11.
This commit is contained in:
Stefan Csomor
2017-06-24 22:01:15 +02:00
parent fb5239d709
commit 7104ed845d
2 changed files with 9 additions and 1 deletions

View File

@@ -905,7 +905,9 @@ WX_STRTOX_FUNC(wxULongLong_t, wxStrtoull, wxCRT_StrtoullA, wxCRT_StrtoullW)
#undef WX_STRTOX_FUNC
// ios doesn't export system starting from iOS 11 anymore and usage was critical before
#if defined(__WXOSX__) && wxOSX_USE_IPHONE
#else
// mingw32 doesn't provide _tsystem() even though it provides other stdlib.h
// functions in their wide versions
#ifdef wxCRT_SystemW
@@ -913,6 +915,7 @@ inline int wxSystem(const wxString& str) { return wxCRT_SystemW(str.wc_str()); }
#else
inline int wxSystem(const wxString& str) { return wxCRT_SystemA(str.mb_str()); }
#endif
#endif
inline char* wxGetenv(const char *name) { return wxCRT_GetenvA(name); }
inline wchar_t* wxGetenv(const wchar_t *name) { return wxCRT_GetenvW(name); }