]> git.sur5r.net Git - bacula/bacula/commitdiff
Avoid warning for win64
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 5 Nov 2010 09:41:54 +0000 (10:41 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Nov 2010 13:53:31 +0000 (14:53 +0100)
bacula/src/win32/compat/compat.h

index 9311de065d5df6544371e2b271a0a3571b5bcbf5..980ee9439d7725a95a1c461f7e86b689cf5e3922 100644 (file)
@@ -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)