aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.wcc13
-rw-r--r--teco.h25
2 files changed, 31 insertions, 7 deletions
diff --git a/Makefile.wcc b/Makefile.wcc
index 13ab749..8dda08f 100644
--- a/Makefile.wcc
+++ b/Makefile.wcc
@@ -24,22 +24,21 @@ CFLAGS = -d0 -onasx -oh
# Perhaps it would be more elegant to have a DOS-specific config.h.
#
# Large data model: far code and data pointers
-CFLAGS += -q -wx -ze -zm -j -0 -ml -bt=DOS @WCC_DEFS
+CFLAGS += -q -wx -ze -zm -j -0 -ml -bt=DOS
LDFLAGS += format dos option eliminate option map option stack=16k &
libpath $(%WATCOM)/lib286:$(%WATCOM)/lib286/dos
+# The `search_string` symbol is larger than 32kb.
+# If it's allocated as far data, it will be needlessly included in the
+# binary.
+CFLAGS += -zt=65536
+
.BEFORE
!ifndef %WATCOM
set WATCOM=/usr/bin/watcom
!endif
set include=$(%WATCOM)/h
set lib=$(%WATCOM)/lib286;$(%WATCOM)/lib286/dos
- set WCC_DEFS=-dSTDC_HEADERS=1 -dHAVE_STDIO_H -dHAVE_CTYPE_H -dHAVE_ERRNO_H &
- -dHAVE_STRING_H -dHAVE_STRINGS_H -dHAVE_FCNTL_H -dHAVE_IO_H &
- -dHAVE_SYS_STAT_H -dHAVE_SIGNAL_H -dHAVE_STDLIB_H -dHAVE_UNISTD_H &
- -dHAVE_STDINT_H -dHAVE_DIRECT_H -dHAVE_I86_H -dHAVE_PROCESS_H -dHAVE_CONIO_H &
- -dHAVE_MALLOC_H &
- -dHAVE_SBRK -dHAVE_STRCHR -dTERMCAP -d__WATCOM_LFN__
all : teco.exe .SYMBOLIC
diff --git a/teco.h b/teco.h
index 4959ab7..eec13c1 100644
--- a/teco.h
+++ b/teco.h
@@ -72,6 +72,31 @@
#include "config.h"
#endif
+#ifdef MSDOS
+#define __WATCOM_LFN__
+#define STDC_HEADERS 1
+#define HAVE_STDIO_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_IO_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_DIRECT_H 1
+#define HAVE_I86_H 1
+#define HAVE_PROCESS_H 1
+#define HAVE_CONIO_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_SBRK 1
+#define HAVE_STRCHR 1
+#define TERMCAP 1
+#endif /* MSDOS */
+
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif