From b63ca31ba4b4647b1bf7e4a95447698ee23688f4 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 5 Nov 2010 10:41:54 +0100 Subject: [PATCH] Avoid warning for win64 --- bacula/src/win32/compat/compat.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bacula/src/win32/compat/compat.h b/bacula/src/win32/compat/compat.h index 9311de065d..980ee9439d 100644 --- a/bacula/src/win32/compat/compat.h +++ b/bacula/src/win32/compat/compat.h @@ -381,7 +381,22 @@ void closelog(); void openlog(const char *ident, int option, int facility); #endif //HAVE_MINGW -extern void LogErrorMsg(const char *message); +void LogErrorMsg(const char *message); + +/* Don't let OS go to sleep (usually a Laptop) while we are backing up */ +void prevent_os_suspensions(); +void allow_os_suspensions(); + +typedef DWORD EXECUTION_STATE; +#define ES_CONTINUOUS 0x80000000 +#define ES_SYSTEM_REQUIRED 0x00000001 +#define ES_DISPLAY_REQUIRED 0x00000002 +#ifndef ES_USER_PRESENT +# define ES_USER_PRESENT 0x00000004 +#endif + +WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE esFlags); + #if !defined(INVALID_FILE_ATTRIBUTES) #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) -- 2.39.5