]> sjero.net Git - wget/commitdiff
[svn] Fix type of _SetThreadExecutionState local var.
authorhniksic <devnull@localhost>
Sun, 5 Oct 2003 21:12:36 +0000 (14:12 -0700)
committerhniksic <devnull@localhost>
Sun, 5 Oct 2003 21:12:36 +0000 (14:12 -0700)
By Gisle Vanem.

src/ChangeLog
src/mswindows.c

index ddb203975dc061a58f4a248e142a272fbc913377..641b792d6ff79ddcf6ef2ef5e23583d921396075 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-05  Gisle Vanem  <giva@bgnett.no>
+
+       * mswindows.c (set_sleep_mode): Fix type of
+       _SetThreadExecutionState.
+
 2003-10-05  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * utils.c (file_size): Return -1 if fopen() returns NULL.  Prior
index 6d5e4717383802f494a470369ebd2f14462626d4..09a3383a6c323d77336bbe16816d7677a3fd6cf6 100644 (file)
@@ -290,7 +290,8 @@ ws_startup (void)
    (The Borland utime function only works on Windows NT.)  */
 
 #ifdef HACK_BCC_UTIME_BUG
-int borland_utime(const char *path, const struct utimbuf *times)
+int
+borland_utime (const char *path, const struct utimbuf *times)
 {
   int fd;
   int res;
@@ -318,11 +319,11 @@ int borland_utime(const char *path, const struct utimbuf *times)
  * Windows does by default not consider network activity in console-programs as activity !
  * Works on Win-98/ME/2K and up.
  */
-static
-DWORD set_sleep_mode (DWORD mode)
+static DWORD
+set_sleep_mode (DWORD mode)
 {
   HMODULE mod = LoadLibrary ("kernel32.dll");
-  DWORD (*_SetThreadExecutionState) (DWORD) = NULL;
+  DWORD (WINAPI *_SetThreadExecutionState) (DWORD) = NULL;
   DWORD rc = (DWORD)-1;
 
   if (mod)
@@ -331,13 +332,13 @@ DWORD set_sleep_mode (DWORD mode)
   if (_SetThreadExecutionState)
     {
       if (mode == 0)  /* first time */
-         mode = (ES_SYSTEM_REQUIRED | ES_CONTINUOUS);
+       mode = (ES_SYSTEM_REQUIRED | ES_CONTINUOUS);
       rc = (*_SetThreadExecutionState) (mode);
     }
   if (mod)
-     FreeLibrary (mod);
+    FreeLibrary (mod);
   DEBUGP (("set_sleep_mode(): mode 0x%08lX, rc 0x%08lX\n", mode, rc));
-  return (rc);
+  return rc;
 }
 \f
 /* run_with_timeout Windows implementation. */