[svn] Remove support for Watcom's compiler.

This commit is contained in:
hniksic 2005-06-23 07:11:48 -07:00
parent 6af41f62f0
commit 4b3e1632db
7 changed files with 38 additions and 143 deletions

View File

@ -29,7 +29,6 @@ rem so, delete this exception statement from your version.
if .%1 == .--borland goto :borland
if .%1 == .--mingw goto :mingw
if .%1 == .--msvc goto :msvc
if .%1 == .--watcom goto :watcom
goto :usage
:msvc
@ -61,20 +60,6 @@ copy windows\Makefile.doc doc\Makefile > nul
echo Type mingw32-make to start compiling.
goto :end
:watcom
copy windows\config.h.ms src\config.h > nul
copy windows\Makefile.watcom src\Makefile > nul
@echo Checking environment vars
@set INCLUDE | find /I "WATCOM"
@set LIB | find /I "WATCOM"
@echo If WATCOM directories were not displayed, you need to
@echo SET INCLUDE and SET LIB to the Watcom directories
@echo.
cd src
@echo Type WMAKE to build
goto :end
:usage
echo "Usage: configure [--borland | --mingw | --msvc | --watcom]"
echo "Usage: configure [--borland | --mingw | --msvc]"
:end

View File

@ -1,3 +1,7 @@
2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
* sysdep.h: Remove code that deals with Watcom.
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* all: Use bool instead of int and false/true instead of 0/non-0

View File

@ -42,8 +42,8 @@ so, delete this exception statement from your version. */
#include <windows.h>
/* Use the correct winsock header; <ws2tcpip.h> includes <winsock2.h> only
on Watcom/MingW. We cannot use <winsock.h> for IPv6. Using
/* Use the correct winsock header; <ws2tcpip.h> includes <winsock2.h>
only on MingW. We cannot use <winsock.h> for IPv6. Using
getaddrinfo() requires <ws2tcpip.h>. */
#if defined(ENABLE_IPV6) || defined(HAVE_GETADDRINFO)
# include <winsock2.h>
@ -90,19 +90,19 @@ typedef __int64 wgint;
#define WGINT_MAX 9223372036854775807I64
#endif
/* str_to_wgint is a function with the semantics of strtol, but which
works on wgint. Since wgint is unconditionally 64-bit on Windows,
we #define it to str_to_int64, which either calls _strtoi64 or
implements the conversion manually. */
#define str_to_wgint str_to_int64
__int64 str_to_int64 (const char *, char **, int);
/* No lstat on Windows. */
#define lstat stat
/* Transparently support large files, in spirit similar to the POSIX
LFS API. */
#define stat(fname, buf) _stati64 (fname, buf)
#ifndef __BORLANDC__
# define fstat(fd, buf) _fstati64 (fd, buf)
#endif
/* On Windows the 64-bit stat requires a different version of struct
stat. (On Unix too, but it happens transparently when stat is
remapped to stat64.) */
#if defined(_MSC_VER) || defined(__MINGW32__)
# define struct_stat struct _stati64
@ -112,6 +112,14 @@ __int64 str_to_int64 (const char *, char **, int);
# define struct_stat struct stat
#endif
/* Transparently support statting large files, like POSIX's LFS API
does. */
#define stat(fname, buf) _stati64 (fname, buf)
#ifndef __BORLANDC__
# define fstat(fd, buf) _fstati64 (fd, buf)
#endif
#define PATH_SEPARATOR '\\'
#ifdef HAVE_ISATTY

View File

@ -43,25 +43,14 @@ so, delete this exception statement from your version. */
#endif
#ifdef WINDOWS
/* Windows doesn't have some functions. Include mswindows.h so we get
their declarations, as well as some additional declarations and
macros. This must come first, so it can set things up. */
#include <mswindows.h>
#endif /* WINDOWS */
/* Watcom-specific stuff. In practice this is probably specific to
Windows, although Watcom exists under other OS's too. For that
reason, we keep this here. */
#ifdef __WATCOMC__
/* Watcom has its own alloca() defined in malloc.h malloc.h needs to
be included in the sources to prevent 'undefined external' errors
at the link phase. */
# include <malloc.h>
/* io.h defines unlink() and chmod(). We put this here because it's
way too obscure to require all the .c files to observe. */
# include <io.h>
#endif /* __WATCOMC__ */
/* Windows doesn't have some functions normally found on Unix-like
systems, such as strcasecmp, strptime, strpbrk, etc. Include
mswindows.h so we get the declarations for their replacements in
mswindows.c, as well as to pick up Windows-specific includes and
constants. To be able to test for such features, the file must be
included as early as possible. */
# include <mswindows.h>
#endif
/* Provide support for C99-type boolean type "bool". This blurb comes
straight from the Autoconf 2.59 manual. */
@ -126,7 +115,7 @@ typedef long LARGE_INT;
/* Long long is large enough: use it. */
typedef long long LARGE_INT;
# define LARGE_INT_FMT "%lld"
#elif _MSC_VER
#elif WINDOWS
/* Use __int64 under Windows. */
typedef __int64 LARGE_INT;
# define LARGE_INT_FMT "%I64"

View File

@ -1,3 +1,7 @@
2005-06-23 Hrvoje Niksic <hniksic@xemacs.org>
* Makefile.watcom: Removed.
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* Makefile.src*: Add the config.h dependency.

View File

@ -1,95 +0,0 @@
## Compiler, linker, and lib stuff
## Makefile for use with watcom win95/winnt executable.
#
# Copy this file to the ..\src directory (maybe rename to Makefile).
#
CC=wcc386 /zq
LINK=wlink
#
# Note: this will wipe anything in the env.var PATH !
#
.BEFORE
@SET INCLUDE=$(%WATCOM)\h;$(%WATCOM)\h\nt;.
LFLAGS=op q sys nt op st=32767 op map op de 'GNU Wget' de dw op symf
#
# op q : quiet !
# sys nt : producing an NT app
# op st(ack)=32768 : stack size
# op vers(ion)=1.7 : "Image version" in the EXE header ( major.minor )
# op map : produce a map file
# op de : textual description, placed in the executable
# de dw : debug info on Dwarf format
# op symf : place debug info in a separate wget.sym
#
CFLAGS=/zp4 /w4 /fpd /5s /fp5 /bm /mf /bt=nt /I. /DWINDOWS /DHAVE_CONFIG_H
# ^^^^^^^^ wget will run on NT. We can safely assume a Pentium :-)
# /zp4= pack structure members with this alignment
# /d1 = line number debug info
# /w4 = warning level
# /fpd= Pentium floatingpoint bug workaround
# /5s = Pentium stack-based calling
# /fp5= Pentium floating point
# /bm = build multi-threaded
# /mf = flat memory model
# /bt = "build target" (nt)
#
# Choose one of the following three:
# /od /d2 for no optimization, full debug info
# /os /d2 to optimize for size, full debug info (or /d1 for line number debug info)
# /othexan for "heavy-duty" optimizations, no debug info
#
#CFLAGS+= /od /d2
CFLAGS+= /os /d2
#CFLAGS+= /othexan
# ^^-- mind the gap !!
#CFLAGS+= /DDEBUG_MALLOC
# ^^-- mind the gap !!
OBJS = cmpt.obj convert.obj connect.obj cookies.obj ftp.obj ftp-basic.obj &
ftp-ls.obj ftp-opie.obj getopt.obj hash.obj host.obj html-parse.obj html-url.obj &
http.obj init.obj log.obj main.obj gen-md5.obj gnu-md5.obj netrc.obj progress.obj &
recur.obj res.obj retr.obj safe-ctype.obj url.obj utils.obj version.obj &
mswindows.obj xmalloc.obj
LIBFILES =
#
# Add extra libs like this :
#LIBFILES = LIBF lz32.lib,gdi32.lib
BINNAME=wget.exe
all : config.h $(BINNAME) .SYMBOLIC
#
# We use config.h.ms
#
config.h : ..\windows\config.h.ms
copy $[@ $^@
#
# Note: this will pass all the OBJ files to wlink,
# resulting in a very long command line (410 chars, last I counted)
# This might fail on Win9x (works with NT's cmd.exe)
#
$(BINNAME): $(OBJS) Makefile
$(LINK) $(LFLAGS) NAME $(BINNAME) FILE { $(OBJS) } $(LIBPATH) $(LIBFILES)
#
# Explicit dependencies not needed because Watcom C stores
# dependency information in the object file. Wmake can read this information
# if prompted by .AUTODEPEND
#
.c.obj: .AUTODEPEND
$(CC) $(CFLAGS) $[@
.c.i: .AUTODEPEND
$(CC) $(CFLAGS) -fo=$@ /Pc $[@

View File

@ -7,8 +7,8 @@ compiler you intend to use to build Wget and follow the (brief)
instructions printed on the screen. The instructions bellow are for
building Wget with Microsoft Visual C++ (MSVC); you may need to make
appropriate substitutions for your compiler and build environment;
currently wget can be built at least with Visual Studio/.Net, free
Borland or Watcom compilers, and the free cygnus and mingw environments.
currently wget can be built at least with Visual Studio/.Net, the free
Borland compiler, and the free cygnus and mingw environments.
To build Wget with MSVC run configure.bat (in the main Wget directory)
with the argument --msvc, and then run nmake. At a certain point in time
@ -54,7 +54,7 @@ Windows contributors:
port;
* Tim Charron <tcharron@interlog.com> -- additional cleanup and
contribution of the Watcom makefile;
contribution of the (now retired) Watcom makefile;
* John Burden <john@futuresguide.com> -- cleanup of the VC++ makefile
to get a clean build with VC++ 5.0 on Windows 95;