]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsunx.cpp
Restore compilation with --enable-stl, fix SetFocus with the generic control, and...
[wxWidgets.git] / src / unix / utilsunx.cpp
index 66068411bebc02b89c219ba63dae9abd0bc8b737..c64721bafbd705b14368ae01e27ccc816f7b92ff 100644 (file)
@@ -262,7 +262,8 @@ long wxMacExecute(wxChar **argv,
 long wxExecute( const wxString& command, int flags, wxProcess *process )
 {
     wxCHECK_MSG( !command.empty(), 0, wxT("can't exec empty command") );
-    wxLogDebug(wxString(wxT("Launching: ")) + command);
+
+    wxLogTrace(wxT("exec"), wxT("Executing \"%s\""), command.c_str());
 
 #if wxUSE_THREADS
     // fork() doesn't mix well with POSIX threads: on many systems the program
@@ -790,7 +791,13 @@ static bool wxGetHostNameInternal(wxChar *buf, int sz)
         buf[sz] = wxT('\0');
     }
 #elif defined(HAVE_GETHOSTNAME)
-    bool ok = gethostname(buf, sz) != -1;
+    char cbuf[sz];
+    bool ok = gethostname(cbuf, sz) != -1;
+    if ( ok )
+    {
+        wxStrncpy(buf, wxConvertMB2WX(cbuf), sz - 1);
+        buf[sz] = wxT('\0');
+    }
 #else // no uname, no gethostname
     wxFAIL_MSG(wxT("don't know host name for this machine"));