X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmswindows.c;h=0b5242f15390760a8a777c4a6433c27fb37f2e4d;hp=6cfc0555439e430822b50d7b7d9907922ce41a66;hb=700df4394ec8739943966d8860913cc9363741cf;hpb=d0c434771038a294962bcf704d9cee88e35be133 diff --git a/src/mswindows.c b/src/mswindows.c index 6cfc0555..0b5242f1 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -63,6 +63,7 @@ void log_request_redirect_output PARAMS ((const char *)); static int windows_nt_p; +#ifndef HAVE_SLEEP /* Emulation of Unix sleep. */ unsigned int @@ -70,7 +71,9 @@ sleep (unsigned seconds) { return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds; } +#endif +#ifndef HAVE_USLEEP /* Emulation of Unix usleep(). This has a granularity of milliseconds, but that's ok because: @@ -87,6 +90,7 @@ usleep (unsigned long usec) SleepEx (usec / 1000, TRUE); return 0; } +#endif /* HAVE_USLEEP */ static char * read_registry (HKEY hkey, char *subkey, char *valuename, char *buf, int *len) @@ -94,9 +98,9 @@ read_registry (HKEY hkey, char *subkey, char *valuename, char *buf, int *len) HKEY result; DWORD size = *len; DWORD type = REG_SZ; - if (RegOpenKeyEx (hkey, subkey, NULL, KEY_READ, &result) != ERROR_SUCCESS) + if (RegOpenKeyEx (hkey, subkey, 0, KEY_READ, &result) != ERROR_SUCCESS) return NULL; - if (RegQueryValueEx (result, valuename, NULL, &type, buf, &size) != ERROR_SUCCESS) + if (RegQueryValueEx (result, valuename, NULL, &type, (LPBYTE)buf, &size) != ERROR_SUCCESS) buf = NULL; *len = size; RegCloseKey (result);