mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Windows fixes by Herold Heiko.
This commit is contained in:
parent
bb8e524316
commit
9c1c7f27cd
@ -1,3 +1,11 @@
|
|||||||
|
2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
|
||||||
|
|
||||||
|
* config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
|
||||||
|
MS VC; somebody with Borland compiler please check and provide
|
||||||
|
patch if possible;
|
||||||
|
|
||||||
|
* cmpt.c: provided a usleep emulation.
|
||||||
|
|
||||||
2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
|
2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* host.c (address_list_new): Initialize al->faulty.
|
* host.c (address_list_new): Initialize al->faulty.
|
||||||
|
@ -1209,8 +1209,10 @@ strptime (buf, format, tm)
|
|||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_USLEEP
|
#ifndef HAVE_USLEEP
|
||||||
/* A simple usleep implementation based on select(). This will
|
#ifndef WINDOWS
|
||||||
probably not work on Windows. */
|
|
||||||
|
/* A simple usleep implementation based on select(). For Unix and
|
||||||
|
Unix-like systems. */
|
||||||
|
|
||||||
int
|
int
|
||||||
usleep (unsigned long usec)
|
usleep (unsigned long usec)
|
||||||
@ -1221,4 +1223,6 @@ usleep (unsigned long usec)
|
|||||||
select (0, NULL, NULL, NULL, &tm);
|
select (0, NULL, NULL, NULL, &tm);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* not WINDOWS */
|
||||||
#endif /* not HAVE_USLEEP */
|
#endif /* not HAVE_USLEEP */
|
||||||
|
@ -42,12 +42,29 @@ static int windows_nt_p;
|
|||||||
|
|
||||||
|
|
||||||
/* Emulation of Unix sleep. */
|
/* Emulation of Unix sleep. */
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
sleep (unsigned seconds)
|
sleep (unsigned seconds)
|
||||||
{
|
{
|
||||||
return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds;
|
return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Emulation of Unix usleep(). This has a granularity of
|
||||||
|
milliseconds, but that's ok because:
|
||||||
|
|
||||||
|
a) Wget is only using it with milliseconds;
|
||||||
|
|
||||||
|
b) You can't rely on usleep's granularity anyway. If a caller
|
||||||
|
expects usleep to respect every microsecond, he's in for a
|
||||||
|
surprise. */
|
||||||
|
|
||||||
|
int
|
||||||
|
usleep (unsigned long usec)
|
||||||
|
{
|
||||||
|
SleepEx (usec / 1000, TRUE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
# define stat _stat
|
# define stat _stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ISATTY
|
||||||
|
/* Microsoft VC supports _isatty; Borland ? */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# define isatty _isatty
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define REALCLOSE(x) closesocket (x)
|
#define REALCLOSE(x) closesocket (x)
|
||||||
|
|
||||||
/* read & write don't work with sockets on Windows 95. */
|
/* read & write don't work with sockets on Windows 95. */
|
||||||
|
@ -54,13 +54,13 @@ RM = del
|
|||||||
|
|
||||||
SRC = cmpt.c safe-ctype.c connect.c host.c http.c netrc.c ftp-basic.c ftp.c \
|
SRC = cmpt.c safe-ctype.c connect.c host.c http.c netrc.c ftp-basic.c ftp.c \
|
||||||
ftp-ls.c ftp-opie.c getopt.c hash.c headers.c html-parse.c html-url.c \
|
ftp-ls.c ftp-opie.c getopt.c hash.c headers.c html-parse.c html-url.c \
|
||||||
retr.c recur.c res.c url.c cookies.c init.c utils.c main.c version.c \
|
progress.c retr.c recur.c res.c url.c cookies.c init.c utils.c main.c \
|
||||||
mswindows.c fnmatch.c gnu-md5.c rbuf.c log.c $(SSLSRC)
|
version.c mswindows.c fnmatch.c gnu-md5.c rbuf.c log.c $(SSLSRC)
|
||||||
|
|
||||||
OBJ = cmpt$o safe-ctype$o connect$o host$o http$o netrc$o ftp-basic$o ftp$o \
|
OBJ = cmpt$o safe-ctype$o connect$o host$o http$o netrc$o ftp-basic$o ftp$o \
|
||||||
ftp-ls$o ftp-opie$o getopt$o hash$o headers$o html-parse$o html-url$o \
|
ftp-ls$o ftp-opie$o getopt$o hash$o headers$o html-parse$o html-url$o \
|
||||||
retr$o recur$o res$o url$o cookies$o init$o utils$o main$o version$o \
|
progress$o retr$o recur$o res$o url$o cookies$o init$o utils$o main$o \
|
||||||
mswindows$o fnmatch$o gnu-md5$o rbuf$o log$o $(SSLOBJ)
|
version$o mswindows$o fnmatch$o gnu-md5$o rbuf$o log$o $(SSLOBJ)
|
||||||
|
|
||||||
.SUFFIXES: .c .obj
|
.SUFFIXES: .c .obj
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ retr.obj+
|
|||||||
res.obj+
|
res.obj+
|
||||||
recur.obj+
|
recur.obj+
|
||||||
rbuf.obj+
|
rbuf.obj+
|
||||||
|
progress.obj+
|
||||||
netrc.obj+
|
netrc.obj+
|
||||||
mswindows.obj+
|
mswindows.obj+
|
||||||
gnu-md5.obj+
|
gnu-md5.obj+
|
||||||
|
@ -176,4 +176,8 @@ char *alloca ();
|
|||||||
/* Define if we're using builtin (GNU) md5.c. */
|
/* Define if we're using builtin (GNU) md5.c. */
|
||||||
#define HAVE_BUILTIN_MD5 1
|
#define HAVE_BUILTIN_MD5 1
|
||||||
|
|
||||||
|
/* Define if you have the isatty function. */
|
||||||
|
#undef HAVE_ISATTY
|
||||||
|
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
@ -186,5 +186,8 @@ char *alloca ();
|
|||||||
#define inline __inline
|
#define inline __inline
|
||||||
#define ftruncate chsize
|
#define ftruncate chsize
|
||||||
|
|
||||||
|
/* Define if you have the isatty function. */
|
||||||
|
#define HAVE_ISATTY 1
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user