X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50a2e26fd717e510a1beae2e1da2f93742907eba..2ac51e161d5675e4874112e74a6ba81dfdbe1200:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 0a16b57fa4..02befc3f43 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -182,7 +182,7 @@ wxString wxNow() return wxEmptyString; #endif #else - time_t now = time((time_t *) NULL); + time_t now = time(NULL); char *date = ctime(&now); date[24] = '\0'; return wxString::FromAscii(date); @@ -942,7 +942,7 @@ void wxQsort(void *const pbase, size_t total_elems, // implemented in a port-specific utils source file: bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags); -#elif defined(__UNIX__) || defined(__WXCOCOA__) || \ +#elif defined(__WXX11__) || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || \ (defined(__WXMAC__) && !defined(__WXOSX_IPHONE__)) // implemented in a port-specific utils source file: @@ -1037,9 +1037,13 @@ static bool DoLaunchDefaultBrowserHelper(const wxString& urlOrig, int flags) if ( uri.GetScheme() == "file" ) { + // TODO: extract URLToFileName() to some always compiled in + // function +#if wxUSE_FILESYSTEM // ShellExecuteEx() doesn't like the "file" scheme when opening local files; // remove it url = wxFileSystem::URLToFileName(url).GetFullPath(); +#endif // wxUSE_FILESYSTEM } }