]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
added missing header.
[wxWidgets.git] / src / common / filefn.cpp
index 2539acd9ab0b272eb12fb70ae87c68b26a9739b6..1c498fa3b0f53c7adb99eb46d7a3b62e0ce99d55 100644 (file)
@@ -1474,7 +1474,13 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
 wxString wxGetCwd()
 {
     wxString str;
-    wxGetWorkingDirectory(wxStringBuffer(str, _MAXPATHLEN), _MAXPATHLEN);
+
+    // we can't create wxStringBuffer object inline: Sun CC generates buggy
+    // code in this case!
+    {
+        wxStringBuffer buf(str, _MAXPATHLEN);
+        wxGetWorkingDirectory(buf, _MAXPATHLEN);
+    }
 
     return str;
 }