]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Need LINKAGEMODE for Visualage C++ compiles on the static global procs at the top
[wxWidgets.git] / src / common / utilscmn.cpp
index 6a6371248134e8fdc57e817463617d7c768fdcd0..a9fda2f4acc5416af274f405994ddf577124342b 100644 (file)
@@ -1040,3 +1040,37 @@ wxString wxGetHomeDir()
 
     return home;
 }
+
+#if 0
+
+wxString wxGetCurrentDir()
+{
+    wxString dir;
+    size_t len = 1024;
+    bool ok;
+    do
+    {
+        ok = getcwd(dir.GetWriteBuf(len + 1), len) != NULL;
+        dir.UngetWriteBuf();
+
+        if ( !ok )
+        {
+            if ( errno != ERANGE )
+            {
+                wxLogSysError(_T("Failed to get current directory"));
+
+                return wxEmptyString;
+            }
+            else
+            {
+                // buffer was too small, retry with a larger one
+                len *= 2;
+            }
+        }
+        //else: ok
+    } while ( !ok );
+
+    return dir;
+}
+
+#endif // 0