From: hniksic Date: Thu, 23 Jun 2005 14:11:48 +0000 (-0700) Subject: [svn] Remove support for Watcom's compiler. X-Git-Tag: v1.13~943 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=4b3e1632dbe3ba8f17a24c422f9faeeba8657aa5 [svn] Remove support for Watcom's compiler. --- diff --git a/configure.bat.in b/configure.bat.in index c8b45815..4b59f40f 100644 --- a/configure.bat.in +++ b/configure.bat.in @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index d6641479..5b0a1b23 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-23 Hrvoje Niksic + + * sysdep.h: Remove code that deals with Watcom. + 2005-06-22 Hrvoje Niksic * all: Use bool instead of int and false/true instead of 0/non-0 diff --git a/src/mswindows.h b/src/mswindows.h index 6750934b..e273c680 100644 --- a/src/mswindows.h +++ b/src/mswindows.h @@ -42,8 +42,8 @@ so, delete this exception statement from your version. */ #include -/* Use the correct winsock header; includes only - on Watcom/MingW. We cannot use for IPv6. Using +/* Use the correct winsock header; includes + only on MingW. We cannot use for IPv6. Using getaddrinfo() requires . */ #if defined(ENABLE_IPV6) || defined(HAVE_GETADDRINFO) # include @@ -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 diff --git a/src/sysdep.h b/src/sysdep.h index a3bebe97..f3275e9f 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -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 -#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 -/* 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 -#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 +#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" diff --git a/windows/ChangeLog b/windows/ChangeLog index 922fd2e7..86441af9 100644 --- a/windows/ChangeLog +++ b/windows/ChangeLog @@ -1,3 +1,7 @@ +2005-06-23 Hrvoje Niksic + + * Makefile.watcom: Removed. + 2005-06-22 Hrvoje Niksic * Makefile.src*: Add the config.h dependency. diff --git a/windows/Makefile.watcom b/windows/Makefile.watcom deleted file mode 100644 index 4a2a61e7..00000000 --- a/windows/Makefile.watcom +++ /dev/null @@ -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 $[@ - diff --git a/windows/README b/windows/README index 3d9929a9..7f8d2bf7 100644 --- a/windows/README +++ b/windows/README @@ -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 -- additional cleanup and - contribution of the Watcom makefile; + contribution of the (now retired) Watcom makefile; * John Burden -- cleanup of the VC++ makefile to get a clean build with VC++ 5.0 on Windows 95;