You should have received a copy of the GNU General Public License
along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables. You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL". If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so. If you do not wish to do
+so, delete this exception statement from your version. */
/* #### Someone please document what these functions do! */
static int windows_nt_p;
+#ifndef HAVE_SLEEP
/* Emulation of Unix sleep. */
unsigned int
{
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:
- a) Wget is only using it with milliseconds;
+ a) Wget is only using it with milliseconds [not anymore, but b)
+ still applies];
b) You can't rely on usleep's granularity anyway. If a caller
expects usleep to respect every microsecond, he's in for a
SleepEx (usec / 1000, TRUE);
return 0;
}
+#endif /* HAVE_USLEEP */
static char *
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);
if (!opt.lfilename)
{
- opt.lfilename = unique_name (DEFAULT_LOGFILE);
+ opt.lfilename = unique_name (DEFAULT_LOGFILE, 0);
changedp = 1;
}
printf (_("Continuing in background.\n"));