From 2e71ade9c58dfc6a7a7585359465c95312df949c Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 1 Aug 2012 21:02:54 +0000 Subject: [PATCH] Win compile fixes svn path=/trunk/boinc/; revision=25937 --- lib/coproc.h | 4 ++++ lib/diagnostics_win.h | 2 ++ lib/filesys.h | 9 ++++----- lib/gui_rpc_client.cpp | 3 ++- lib/gui_rpc_client_ops.cpp | 3 ++- lib/miofile.h | 2 -- lib/proxy_info.h | 4 ++-- lib/win_util.cpp | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/coproc.h b/lib/coproc.h index e186429b1b..791d460fda 100644 --- a/lib/coproc.h +++ b/lib/coproc.h @@ -65,6 +65,10 @@ #include #include +#ifdef _WIN32 +#include "boinc_win.h" +#endif + #ifdef _USING_FCGI_ #include "boinc_fcgi.h" #endif diff --git a/lib/diagnostics_win.h b/lib/diagnostics_win.h index edc6523b9d..b0ae2c99ea 100644 --- a/lib/diagnostics_win.h +++ b/lib/diagnostics_win.h @@ -18,6 +18,8 @@ #ifndef _BOINC_DIAGNOSTICS_WIN_ #define _BOINC_DIAGNOSTICS_WIN_ +#include "boinc_win.h" + #define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0) #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) #define SystemProcessAndThreadInformation 5 diff --git a/lib/filesys.h b/lib/filesys.h index ce09efa9d3..8f1fd1f517 100644 --- a/lib/filesys.h +++ b/lib/filesys.h @@ -29,17 +29,16 @@ #include #endif -#define FILE_RETRY_INTERVAL 5 - // On Windows, retry for this period of time, since some other program - // (virus scan, defrag, index) may have the file open. - - #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif #endif /* !WIN32 */ +#define FILE_RETRY_INTERVAL 5 + // On Windows, retry for this period of time, since some other program + // (virus scan, defrag, index) may have the file open. + #ifdef __cplusplus extern "C" { #endif diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp index 822f4f8adb..bc4efdad49 100644 --- a/lib/gui_rpc_client.cpp +++ b/lib/gui_rpc_client.cpp @@ -18,12 +18,13 @@ // This file is the underlying mechanism of GUI RPC client // (not the actual RPCs) -#include "gui_rpc_client.h" #if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) #include "boinc_win.h" #endif +#include "gui_rpc_client.h" + #ifdef _WIN32 #include "../version.h" #ifdef _MSC_VER diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index bc4f36e52b..ed146dd6e2 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -41,12 +41,13 @@ // formatting failures for any software that has been localized or // displays localized data. -#include "gui_rpc_client.h" #if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_) #include "boinc_win.h" #endif +#include "gui_rpc_client.h" + #ifdef _WIN32 #include "../version.h" #else diff --git a/lib/miofile.h b/lib/miofile.h index 43eda386fc..08a41fbe00 100644 --- a/lib/miofile.h +++ b/lib/miofile.h @@ -22,9 +22,7 @@ #include "boinc_fcgi.h" #endif -#ifndef _WIN32 #include -#endif #include "mfile.h" diff --git a/lib/proxy_info.h b/lib/proxy_info.h index f7e9d5c01b..53a2210291 100644 --- a/lib/proxy_info.h +++ b/lib/proxy_info.h @@ -18,8 +18,8 @@ #ifndef _PROXY_INFO_ #define _PROXY_INFO_ -struct XML_PARSER; -struct MIOFILE; +class XML_PARSER; +class MIOFILE; // info on whether HTTP requests need to go through a proxy // diff --git a/lib/win_util.cpp b/lib/win_util.cpp index 36687fb659..bcef5ad67d 100644 --- a/lib/win_util.cpp +++ b/lib/win_util.cpp @@ -802,7 +802,7 @@ bool is_remote_desktop() { static tWTSFM pWTSFM = NULL; LPTSTR pBuf = NULL; DWORD dwLength; - USHORT usProtocol=-1, usConnectionState=-1; + USHORT usProtocol=99, usConnectionState=99; if (!wtsapi32lib) { wtsapi32lib = LoadLibrary(_T("wtsapi32.dll"));