From: Eric Bollengier Date: Fri, 5 Nov 2010 09:41:54 +0000 (+0100) Subject: Avoid warning for win64 X-Git-Tag: Release-5.2.1~928 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b63ca31ba4b4647b1bf7e4a95447698ee23688f4;p=bacula%2Fbacula Avoid warning for win64 --- 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)