Unicode compilation fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-22 00:23:35 +00:00
parent 21708c7331
commit c39e759922

View File

@@ -57,9 +57,11 @@ wxString wxStandardPaths::GetInstallPrefix() const
#ifdef __LINUX__ #ifdef __LINUX__
// under Linux, we can get location of the executable // under Linux, we can get location of the executable
wxString exe; char buf[4096];
if ( readlink("/proc/self/exe", wxStringBuffer(exe), 1024) != -1 ) if ( readlink("/proc/self/exe", buf, WXSIZEOF(buf)) != -1 )
{ {
wxString exe(buf, wxConvLibc);
// consider that we're in the last "bin" subdirectory of our prefix // consider that we're in the last "bin" subdirectory of our prefix
wxString basename(wxString(wxTheApp->argv[0]).AfterLast(_T('/'))); wxString basename(wxString(wxTheApp->argv[0]).AfterLast(_T('/')));
size_t pos = exe.find(_T("/bin/") + basename); size_t pos = exe.find(_T("/bin/") + basename);