mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Adjustments for MSDOS.
This commit is contained in:
parent
1489612dd1
commit
f3e634a8b2
@ -1,3 +1,15 @@
|
||||
2009-09-05 Gisle Vanem <gvanem@broadpark.no>
|
||||
|
||||
* config.h: Added 'HAVE_ALLOCA_H' for Watcom 1.5+. Added
|
||||
'USE_WATT32' since all DOS-targets use the Watt-32 tcp/ip stack.
|
||||
Added meaningless dummy LOCALEDIR.
|
||||
|
||||
* Makefile.wc: A much needed update. Added rules for many files
|
||||
in ./lib, css.c and version.c.
|
||||
|
||||
* Makefile.dj: A much needed update. Added rules for css.c and
|
||||
version.c.
|
||||
|
||||
2008-01-25 Micah Cowan <micah@cowan.name>
|
||||
|
||||
* config.h: Updated copyright year.
|
||||
|
@ -1,13 +1,17 @@
|
||||
#
|
||||
# GNU Makefile for wget / djgpp / MSDOS.
|
||||
# By Gisle Vanem <giva@bgnett.no> 2007.
|
||||
# By Gisle Vanem <gvanem@broadpark.no> 2009.
|
||||
#
|
||||
# `cd' to `./src' and issue the command:
|
||||
# make -f ../msdos/Makefile.dj
|
||||
# make -f ../msdos/Makefile.dj depend
|
||||
# followed by:
|
||||
# make -f ../msdos/Makefile.dj
|
||||
#
|
||||
VERSION = 1.12 (djgpp/DOS)
|
||||
|
||||
.SUFFIXES: .exe
|
||||
|
||||
VPATH = ../lib
|
||||
VPATH = ../lib ../md5
|
||||
|
||||
USE_OPENSSL = 0
|
||||
USE_IPV6 = 1
|
||||
@ -20,8 +24,9 @@ ZLIB_ROOT = e:/djgpp/contrib/zlib
|
||||
|
||||
OBJ_DIR = djgpp.obj
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -g -Wall -Wcast-align -I. -I../msdos -I../lib -I/dev/env/WATT_ROOT/inc \
|
||||
-DHAVE_CONFIG_H -DENABLE_DEBUG
|
||||
CFLAGS = -O2 -g -Wall -Wcast-align -I. -I../msdos -I../lib -I../md5 \
|
||||
-I/dev/env/WATT_ROOT/inc -DHAVE_CONFIG_H -DENABLE_DEBUG \
|
||||
-DUSE_WATT32
|
||||
|
||||
# LDFLAGS = -s
|
||||
|
||||
@ -38,11 +43,13 @@ endif
|
||||
|
||||
EX_LIBS += /dev/env/WATT_ROOT/lib/libwatt.a
|
||||
|
||||
SOURCES += cmpt.c connect.c cookies.c ftp.c ftp-basic.c ftp-ls.c \
|
||||
SOURCES += cmpt.c connect.c cookies.c exits.c ftp.c ftp-basic.c ftp-ls.c \
|
||||
ftp-opie.c hash.c host.c html-parse.c html-url.c http.c \
|
||||
init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \
|
||||
res.c retr.c snprintf.c url.c utils.c version.c convert.c xmalloc.c \
|
||||
ptimer.c spider.c ../lib/getopt.c ../lib/getopt1.c ../lib/md5.c
|
||||
res.c retr.c snprintf.c url.c utils.c version.c convert.c \
|
||||
ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \
|
||||
$(addprefix ../lib/, error.c exitfail.c quote.c \
|
||||
quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c)
|
||||
|
||||
OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o)))
|
||||
|
||||
@ -55,18 +62,26 @@ $(OBJ_DIR):
|
||||
wget.exe: $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
css.c: css.l
|
||||
flex -8 -o$@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ_DIR)/*.o $(MAPFILE)
|
||||
|
||||
vclean realclean: clean
|
||||
rm -f wget.exe depend.dj
|
||||
rm -f wget.exe depend.dj version.c
|
||||
- rmdir $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/%.o: %.c
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
@echo
|
||||
|
||||
depend:
|
||||
version.c: ../msdos/Makefile.DJ
|
||||
@echo 'char *version_string = "$(VERSION)";' > $@
|
||||
@echo 'char *compilation_string = "$(CC) $(CFLAGS)";' >> $@
|
||||
@echo 'char *link_string = "$(CC) $(LDFLAGS) -o wget.exe $$(OBJECTS) $(EX_LIBS)";' >> $@
|
||||
|
||||
depend: version.c
|
||||
$(CC) -MM $(CFLAGS) $(SOURCES) | \
|
||||
sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj
|
||||
|
||||
|
@ -1,33 +1,40 @@
|
||||
#
|
||||
# Makefile for Wget / DOS32A / OpenWatcom
|
||||
# by G. Vanem <gvanem@broadpark.no> 2007
|
||||
# by G. Vanem <gvanem@broadpark.no> 2009
|
||||
#
|
||||
|
||||
COMPILE = *wcc386 -mf -3r -w6 -d2 -zq -zm -of -I. -I$(%watt_root)\inc &
|
||||
-I..\msdos -I..\lib -fr=nul -bt=dos -s -dHAVE_CONFIG_H &
|
||||
-dENABLE_DEBUG -dSIZEOF_INT=4
|
||||
VERSION = 1.12 (Watcom/DOS)
|
||||
|
||||
COMPILE = *wcc386 -mf -3r -w3 -d2 -zq -zm -of -I. -I$(%watt_root)\inc &
|
||||
-I..\msdos -I..\lib -I..\md5 -fr=nul -bt=dos -s -dHAVE_CONFIG_H &
|
||||
-dENABLE_DEBUG -dSIZEOF_INT=4 -dUSE_WATT32
|
||||
|
||||
LINK = *wlink option quiet, map, verbose, eliminate, caseexact, stack=100k &
|
||||
debug all system dos32a
|
||||
|
||||
OBJ_DIR = Watcom.obj
|
||||
OBJ_DIR = WC_DOS.obj
|
||||
|
||||
OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\connect.obj &
|
||||
$(OBJ_DIR)\convert.obj $(OBJ_DIR)\cookies.obj &
|
||||
$(OBJ_DIR)\c-ctype.obj $(OBJ_DIR)\ftp-basic.obj &
|
||||
$(OBJ_DIR)\ftp-ls.obj $(OBJ_DIR)\ftp-opie.obj &
|
||||
$(OBJ_DIR)\ftp.obj $(OBJ_DIR)\gen-md5.obj &
|
||||
$(OBJ_DIR)\getopt.obj $(OBJ_DIR)\getopt1.obj &
|
||||
$(OBJ_DIR)\hash.obj $(OBJ_DIR)\host.obj &
|
||||
$(OBJ_DIR)\html-parse.obj $(OBJ_DIR)\html-url.obj &
|
||||
$(OBJ_DIR)\http.obj $(OBJ_DIR)\init.obj &
|
||||
$(OBJ_DIR)\log.obj $(OBJ_DIR)\main.obj &
|
||||
$(OBJ_DIR)\md5.obj $(OBJ_DIR)\netrc.obj &
|
||||
$(OBJ_DIR)\progress.obj $(OBJ_DIR)\ptimer.obj &
|
||||
$(OBJ_DIR)\recur.obj $(OBJ_DIR)\res.obj &
|
||||
$(OBJ_DIR)\retr.obj $(OBJ_DIR)\spider.obj &
|
||||
$(OBJ_DIR)\url.obj $(OBJ_DIR)\utils.obj &
|
||||
$(OBJ_DIR)\version.obj $(OBJ_DIR)\xmalloc.obj
|
||||
OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\build_info.obj &
|
||||
$(OBJ_DIR)\c-ctype.obj $(OBJ_DIR)\cookies.obj &
|
||||
$(OBJ_DIR)\connect.obj $(OBJ_DIR)\convert.obj &
|
||||
$(OBJ_DIR)\css.obj $(OBJ_DIR)\css-url.obj &
|
||||
$(OBJ_DIR)\error.obj $(OBJ_DIR)\exits.obj &
|
||||
$(OBJ_DIR)\exitfail.obj $(OBJ_DIR)\ftp-basic.obj &
|
||||
$(OBJ_DIR)\ftp-ls.obj $(OBJ_DIR)\ftp-opie.obj &
|
||||
$(OBJ_DIR)\ftp.obj $(OBJ_DIR)\gen-md5.obj &
|
||||
$(OBJ_DIR)\getopt.obj $(OBJ_DIR)\getopt1.obj &
|
||||
$(OBJ_DIR)\getpass.obj $(OBJ_DIR)\hash.obj &
|
||||
$(OBJ_DIR)\host.obj $(OBJ_DIR)\html-parse.obj &
|
||||
$(OBJ_DIR)\html-url.obj $(OBJ_DIR)\http.obj &
|
||||
$(OBJ_DIR)\init.obj $(OBJ_DIR)\log.obj &
|
||||
$(OBJ_DIR)\main.obj $(OBJ_DIR)\md5.obj &
|
||||
$(OBJ_DIR)\netrc.obj $(OBJ_DIR)\progress.obj &
|
||||
$(OBJ_DIR)\ptimer.obj $(OBJ_DIR)\recur.obj &
|
||||
$(OBJ_DIR)\res.obj $(OBJ_DIR)\retr.obj &
|
||||
$(OBJ_DIR)\spider.obj $(OBJ_DIR)\url.obj &
|
||||
$(OBJ_DIR)\utils.obj $(OBJ_DIR)\version.obj &
|
||||
$(OBJ_DIR)\xalloc-die.obj $(OBJ_DIR)\xmalloc.obj &
|
||||
$(OBJ_DIR)\quote.obj $(OBJ_DIR)\quotearg.obj
|
||||
|
||||
all: $(OBJ_DIR) wget.exe .SYMBOLIC
|
||||
@echo 'Welcome to Wget / Watcom'
|
||||
@ -44,7 +51,11 @@ $(OBJ_DIR)\c-ctype.obj: ..\lib\c-ctype.c
|
||||
*$(COMPILE) -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\md5.obj: ..\lib\md5.c
|
||||
$(OBJ_DIR)\exitfail.obj: ..\lib\exitfail.c
|
||||
*$(COMPILE) -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\error.obj: ..\lib\error.c
|
||||
*$(COMPILE) -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
@ -55,11 +66,42 @@ $(OBJ_DIR)\getopt.obj: ..\lib\getopt.c
|
||||
$(OBJ_DIR)\getopt1.obj: ..\lib\getopt1.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
wget.exe: $(OBJECTS)
|
||||
$(LINK) name $@ file { $(OBJECTS) } library $(%watt_root)\lib\wattcpwf.lib
|
||||
.ERASE
|
||||
$(OBJ_DIR)\getpass.obj: ..\lib\getpass.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\md5.obj: ..\md5\md5.c
|
||||
*$(COMPILE) -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\xmalloc.obj: ..\lib\xmalloc.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\xalloc-die.obj: ..\lib\xalloc-die.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\quote.obj: ..\lib\quote.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
.ERASE
|
||||
$(OBJ_DIR)\quotearg.obj: ..\lib\quotearg.c
|
||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
||||
|
||||
css.c: css.l
|
||||
flex -8 -o$@ $[@
|
||||
|
||||
wget.exe: $(OBJECTS)
|
||||
$(LINK) name $@ file { $(OBJECTS) } library $(%watt_root)\lib\wattcpwf.lib
|
||||
|
||||
version.c: ..\msdos\Makefile.WC
|
||||
@echo char *version_string = "$(VERSION)"; > $@
|
||||
@echo char *compilation_string = "$(COMPILE)"; >> $@
|
||||
@echo char *link_string = "$(LINK) name wget.exe file { $$(OBJECTS) }"; >> $@
|
||||
|
||||
clean: .SYMBOLIC
|
||||
- rm $(OBJ_DIR)\*.obj wget.exe wget.map
|
||||
- rm $(OBJ_DIR)\*.obj wget.exe wget.map version.c css.c
|
||||
- rmdir $(OBJ_DIR)
|
||||
|
||||
|
@ -91,6 +91,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef OPENWATCOM_15
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_INT64_T 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
@ -129,6 +130,11 @@
|
||||
#define MSDOS
|
||||
#endif
|
||||
|
||||
#if !defined(USE_WATT32)
|
||||
#define USE_WATT32
|
||||
#endif
|
||||
|
||||
#define LOCALEDIR ""
|
||||
#define OS_TYPE "DOS"
|
||||
|
||||
#endif /* CONFIG_DOS_H */
|
||||
|
@ -1,3 +1,9 @@
|
||||
2009-09-05 Gisle Vanem <gvanem@broadpark.no>
|
||||
|
||||
* connect.c, init.c, main.c, openssl.c, options.h: Replace
|
||||
"ifdef MSDOS" with "ifdef USE_WATT32" since DOS-targets in fact
|
||||
use the Watt-32 tcp/ip stack.
|
||||
|
||||
2009-09-04 Micah Cowan <micah@cowan.name>
|
||||
|
||||
* Makefile.am: Move build_info.c to wget_SOURCES from
|
||||
|
@ -701,7 +701,7 @@ test_socket_open (int sock)
|
||||
|
||||
/* Basic socket operations, mostly EINTR wrappers. */
|
||||
|
||||
#if defined(WINDOWS) || defined(MSDOS)
|
||||
#if defined(WINDOWS) || defined(USE_WATT32)
|
||||
# define read(fd, buf, cnt) recv (fd, buf, cnt, 0)
|
||||
# define write(fd, buf, cnt) send (fd, buf, cnt, 0)
|
||||
# define close(fd) closesocket (fd)
|
||||
|
@ -249,7 +249,7 @@ static const struct {
|
||||
{ "verbose", NULL, cmd_spec_verbose },
|
||||
{ "wait", &opt.wait, cmd_time },
|
||||
{ "waitretry", &opt.waitretry, cmd_time },
|
||||
#ifdef MSDOS
|
||||
#ifdef USE_WATT32
|
||||
{ "wdebug", &opt.wdebug, cmd_boolean },
|
||||
#endif
|
||||
};
|
||||
|
@ -273,7 +273,7 @@ static struct cmdline_option option_data[] =
|
||||
{ "version", 'V', OPT_FUNCALL, (void *) print_version, no_argument },
|
||||
{ "wait", 'w', OPT_VALUE, "wait", -1 },
|
||||
{ "waitretry", 0, OPT_VALUE, "waitretry", -1 },
|
||||
#ifdef MSDOS
|
||||
#ifdef USE_WATT32
|
||||
{ "wdebug", 0, OPT_BOOLEAN, "wdebug", -1 },
|
||||
#endif
|
||||
};
|
||||
@ -419,7 +419,7 @@ Logging and input file:\n"),
|
||||
N_("\
|
||||
-d, --debug print lots of debugging information.\n"),
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
#ifdef USE_WATT32
|
||||
N_("\
|
||||
--wdebug print Watt-32 debug output.\n"),
|
||||
#endif
|
||||
@ -1127,7 +1127,7 @@ for details.\n\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
#ifdef MSDOS
|
||||
#ifdef USE_WATT32
|
||||
if (opt.wdebug)
|
||||
dbug_init();
|
||||
sock_init();
|
||||
|
@ -364,7 +364,7 @@ openssl_close (int fd, void *arg)
|
||||
xfree_null (ctx->last_error);
|
||||
xfree (ctx);
|
||||
|
||||
#if defined(WINDOWS) || defined(MSDOS)
|
||||
#if defined(WINDOWS) || defined(USE_WATT32)
|
||||
closesocket (fd);
|
||||
#else
|
||||
close (fd);
|
||||
|
@ -132,7 +132,7 @@ struct options
|
||||
bool debug; /* Debugging on/off */
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
#ifdef USE_WATT32
|
||||
bool wdebug; /* Watt-32 tcp/ip debugging on/off */
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user