]> git.sur5r.net Git - bacula/bacula/commitdiff
moved g_platform_id to winapi
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Sat, 7 May 2005 23:45:56 +0000 (23:45 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Sat, 7 May 2005 23:45:56 +0000 (23:45 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2012 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/win32/winservice.cpp
bacula/src/lib/winapi.c

index 0111087d2f49dfa78c64cd3d6fd37419de19aa7e..31e77a5da5666bc1c21135d0747c860842c8206f 100755 (executable)
@@ -54,7 +54,7 @@ void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
 
 bacService init;
 
-DWORD   g_platform_id;
+extern DWORD   g_platform_id;
 
 bacService::bacService()
 {
index 917d1c82680a174b5c3bfa2af50babf481ed2701..3c1d16390d9daabad9688e3606d4848508a508ad 100644 (file)
 
 #include "winapi.h"
 
+// init with win9x, but maybe set to NT in InitWinAPI
+DWORD  g_platform_id = VER_PLATFORM_WIN32_WINDOWS;
+
+
 /* API Pointers */
 
 t_OpenProcessToken      p_OpenProcessToken = NULL;
@@ -70,6 +74,7 @@ t_SetCurrentDirectoryW p_SetCurrentDirectoryW = NULL;
 t_GetCurrentDirectoryA p_GetCurrentDirectoryA = NULL;
 t_GetCurrentDirectoryW p_GetCurrentDirectoryW = NULL;
 
+
 void 
 InitWinAPIWrapper() 
 {
@@ -156,20 +161,17 @@ InitWinAPIWrapper()
    }
 
    // do we run on win 9x ???
-
-   DWORD   dw_platform_id;
-
    OSVERSIONINFO osversioninfo;
    osversioninfo.dwOSVersionInfoSize = sizeof(osversioninfo);
 
    // Get the current OS version
    if (!GetVersionEx(&osversioninfo)) {
-      dw_platform_id = 0;
+      g_platform_id = 0;
    } else {
-      dw_platform_id = osversioninfo.dwPlatformId;
+      g_platform_id = osversioninfo.dwPlatformId;
    }
 
-   if (dw_platform_id == VER_PLATFORM_WIN32_WINDOWS) {
+   if (g_platform_id == VER_PLATFORM_WIN32_WINDOWS) {
       p_BackupRead = NULL;
       p_BackupWrite = NULL;