On Wed, 29 May 2002 05:14:14 +0200, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>Wget 1.8.2, a bugfix release of Wget, has been released, and is now >available from the GNU ftp site: > > ftp://ftp.gnu.org/pub/gnu/wget/wget-1.8.2.tar.gz This is a bit late, but here is a patch to compile it with Borland C++ 4.5 (compiler version 4.5.2). With a small change to the Makefile to select a different linker, it also compiles with Borland C++ 5.5 (compiler version 5.5.1). The Makefile to change is windows/Makefile.src.bor before running configure --borland, or alternatively change src/Makefile after running configure --borland. diff -ru wget-1.8.2/src/utils.c wget-1.8.2.new/src/utils.c --- wget-1.8.2/src/utils.c Sat May 18 04:05:22 2002 +++ wget-1.8.2.new/src/utils.c Mon May 27 19:44:40 2002 @@ -1504,8 +1504,13 @@ SYSTEMTIME st; GetSystemTime (&st); SystemTimeToFileTime (&st, &ft); +# ifdef NO_ANONYMOUS_STRUCT + wt->wintime.u.HighPart = ft.dwHighDateTime; + wt->wintime.u.LowPart = ft.dwLowDateTime; +# else wt->wintime.HighPart = ft.dwHighDateTime; wt->wintime.LowPart = ft.dwLowDateTime; +# endif #endif } @@ -1533,8 +1538,13 @@ ULARGE_INTEGER uli; GetSystemTime (&st); SystemTimeToFileTime (&st, &ft); +# ifdef NO_ANONYMOUS_STRUCT + uli.u.HighPart = ft.dwHighDateTime; + uli.u.LowPart = ft.dwLowDateTime; +# else uli.HighPart = ft.dwHighDateTime; uli.LowPart = ft.dwLowDateTime; +# endif return (long)((uli.QuadPart - wt->wintime.QuadPart) / 10000); #endif } diff -ru wget-1.8.2/windows/Makefile.src.bor wget-1.8.2.new/windows/Makefile.src.bor --- wget-1.8.2/windows/Makefile.src.bor Tue Dec 4 10:33:18 2001 +++ wget-1.8.2.new/windows/Makefile.src.bor Wed May 29 12:20:51 2002 @@ -2,17 +2,25 @@ ## Makefile for use with watcom win95/winnt executable. CC=bcc32 + +## Please choose the linker used by your compiler.... + +## Linker for Borland C++ 5.5 +#LINK=ilink32 + +## Linker for Borland C++ 4.5 LINK=tlink32 LFLAGS= -CFLAGS=-DWINDOWS -DHAVE_CONFIG_H -I. -H -H=wget.csm -w- +CFLAGS=-DWINDOWS=1 -DHAVE_CONFIG_H -I. -H -H=wget.csm -w- ## variables -OBJS=cmpt.obj connect.obj fnmatch.obj ftp.obj ftp-basic.obj \ - ftp-ls.obj ftp-opie.obj getopt.obj headers.obj host.obj html.obj \ - http.obj init.obj log.obj main.obj gnu-md5.obj netrc.obj rbuf.obj \ - alloca.obj \ - recur.obj res.obj retr.obj url.obj utils.obj version.obj mswindows.obj +OBJS=cmpt.obj safe-ctype.obj connect.obj fnmatch.obj ftp.obj ftp-basic.obj \ + ftp-ls.obj ftp-opie.obj getopt.obj hash.obj headers.obj html-parse.obj \ + html-url.obj progress.obj host.obj cookies.obj http.obj init.obj \ + log.obj main.obj gen-md5.obj gnu-md5.obj netrc.obj rbuf.obj \ + snprintf.obj recur.obj res.obj retr.obj url.obj utils.obj version.obj \ + mswindows.obj LIBDIR=$(MAKEDIR)\..\lib @@ -20,7 +28,7 @@ $(LINK) @&&| $(LFLAGS) -Tpe -ap -c + $(LIBDIR)\c0x32.obj+ -alloca.obj+ +snprintf.obj+ version.obj+ utils.obj+ url.obj+ @@ -37,9 +45,10 @@ log.obj+ init.obj+ http.obj+ -html.obj+ host.obj+ headers.obj+ +html-parse.obj+ +html-url.obj+ getopt.obj+ ftp-opie.obj+ ftp-ls.obj+ @@ -47,7 +56,10 @@ ftp.obj+ fnmatch.obj+ connect.obj+ -cmpt.obj +cmpt.obj+ +hash.obj+ +cookies.obj+ +safe-ctype.obj $<,$* $(LIBDIR)\import32.lib+ $(LIBDIR)\cw32.lib diff -ru wget-1.8.2/windows/config.h.bor wget-1.8.2.new/windows/config.h.bor --- wget-1.8.2/windows/config.h.bor Sat May 18 04:05:28 2002 +++ wget-1.8.2.new/windows/config.h.bor Wed May 29 12:22:46 2002 @@ -1,5 +1,6 @@ /* Configuration header file. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,36 +30,23 @@ #ifndef CONFIG_H #define CONFIG_H -/* Define if you have the <alloca.h> header file. */ -#undef HAVE_ALLOCA_H +#define ftruncate chsize -/* AIX requires this to be the first thing in the file. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -#endif +/* mswindows.h defines vsnprintf as _vsnprintf and snprintf as _snprintf + so work around that here. This is a temporary hack. The defines + in mswindows.h should be moved into config.h.ms. */ +#define _vsnprintf vsnprintf +#define _snprintf snprintf -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* #undef _ALL_SOURCE */ -#endif +/* Define if you have the <alloca.h> header file. */ +#undef HAVE_ALLOCA_H /* Define to empty if the keyword does not work. */ /* #undef const */ +/* Define to empty or __inline__ or __inline. */ +#define inline + /* Define to `unsigned' if <sys/types.h> doesn't define. */ /* #undef size_t */ @@ -72,8 +60,19 @@ significant byte first). */ #undef WORDS_BIGENDIAN +/* Define to the length of long. */ +#define SIZEOF_LONG 4 + +/* Define to the length of long long. */ +#undef SIZEOF_LONG_LONG + +#undef HAVE_LONG_LONG +#if SIZEOF_LONG_LONG != 0 +# define HAVE_LONG_LONG +#endif + /* Define this if you want the NLS support. */ -#undef ENABLE_NLS +#undef HAVE_NLS /* Define if you want the FTP support for Opie compiled in. */ #define USE_OPIE 1 @@ -93,9 +92,6 @@ /* Define if you have struct utimbuf. */ #define HAVE_STRUCT_UTIMBUF 1 -/* Define if you have the gethostbyname function. */ -/* #undef HAVE_GETHOSTBYNAME */ - /* Define if you have the uname function. */ #undef HAVE_UNAME @@ -117,6 +113,12 @@ /* Define if you have the strerror function. */ #define HAVE_STRERROR 1 +/* Define if you have the snprintf function. */ +#undef HAVE_SNPRINTF + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + /* Define if you have the strstr function. */ #define HAVE_STRSTR 1 @@ -126,7 +128,13 @@ /* Define if you have the strncasecmp function. */ #define HAVE_STRNCASECMP 1 -/* Define if you have the strptime function. */ +/* Define if you have the strpbrk function. */ +#define HAVE_STRPBRK 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the strptime function. */ #undef HAVE_STRPTIME /* Define if you have the mktime function. */ @@ -135,12 +143,45 @@ /* Define if you have the symlink function. */ #undef HAVE_SYMLINK +/* Define if you have the access function. */ +#undef HAVE_ACCESS + +/* Define if you have the isatty function. */ +#define HAVE_ISATTY 1 + /* Define if you have the signal function. */ #undef HAVE_SIGNAL +/* Define if you have the gettext function. */ +#undef HAVE_GETTEXT + +/* Define if you have the usleep function. */ +#undef HAVE_USLEEP + +/* Define if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + /* Define if you have the <stdarg.h> header file. */ #define HAVE_STDARG_H 1 +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the <sys/utime.h> header file. */ +#undef HAVE_SYS_UTIME_H + +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the <sys/select.h> header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H + /* Define if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 @@ -164,7 +205,13 @@ #undef HAVE_PWD_H /* Define if you have the <signal.h> header file. */ -#undef HAVE_SIGNAL_H +#define HAVE_SIGNAL_H 1 + +/* Define if you have the <libintl.h> header file. */ +#undef HAVE_LIBINTL_H + +/* Define if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 /* Define to be the name of the operating system. */ #define OS_TYPE "Windows" @@ -177,17 +224,20 @@ /* Define to 1 if ANSI function prototypes are usable. */ #define PROTOTYPES 1 +/* Define if all libs needed for ssl support are existing */ +#undef HAVE_SSL + /* Define if we're compiling in support for MD5. */ #define HAVE_MD5 1 /* Define if we're using Solaris libmd5. */ #undef HAVE_SOLARIS_MD5 +/* Define if we're using OpenSSL md5. */ +#undef HAVE_OPENSSL_MD5 + /* Define if we're using builtin (GNU) md5.c. */ #define HAVE_BUILTIN_MD5 1 - -/* Define if you have the isatty function. */ -#undef HAVE_ISATTY #endif /* CONFIG_H */