On 12 Mar 2002 at 3:18, sr111 wrote:
I have to modify some files in order to build
win32 port of wget using the free Borland C++Builder
compiler. Please refer to the attachment file for the
details.
I've modified Chin-yuan Kuo's patch for the current CVS. It builds
fine with the free Borland C++Builder compiler.
I also tried to build it with the Borland C++ Release 5.0 compiler
but ran into problems compiling src/utils.c on the following lines
1499-1500:
wt-wintime.HighPart = ft.dwHighDateTime;
wt-wintime.LowPart = ft.dwLowDateTime;
(Those errors were nothing to do with Chin-yuan Kuo's patch.)
Chin-yuan's patch distances the support for Borland's compilers
further away from the Release 5.0 (and earlier) compilers, but
since the C++Builder compiler can be downloaded for free I don't
think support for the older compilers is that much of an issue
(apart from making a little more work for the MS-DOS porters).
If there are no objections from the Win32 maintainers, I'll apply
the updated patch to CVS tomorrow.
Chin-yuan did not submit any ChangeLog entries, so here is my
attempt at some:
main ChangeLog entry:
2002-03-18 Chin-yuan Kuo [EMAIL PROTECTED]
* configure.bat.in: Do not check %BORPATH% as C++Builder compiler
does not use it.
* windows/Makefile.src.bor:
* windows/config.h.bor:
Migrate to free C++Builder compiler.
And here is the updated patch:
Index: configure.bat.in
===
RCS file: /pack/anoncvs/wget/configure.bat.in,v
retrieving revision 1.1
diff -u -r1.1 configure.bat.in
--- configure.bat.in2002/03/13 19:47:26 1.1
+++ configure.bat.in2002/03/18 20:31:51
@@ -20,8 +20,7 @@
if .%1 == .--borland goto :borland
if .%1 == .--msvc goto :msvc
if .%1 == .--watcom goto :watcom
-if not .%BORPATH% == . goto :borland
-if not .%1 == . goto :usage
+goto :usage
:msvc
copy windows\config.h.ms src\config.h nul
@@ -58,5 +57,5 @@
goto :end
:usage
-echo Usage: Configure [--borland | --msvc | --watcom]
+echo Usage: configure [--borland | --msvc | --watcom]
:end
Index: windows/Makefile.src.bor
===
RCS file: /pack/anoncvs/wget/windows/Makefile.src.bor,v
retrieving revision 1.4
diff -u -r1.4 Makefile.src.bor
--- windows/Makefile.src.bor2001/12/04 10:33:18 1.4
+++ windows/Makefile.src.bor2002/03/18 20:31:52
@@ -2,16 +2,16 @@
## Makefile for use with watcom win95/winnt executable.
CC=bcc32
-LINK=tlink32
+LINK=ilink32
LFLAGS=
-CFLAGS=-DWINDOWS -DHAVE_CONFIG_H -I. -H -H=wget.csm -w-
+CFLAGS=-DWINDOWS -DHAVE_CONFIG_H -I. -H -H=wget.csm -w- -O2
## 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 \
+ ftp-ls.obj ftp-opie.obj getopt.obj headers.obj host.obj html-parse.obj html-
url.obj \
http.obj init.obj log.obj main.obj gnu-md5.obj netrc.obj rbuf.obj \
- alloca.obj \
+ safe-ctype.obj hash.obj progress.obj gen-md5.obj cookies.obj \
recur.obj res.obj retr.obj url.obj utils.obj version.obj mswindows.obj
LIBDIR=$(MAKEDIR)\..\lib
@@ -20,7 +20,9 @@
$(LINK) @|
$(LFLAGS) -Tpe -ap -c +
$(LIBDIR)\c0x32.obj+
-alloca.obj+
+cookies.obj+
+hash.obj+
+safe-ctype.obj+
version.obj+
utils.obj+
url.obj+
@@ -37,7 +39,8 @@
log.obj+
init.obj+
http.obj+
-html.obj+
+html-parse.obj+
+html-url.obj+
host.obj+
headers.obj+
getopt.obj+
Index: windows/config.h.bor
===
RCS file: /pack/anoncvs/wget/windows/config.h.bor,v
retrieving revision 1.3
diff -u -r1.3 config.h.bor
--- windows/config.h.bor2001/11/29 14:15:10 1.3
+++ windows/config.h.bor2002/03/18 20:31:52
@@ -19,6 +19,10 @@
#ifndef CONFIG_H
#define CONFIG_H
+#define HAVE_MEMMOVE
+#define ftruncate chsize
+#define inline __inline
+
/* Define if you have the alloca.h header file. */
#undef HAVE_ALLOCA_H
@@ -33,7 +37,7 @@
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+#include malloc.h
# endif
# endif
# endif
@@ -177,7 +181,7 @@
#define HAVE_BUILTIN_MD5 1
/* Define if you have the isatty function. */
-#undef HAVE_ISATTY
+#define HAVE_ISATTY
#endif /* CONFIG_H */