]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utilsexc.cpp
fixing osx_carbon
[wxWidgets.git] / src / os2 / utilsexc.cpp
index 21b50548e24335c4a4f92ab6c5ee8751a6f431de..199781f7cfbdb052d1b40f6becef40b15df8dd57 100644 (file)
     #include "wx/utils.h"
     #include "wx/app.h"
     #include "wx/intl.h"
+    #include "wx/log.h"
 #endif
 
-#include "wx/log.h"
-
 #include "wx/process.h"
 
 #include "wx/os2/private.h"
@@ -129,7 +128,8 @@ MRESULT APIENTRY wxExecuteWindowCbk( HWND   hWnd,
 
 long wxExecute( const wxString& rCommand,
                 int flags,
-                wxProcess* pHandler)
+                wxProcess* pHandler,
+                const wxExecuteEnv *env)
 {
     if (rCommand.empty())
     {
@@ -157,7 +157,7 @@ long wxExecute( const wxString& rCommand,
                       ,zArgs
                       ,zEnvs
                       ,&vResultCodes
-                      ,(PSZ)rCommand.c_str()
+                      ,rCommand.c_str()
                      );
     if (rc != NO_ERROR)
     {
@@ -220,6 +220,7 @@ long wxExecute(
   char**                            ppArgv
 , int                               flags
 , wxProcess*                        pHandler
+, const wxExecuteEnv *env
 )
 {
     wxString                        sCommand;
@@ -235,32 +236,11 @@ long wxExecute(
     return wxExecute( sCommand
                      ,flags
                      ,pHandler
+                     , env
                     );
 }
 
-bool wxGetFullHostName( wxChar* zBuf,
-                        int nMaxSize)
+bool wxGetFullHostName( wxChar* zBuf, int nMaxSize)
 {
-#if wxUSE_NET_API
-    char                            zServer[256];
-    char                            zComputer[256];
-    unsigned long                   ulLevel = 0;
-    unsigned char*                  zBuffer = NULL;
-    unsigned long                   ulBuffer = 256;
-    unsigned long*                  pulTotalAvail = NULL;
-
-    NetBios32GetInfo( (const unsigned char*)zServer
-                     ,(const unsigned char*)zComputer
-                     ,ulLevel
-                     ,zBuffer
-                     ,ulBuffer
-                     ,pulTotalAvail
-                    );
-    strncpy(zBuf, zComputer, nMaxSize);
-    zBuf[nMaxSize] = _T('\0');
-#else
-    wxUnusedVar(nMaxSize);
-    strcpy((char*)zBuf, "noname");
-#endif
-    return *zBuf ? true : false;
+    return wxGetHostName( zBuf, nMaxSize );
 }