]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Another solaris 2.5 fix.
[wxWidgets.git] / src / common / utilscmn.cpp
index 57fcf3bd32171acdbcb48a155c9770cb478207de..f15e7f0bbd3b2bb100ac5ef9ab7860309be4f487 100644 (file)
@@ -801,19 +801,6 @@ int isascii( int c )
 }
 #endif
 
-// Overloaded functions, taking a wxString
-bool wxGetHostName(wxString& name)
-{
-    bool success = wxGetHostName(wxBuffer, 500);
-    if (success)
-    {
-        name = wxBuffer;
-        return TRUE;
-    }
-    else
-        return FALSE;
-}
-
 bool wxGetUserId(wxString& buf)
 {
     bool success = wxGetUserId(wxBuffer, 500);
@@ -838,3 +825,13 @@ bool wxGetUserName(wxString& buf)
         return FALSE;
 }
 
+bool wxGetHostName(wxString& buf)
+{
+    static const size_t hostnameSize = 257;
+    bool ok = wxGetHostName(buf.GetWriteBuf(hostnameSize), hostnameSize);
+
+    buf.UngetWriteBuf();
+
+    return ok;
+}
+