mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Fix type of _SetThreadExecutionState local var.
By Gisle Vanem.
This commit is contained in:
parent
30c3b5bc8a
commit
abf7afb9d4
@ -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>
|
2003-10-05 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* utils.c (file_size): Return -1 if fopen() returns NULL. Prior
|
* utils.c (file_size): Return -1 if fopen() returns NULL. Prior
|
||||||
|
@ -290,7 +290,8 @@ ws_startup (void)
|
|||||||
(The Borland utime function only works on Windows NT.) */
|
(The Borland utime function only works on Windows NT.) */
|
||||||
|
|
||||||
#ifdef HACK_BCC_UTIME_BUG
|
#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 fd;
|
||||||
int res;
|
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 !
|
* Windows does by default not consider network activity in console-programs as activity !
|
||||||
* Works on Win-98/ME/2K and up.
|
* Works on Win-98/ME/2K and up.
|
||||||
*/
|
*/
|
||||||
static
|
static DWORD
|
||||||
DWORD set_sleep_mode (DWORD mode)
|
set_sleep_mode (DWORD mode)
|
||||||
{
|
{
|
||||||
HMODULE mod = LoadLibrary ("kernel32.dll");
|
HMODULE mod = LoadLibrary ("kernel32.dll");
|
||||||
DWORD (*_SetThreadExecutionState) (DWORD) = NULL;
|
DWORD (WINAPI *_SetThreadExecutionState) (DWORD) = NULL;
|
||||||
DWORD rc = (DWORD)-1;
|
DWORD rc = (DWORD)-1;
|
||||||
|
|
||||||
if (mod)
|
if (mod)
|
||||||
@ -337,7 +338,7 @@ DWORD set_sleep_mode (DWORD mode)
|
|||||||
if (mod)
|
if (mod)
|
||||||
FreeLibrary (mod);
|
FreeLibrary (mod);
|
||||||
DEBUGP (("set_sleep_mode(): mode 0x%08lX, rc 0x%08lX\n", mode, rc));
|
DEBUGP (("set_sleep_mode(): mode 0x%08lX, rc 0x%08lX\n", mode, rc));
|
||||||
return (rc);
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* run_with_timeout Windows implementation. */
|
/* run_with_timeout Windows implementation. */
|
||||||
|
Loading…
Reference in New Issue
Block a user