]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utils.cpp
Temporary fix for link error to ~wxZipOutputStream()
[wxWidgets.git] / src / os2 / utils.cpp
index f7798795906fe1a102a838ede6afff0fc769187c..f29aafc86b204b42f4e658b23a64a4744bc9b190 100644 (file)
@@ -220,17 +220,23 @@ wxBatteryState wxGetBatteryState()
 wxMemorySize wxGetFreeMemory()
 {
     void*                           pMemptr = NULL;
-    ULONG                           lSize;
+    LONG                            lSize;
     ULONG                           lMemFlags;
     APIRET                          rc;
 
     lMemFlags = PAG_FREE;
-    rc = ::DosQueryMem(pMemptr, &lSize, &lMemFlags);
+    rc = ::DosQueryMem(pMemptr, (PULONG)&lSize, &lMemFlags);
     if (rc != 0)
         lSize = -1L;
     return (wxMemorySize)lSize;
 }
 
+// Get Process ID
+unsigned long wxGetProcessId()
+{
+    return (unsigned long)getpid();
+}
+
 // ----------------------------------------------------------------------------
 // env vars
 // ----------------------------------------------------------------------------
@@ -431,7 +437,7 @@ wxChar* wxGetUserHome (
 
     char *wxBuffer = new wxChar[256];
 #ifndef __EMX__
-    if (sUser1 != _T(""))
+    if (!sUser1.empty())
     {
         wxChar                      zTmp[64];
 
@@ -453,7 +459,7 @@ wxChar* wxGetUserHome (
         }
     }
 #endif
-    if (sUser1 == _T(""))
+    if (sUser1.empty())
     {
         if ((zHome = wxGetenv(_T("HOME"))) != NULL)
         {
@@ -468,13 +474,6 @@ wxChar* wxGetUserHome (
     return NULL; // No home known!
 }
 
-bool wxDirExists(
-  const wxString&                   rDir
-)
-{
-    return (::DosSetCurrentDir(WXSTRINGCAST rDir));
-}
-
 wxString WXDLLEXPORT wxPMErrorToStr(
   ERRORID                           vError
 )