]> sjero.net Git - wget/commitdiff
[svn] Remove support for Watcom's compiler.
authorhniksic <devnull@localhost>
Thu, 23 Jun 2005 14:11:48 +0000 (07:11 -0700)
committerhniksic <devnull@localhost>
Thu, 23 Jun 2005 14:11:48 +0000 (07:11 -0700)
configure.bat.in
src/ChangeLog
src/mswindows.h
src/sysdep.h
windows/ChangeLog
windows/Makefile.watcom [deleted file]
windows/README

index c8b45815db4aa1b699705ae129d80fbae962d802..4b59f40f31c0ae456ad6ffc89f2b60a17ddb309e 100644 (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 == .--borland goto :borland
 if .%1 == .--mingw goto :mingw
 if .%1 == .--msvc goto :msvc
-if .%1 == .--watcom goto :watcom
 goto :usage
 
 :msvc
 goto :usage
 
 :msvc
@@ -61,20 +60,6 @@ copy windows\Makefile.doc doc\Makefile > nul
 echo Type mingw32-make to start compiling.
 goto :end
 
 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
 :usage
-echo "Usage: configure [--borland | --mingw | --msvc | --watcom]"
+echo "Usage: configure [--borland | --mingw | --msvc]"
 :end
 :end
index d6641479deb06ed1fa86ce701474f4710e02c1af..5b0a1b230dc36ccb6cbe082b223dc2ca37540edd 100644 (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
 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * all: Use bool instead of int and false/true instead of 0/non-0
index 6750934b2c6b1221246180a7f051da743daf1a83..e273c680841659acc5ab996711b9c3222eef99a4 100644 (file)
@@ -42,8 +42,8 @@ so, delete this exception statement from your version.  */
 
 #include <windows.h>
 
 
 #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>
    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
 
 #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
 
 #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
 
 #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
 
 # 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
 #define PATH_SEPARATOR '\\'
 
 #ifdef HAVE_ISATTY
index a3bebe97b5f78932f09b013b780ce0ec4138cbed..f3275e9f4c73a939895779bc60e24b2b2c2038ff 100644 (file)
@@ -43,25 +43,14 @@ so, delete this exception statement from your version.  */
 #endif
 
 #ifdef WINDOWS
 #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. */
 
 /* 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"
 /* 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"
 /* Use __int64 under Windows. */
 typedef __int64 LARGE_INT;
 # define LARGE_INT_FMT "%I64"
index 922fd2e7a3e18ccae5d03c37fd7bb53a63f22c65..86441af9177aa9d12d2ce607a8ba1840b6a8f400 100644 (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.
 2005-06-22  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * Makefile.src*: Add the config.h dependency.
diff --git a/windows/Makefile.watcom b/windows/Makefile.watcom
deleted file mode 100644 (file)
index 4a2a61e..0000000
+++ /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 $[@
-
index 3d9929a9b628e98493598c74e6e58d5e2ed8750b..7f8d2bf7f41ff56e95c4a3e54d271c10cc99c5f5 100644 (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; 
 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
 
 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
   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;
 
 * John Burden <john@futuresguide.com> -- cleanup of the VC++ makefile
   to get a clean build with VC++ 5.0 on Windows 95;