mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Fixes to support out of the box compilation on various Windows compilers.
By Gisle Vanem.
This commit is contained in:
parent
d0c4347710
commit
700df4394e
@ -1,3 +1,11 @@
|
|||||||
|
2003-09-26 Gisle Vanem <giva@bgnett.no>
|
||||||
|
|
||||||
|
* windows/config.h.ms: Don't declare alloca under compilers that
|
||||||
|
support it.
|
||||||
|
|
||||||
|
* windows/config.h.ms: Define HAVE_SNPRINTF, HAVE_VSNPRINTF, and
|
||||||
|
HAVE_MEMMOVE.
|
||||||
|
|
||||||
2003-09-25 Herold Heiko <Heiko.Herold@previnet.it>
|
2003-09-25 Herold Heiko <Heiko.Herold@previnet.it>
|
||||||
|
|
||||||
* windows/Makefile.src: Updated OBJ list.
|
* windows/Makefile.src: Updated OBJ list.
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2003-09-26 Gisle Vanem <giva@bgnett.no>
|
||||||
|
|
||||||
|
* mswindows.c (read_registry): Fix invocation of registry
|
||||||
|
functions.
|
||||||
|
|
||||||
|
* mswindows.c (read_registry): Condition definitions of sleep and
|
||||||
|
usleep with not HAVE_SLEEP and HAVE_USLEEP respectively. Define
|
||||||
|
HAVE_SLEEP and HAVE_USLEEP under __DMC__.
|
||||||
|
|
||||||
2003-09-24 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-09-24 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* url.c (url_escape_1): Revert unintentional change to lowercase
|
* url.c (url_escape_1): Revert unintentional change to lowercase
|
||||||
|
@ -63,6 +63,7 @@ void log_request_redirect_output PARAMS ((const char *));
|
|||||||
static int windows_nt_p;
|
static int windows_nt_p;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef HAVE_SLEEP
|
||||||
/* Emulation of Unix sleep. */
|
/* Emulation of Unix sleep. */
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
@ -70,7 +71,9 @@ sleep (unsigned seconds)
|
|||||||
{
|
{
|
||||||
return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds;
|
return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_USLEEP
|
||||||
/* Emulation of Unix usleep(). This has a granularity of
|
/* Emulation of Unix usleep(). This has a granularity of
|
||||||
milliseconds, but that's ok because:
|
milliseconds, but that's ok because:
|
||||||
|
|
||||||
@ -87,6 +90,7 @@ usleep (unsigned long usec)
|
|||||||
SleepEx (usec / 1000, TRUE);
|
SleepEx (usec / 1000, TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_USLEEP */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
read_registry (HKEY hkey, char *subkey, char *valuename, char *buf, int *len)
|
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;
|
HKEY result;
|
||||||
DWORD size = *len;
|
DWORD size = *len;
|
||||||
DWORD type = REG_SZ;
|
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;
|
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;
|
buf = NULL;
|
||||||
*len = size;
|
*len = size;
|
||||||
RegCloseKey (result);
|
RegCloseKey (result);
|
||||||
|
@ -125,14 +125,24 @@ so, delete this exception statement from your version. */
|
|||||||
#define ESTALE WSAESTALE
|
#define ESTALE WSAESTALE
|
||||||
#define EREMOTE WSAEREMOTE
|
#define EREMOTE WSAEREMOTE
|
||||||
|
|
||||||
|
#ifdef __DMC__
|
||||||
|
# define HAVE_SLEEP 1
|
||||||
|
# define HAVE_USLEEP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Public functions. */
|
/* Public functions. */
|
||||||
|
|
||||||
|
#ifndef HAVE_SLEEP
|
||||||
unsigned int sleep (unsigned);
|
unsigned int sleep (unsigned);
|
||||||
|
#endif
|
||||||
|
#ifndef HAVE_USLEEP
|
||||||
|
int usleep (unsigned long);
|
||||||
|
#endif
|
||||||
|
|
||||||
void ws_startup (void);
|
void ws_startup (void);
|
||||||
void ws_changetitle (char*, int);
|
void ws_changetitle (char*, int);
|
||||||
char *ws_mypath (void);
|
char *ws_mypath (void);
|
||||||
void ws_help (const char *);
|
void ws_help (const char *);
|
||||||
void windows_main_junk (int *, char **, char **);
|
void windows_main_junk (int *, char **, char **);
|
||||||
int usleep (unsigned long);
|
|
||||||
|
|
||||||
#endif /* MSWINDOWS_H */
|
#endif /* MSWINDOWS_H */
|
||||||
|
@ -32,8 +32,10 @@
|
|||||||
/* Define if you have the <alloca.h> header file. */
|
/* Define if you have the <alloca.h> header file. */
|
||||||
#undef HAVE_ALLOCA_H
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
|
#if !defined(__GNUC__) && !defined(__DMC__) && !defined(__WATCOMC__)
|
||||||
/* Microsoft and Watcom libraries have an alloca function. */
|
/* Microsoft and Watcom libraries have an alloca function. */
|
||||||
char *alloca ();
|
char *alloca ();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to empty if the keyword does not work. */
|
||||||
/* #undef const */
|
/* #undef const */
|
||||||
@ -97,10 +99,10 @@ char *alloca ();
|
|||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
/* Define if you have the snprintf function. */
|
/* Define if you have the snprintf function. */
|
||||||
#undef HAVE_SNPRINTF
|
#define HAVE_SNPRINTF
|
||||||
|
|
||||||
/* Define if you have the vsnprintf function. */
|
/* Define if you have the vsnprintf function. */
|
||||||
#undef HAVE_VSNPRINTF
|
#define HAVE_VSNPRINTF
|
||||||
|
|
||||||
/* Define if you have the strstr function. */
|
/* Define if you have the strstr function. */
|
||||||
#define HAVE_STRSTR 1
|
#define HAVE_STRSTR 1
|
||||||
@ -133,8 +135,14 @@ char *alloca ();
|
|||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
/* #define HAVE_UNISTD_H 1 */
|
#if !defined(_MSC_VER)
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* None except Digital Mars have usleep function */
|
||||||
|
#if defined(__DMC__)
|
||||||
|
#define HAVE_USLEEP
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <utime.h> header file. */
|
/* Define if you have the <utime.h> header file. */
|
||||||
#undef HAVE_UTIME_H
|
#undef HAVE_UTIME_H
|
||||||
@ -149,7 +157,7 @@ char *alloca ();
|
|||||||
#undef HAVE_PWD_H
|
#undef HAVE_PWD_H
|
||||||
|
|
||||||
/* Define if you have the <signal.h> header file. */
|
/* Define if you have the <signal.h> header file. */
|
||||||
#undef HAVE_SIGNAL_H
|
#define HAVE_SIGNAL_H
|
||||||
|
|
||||||
/* Define to be the name of the operating system. */
|
/* Define to be the name of the operating system. */
|
||||||
#define OS_TYPE "Windows"
|
#define OS_TYPE "Windows"
|
||||||
@ -178,5 +186,8 @@ char *alloca ();
|
|||||||
/* Define if you have the isatty function. */
|
/* Define if you have the isatty function. */
|
||||||
#define HAVE_ISATTY 1
|
#define HAVE_ISATTY 1
|
||||||
|
|
||||||
|
/* Define if you have the memmove function */
|
||||||
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user