diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index dbf556310c..2cbd853ecf 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -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); } diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 6dd2e9927e..15c0f9e642 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -247,6 +247,10 @@ int wxKill(long pid, wxSignal sig, wxKillError *rc, int flags) // Shutdown or reboot the PC bool wxShutdown(int flags) { +#if defined(__WXOSX__) && wxOSX_USE_IPHONE + wxUnusedVar(flags); + return false; +#else flags &= ~wxSHUTDOWN_FORCE; wxChar level; @@ -270,6 +274,7 @@ bool wxShutdown(int flags) } return system(wxString::Format("init %c", level).mb_str()) == 0; +#endif } // ----------------------------------------------------------------------------