summaryrefslogtreecommitdiff
path: root/dmake/winnt
diff options
context:
space:
mode:
Diffstat (limited to 'dmake/winnt')
-rw-r--r--dmake/winnt/borland/bcc50/config.h44
-rw-r--r--dmake/winnt/borland/bcc50/config.mk12
-rw-r--r--dmake/winnt/borland/bcc50/lib.rsp2
-rwxr-xr-xdmake/winnt/borland/bcc50/mk.bat95
-rwxr-xr-xdmake/winnt/borland/bcc50/mk.cmd93
-rw-r--r--dmake/winnt/borland/bcc50/obj.rsp31
-rw-r--r--dmake/winnt/borland/bcc50/public.h168
-rw-r--r--dmake/winnt/borland/bcc50/template.mk7
-rw-r--r--dmake/winnt/borland/config.mk51
-rw-r--r--dmake/winnt/borland/ruletab.c44
-rw-r--r--dmake/winnt/borland/sysintf.h55
-rw-r--r--dmake/winnt/borland/tempnam.c114
-rw-r--r--dmake/winnt/config.mk57
-rw-r--r--dmake/winnt/dchdir.c47
-rw-r--r--dmake/winnt/microsft/config.h85
-rw-r--r--dmake/winnt/microsft/config.mk61
-rw-r--r--dmake/winnt/microsft/optoff.h27
-rw-r--r--dmake/winnt/microsft/ruletab.c45
-rw-r--r--dmake/winnt/microsft/sysintf.h57
-rw-r--r--dmake/winnt/microsft/tempnam.c110
-rw-r--r--dmake/winnt/microsft/vpp40/config.mk14
-rw-r--r--dmake/winnt/microsft/vpp40/lib.rsp1
-rwxr-xr-xdmake/winnt/microsft/vpp40/mk.bat32
-rwxr-xr-xdmake/winnt/microsft/vpp40/mk.cmd31
-rw-r--r--dmake/winnt/microsft/vpp40/obj.rsp28
-rw-r--r--dmake/winnt/microsft/vpp40/public.h167
-rw-r--r--dmake/winnt/microsft/vpp40/runargv.c288
-rw-r--r--dmake/winnt/microsft/vpp40/template.mk7
-rw-r--r--dmake/winnt/microsft/vpp40/tempnam.c110
-rw-r--r--dmake/winnt/mingw/public.h167
-rw-r--r--dmake/winnt/mingw/sysintf.h62
-rw-r--r--dmake/winnt/msvc6/public.h167
-rw-r--r--dmake/winnt/msvc6/sysintf.h62
-rw-r--r--dmake/winnt/startup.h29
34 files changed, 2370 insertions, 0 deletions
diff --git a/dmake/winnt/borland/bcc50/config.h b/dmake/winnt/borland/bcc50/config.h
new file mode 100644
index 000000000000..77c577995664
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/config.h
@@ -0,0 +1,44 @@
+/* RCS $Id: config.h,v 1.2 2008-03-05 18:41:34 kz Exp $
+--
+-- SYNOPSIS
+-- Configurarion include file.
+--
+-- DESCRIPTION
+-- There is one of these for each specific machine configuration.
+-- It can be used to further tweek the machine specific sources
+-- so that they compile.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* define this for configurations that don't have the coreleft function
+ * so that the code compiles. To my knowledge coreleft exists only on
+ * Turbo C, but it is needed here since the function is used in many debug
+ * macros. */
+/*#define coreleft() 0L*/
+extern unsigned int coreleft();
+
+#define SIGQUIT SIGBREAK /* turbo C doesn't understand SIGQUIT */
+
+/* Turbo-C understands const declarations. */
+#define CONST const
+
+/* a small problem with pointer to voids on some unix machines needs this */
+#define DMPVOID void *
+
+/* Borland redefined the environment variable, sigh */
+#define environ _environ
diff --git a/dmake/winnt/borland/bcc50/config.mk b/dmake/winnt/borland/bcc50/config.mk
new file mode 100644
index 000000000000..6e4fbd89e368
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/config.mk
@@ -0,0 +1,12 @@
+# Definition of macros for library, and C startup code.
+osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)
+
+# Change the CCROOT variable to reflect the installation directory of your
+# C++ compiler.
+CCVER *:= c:/cc/borland/$(OSENVIRONMENT)
+
+# Definitions for compiles and links
+CSTARTUP = $(CCVER)/lib/c0x32.obj
+LDLIBS = $(CCVER)/lib/cw32 $(CCVER)/lib/import32
+
+CFLAGS += -A- -w-pro -I$(osedir)
diff --git a/dmake/winnt/borland/bcc50/lib.rsp b/dmake/winnt/borland/bcc50/lib.rsp
new file mode 100644
index 000000000000..0bad32e7128d
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/lib.rsp
@@ -0,0 +1,2 @@
+c:\cc\borland\bcc50\lib\cw32
+c:\cc\borland\bcc50\lib\import32
diff --git a/dmake/winnt/borland/bcc50/mk.bat b/dmake/winnt/borland/bcc50/mk.bat
new file mode 100755
index 000000000000..f6e3c75fce78
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/mk.bat
@@ -0,0 +1,95 @@
+md objects
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 infer.c
+copy infer.obj objects
+del infer.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 make.c
+copy make.obj objects
+del make.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 stat.c
+copy stat.obj objects
+del stat.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 expand.c
+copy expand.obj objects
+del expand.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 hash.c
+copy hash.obj objects
+del hash.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 dag.c
+copy dag.obj objects
+del dag.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 dmake.c
+copy dmake.obj objects
+del dmake.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 path.c
+copy path.obj objects
+del path.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 imacs.c
+copy imacs.obj objects
+del imacs.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 parse.c
+copy parse.obj objects
+del parse.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 getinp.c
+copy getinp.obj objects
+del getinp.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 quit.c
+copy quit.obj objects
+del quit.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 state.c
+copy state.obj objects
+del state.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 macparse.c
+copy macparse.obj objects
+del macparse.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 percent.c
+copy percent.obj objects
+del percent.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 function.c
+copy function.obj objects
+del function.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\switchar.c
+copy switchar.obj objects
+del switchar.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\borland\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\borland\utime.c
+copy utime.obj objects
+del utime.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\borland\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 win95\borland\runargv.c
+copy runargv.obj objects
+del runargv.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+bcc32 -c -I. -Iwin95 -Iwin95\borland -d -O -N- -w-nod -A- -w-pro -Iwin95\borland\bcc50 unix\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+tlink32 @win95\borland\bcc50\obj.rsp,dmake.exe,NUL.MAP,@win95\borland\bcc50\lib.rsp
diff --git a/dmake/winnt/borland/bcc50/mk.cmd b/dmake/winnt/borland/bcc50/mk.cmd
new file mode 100755
index 000000000000..7f212e9c4f09
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/mk.cmd
@@ -0,0 +1,93 @@
+md objects
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 infer.c
+copy infer.obj objects
+del infer.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 make.c
+copy make.obj objects
+del make.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 stat.c
+copy stat.obj objects
+del stat.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 expand.c
+copy expand.obj objects
+del expand.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 hash.c
+copy hash.obj objects
+del hash.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 dag.c
+copy dag.obj objects
+del dag.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 dmake.c
+copy dmake.obj objects
+del dmake.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 path.c
+copy path.obj objects
+del path.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 imacs.c
+copy imacs.obj objects
+del imacs.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 parse.c
+copy parse.obj objects
+del parse.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 getinp.c
+copy getinp.obj objects
+del getinp.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 quit.c
+copy quit.obj objects
+del quit.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 state.c
+copy state.obj objects
+del state.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 macparse.c
+copy macparse.obj objects
+del macparse.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 percent.c
+copy percent.obj objects
+del percent.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 function.c
+copy function.obj objects
+del function.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 winnt\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 winnt\borland\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 winnt\borland\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 winnt\borland\utime.c
+copy utime.obj objects
+del utime.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 winnt\borland\runargv.c
+copy runargv.obj objects
+del runargv.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+bcc32 -c -I. -Iwinnt -Iwinnt\borland -d -O -N- -w-nod -A- -w-pro -Iwinnt\borland\bcc50 unix\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+tlink32 @fix95nt\winnt\borland\bcc50\obj.rsp,dmake.exe,NUL.MAP,@fix95nt\winnt\borland\bcc50\lib.rsp
+copy winnt\borland\bcc50\template.mk startup\config.mk
diff --git a/dmake/winnt/borland/bcc50/obj.rsp b/dmake/winnt/borland/bcc50/obj.rsp
new file mode 100644
index 000000000000..9cf59afdedd2
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/obj.rsp
@@ -0,0 +1,31 @@
+c:\cc\borland\bcc50\lib\c0x32.obj
+objects\infer.obj
+objects\make.obj
+objects\stat.obj
+objects\expand.obj
+objects\dmstring.obj
+objects\hash.obj
+objects\dag.obj
+objects\dmake.obj
+objects\path.obj
+objects\imacs.obj
+objects\sysintf.obj
+objects\parse.obj
+objects\getinp.obj
+objects\quit.obj
+objects\state.obj
+objects\dmdump.obj
+objects\macparse.obj
+objects\rulparse.obj
+objects\percent.obj
+objects\function.obj
+objects\dchdir.obj
+objects\dstrlwr.obj
+objects\arlib.obj
+objects\dirbrk.obj
+objects\tempnam.obj
+objects\ruletab.obj
+objects\utime.obj
+objects\runargv.obj
+objects\dcache.obj
+objects\rmprq.obj
diff --git a/dmake/winnt/borland/bcc50/public.h b/dmake/winnt/borland/bcc50/public.h
new file mode 100644
index 000000000000..1965c0210483
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/public.h
@@ -0,0 +1,168 @@
+/* RCS $Id: public.h,v 1.9 2007-10-15 15:59:14 ihi Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+int main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+void Do_profile_output ANSI((char *, uint16, CELLPTR));
+int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, int));
+char ** Pack_argv ANSI((int, int, char **));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)(int)));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI((int));
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int dchdir ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, t_attr, char **));
+int Wait_for_child ANSI((int, int));
+void Clean_up_processes ANSI(());
+time_t CacheStat ANSI((char *, int));
+void Remove_prq ANSI((CELLPTR));
+
+#endif
diff --git a/dmake/winnt/borland/bcc50/template.mk b/dmake/winnt/borland/bcc50/template.mk
new file mode 100644
index 000000000000..b94ac034e0a1
--- /dev/null
+++ b/dmake/winnt/borland/bcc50/template.mk
@@ -0,0 +1,7 @@
+# ** Default build configuration for dmake.
+# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED
+# ** USE "startup/local.mk" for those.
+
+ OS *:= winnt
+ OSRELEASE *:= borland
+ OSENVIRONMENT *:= bcc50
diff --git a/dmake/winnt/borland/config.mk b/dmake/winnt/borland/config.mk
new file mode 100644
index 000000000000..85c929b4163e
--- /dev/null
+++ b/dmake/winnt/borland/config.mk
@@ -0,0 +1,51 @@
+# This is the Turbo C++ 2.0 DOS configuration file for DMAKE
+# It simply modifies the values of SRC, and checks to see if
+# OSENVIRONMENT is defined. If so it includes the appropriate
+# config.mk file.
+#
+# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
+# directory.
+#
+osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
+
+# OS specific sources
+OSR_SRC += tempnam.c ruletab.c
+DOS_SRC += runargv.c rmprq.c
+
+SRC += $(OSR_SRC) $(DOS_SRC)
+.SOURCE.h : $(osrdir)
+
+# Local configuration modifications for CFLAGS. Make sure your turboc.cfg
+# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
+# below!
+#CFLAGS += -DM_I86=1 -D__STDC__=1
+
+# You can get a smaller executable still, buy adding a -1 to the list of
+# flags below, but then you can't run this on an 8086/88 cpu.
+#CFLAGS += -1
+CFLAGS += -I$(osrdir) -d -O -N- -w-nod
+ASFLAGS += -t -mx $(S_$(MODEL))
+
+LDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
+LDARGS = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP$(LDTAIL)
+LDTAIL = $(_libs)$(LDFLAGS:s/ //)
+_libs = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
+LDTMPOBJ = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
+LDTMPLIB = $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"+\n")\n)
+
+# Debugging information for Turbo-C
+DB_CFLAGS += -v
+DB_LDFLAGS += /v
+
+# See if we modify anything in the lower levels.
+.IF $(OSENVIRONMENT) != $(NULL)
+ .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
+.END
+
+.SETDIR=$(osrdir) : $(OSR_SRC)
+.SETDIR=msdos : $(DOS_SRC)
+
+S_s = -dmsmall
+S_m = -dmmedium
+S_c = -dmcompact
+S_l = -dmlarge
diff --git a/dmake/winnt/borland/ruletab.c b/dmake/winnt/borland/ruletab.c
new file mode 100644
index 000000000000..855f05515e5c
--- /dev/null
+++ b/dmake/winnt/borland/ruletab.c
@@ -0,0 +1,44 @@
+/* RCS $Id: ruletab.c,v 1.3 2006-06-29 11:32:41 ihi Exp $
+--
+-- SYNOPSIS
+-- Default initial configuration of dmake.
+--
+-- DESCRIPTION
+-- Define here the initial set of rules that are defined before
+-- dmake performs any processing.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* These are control macros for dmake that MUST be defined at some point
+ * if they are NOT dmake will not work! These are default definitions. They
+ * may be overridden inside the .STARTUP makefile, they are here
+ * strictly so that dmake can parse the STARTUP makefile */
+
+#include <stdio.h>
+
+static char *_rules[] = {
+ "MAXLINELENGTH := 32766",
+ "MAXPROCESSLIMIT := 4",
+ ".IMPORT .IGNORE: DMAKEROOT",
+ ".MAKEFILES : makefile.mk makefile",
+ ".SOURCE : .NULL",
+#include "startup.h"
+ (char *)NULL };
+
+char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
+
diff --git a/dmake/winnt/borland/sysintf.h b/dmake/winnt/borland/sysintf.h
new file mode 100644
index 000000000000..23b6a6c247d3
--- /dev/null
+++ b/dmake/winnt/borland/sysintf.h
@@ -0,0 +1,55 @@
+/* RCS $Id: sysintf.h,v 1.3 2007-01-18 09:51:20 vg Exp $
+--
+-- SYNOPSIS
+-- Interfaces for sysintf.c
+--
+-- DESCRIPTION
+-- Abstractions of functions in sysintf.c
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#define DMSTAT stat
+#define VOID_LCACHE(l,m)
+#define GETPID _psp
+#define Hook_std_writes(A)
+
+extern char * tempnam();
+extern char * getcwd();
+
+/*
+** standard C items
+*/
+
+/*
+** DOS interface standard items
+*/
+#define chdir(p) dchdir(p)
+#define CacheStat(A,B) really_dostat(A,&buf)
+
+/*
+** make parameters
+*/
+#ifdef _POSIX_NAME_MAX
+#undef _POSIX_NAME_MAX
+#endif
+#define _POSIX_NAME_MAX _MAX_FNAME
+
+#ifdef _POSIX_PATH_MAX
+#undef _POSIX_PATH_MAX
+#endif
+#define _POSIX_PATH_MAX _MAX_PATH
diff --git a/dmake/winnt/borland/tempnam.c b/dmake/winnt/borland/tempnam.c
new file mode 100644
index 000000000000..a7d0df8d962b
--- /dev/null
+++ b/dmake/winnt/borland/tempnam.c
@@ -0,0 +1,114 @@
+/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:37 hr Exp $
+--
+-- SYNOPSIS
+-- tempnam
+--
+-- DESCRIPTION
+-- temp file name generation routines.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/*LINTLIBRARY*/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <dos.h>
+
+#if defined(max)
+# undef max
+#endif
+#define max(A,B) (((A)<(B))?(B):(A))
+
+extern char *mktemp();
+extern int access();
+int d_access();
+
+/* Turbo C stdio.h doesn't define P_tmpdir, so let's do it here */
+/* Under DOS leave the default tmpdir pointing here! */
+#ifndef P_tmpdir
+static char *P_tmpdir = "";
+#endif
+
+char *
+tempnam(dir, prefix)
+char *dir; /* use this directory please (if non-NULL) */
+char *prefix; /* use this (if non-NULL) as filename prefix */
+{
+ static int count = 0;
+ register char *p, *q, *tmpdir;
+ int tl=0, dl=0, pl;
+ char buf[30];
+
+#if defined(__WIN32__)
+ unsigned int _psp = rand();
+#endif
+
+ pl = strlen(P_tmpdir);
+
+ if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
+ else if( (tmpdir = getenv("TMP")) != NULL ) tl = strlen(tmpdir);
+ if( dir != NULL ) dl = strlen(dir);
+
+ if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
+ return(NULL);
+
+ *p = '\0';
+
+ if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) )
+ if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) )
+ if( d_access( strcpy(p, P_tmpdir), 0) != 0 )
+ if( !prefix )
+ prefix = "tp";
+
+ if(prefix)
+ {
+ *(p+strlen(p)+2) = '\0';
+ (void)strncat(p, prefix, 2);
+ }
+
+ sprintf( buf, "%08x", _psp );
+ buf[6]='\0';
+ (void)strcat(p, buf );
+ sprintf( buf, "%04d", count++ );
+ q=p+strlen(p)-6;
+ *q++ = buf[0]; *q++ = buf[1];
+ *q++ = buf[2]; *q = buf[3];
+
+ if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
+
+ return(p);
+}
+
+
+
+d_access( name, flag )
+char *name;
+int flag;
+{
+ extern char *DirSepStr;
+ char *p;
+ int r;
+
+ if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
+ r = access( name, flag );
+ p = name+strlen(name)-1;
+
+ if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
+
+ return( r );
+}
diff --git a/dmake/winnt/config.mk b/dmake/winnt/config.mk
new file mode 100644
index 000000000000..2abcb8ad66c6
--- /dev/null
+++ b/dmake/winnt/config.mk
@@ -0,0 +1,57 @@
+# This is an OS specific configuration file
+# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
+# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
+# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
+#
+
+# Memory model to compile for
+# set to s - small, m - medium, c - compact, l - large
+# Need large model now, dmake has grown up :-)
+MODEL = l
+
+STARTUPFILE = startup/startup.mk
+
+CPPFLAGS = $(CFLAGS)
+
+# Debug flags
+DB_CFLAGS = -DDBUG
+DB_LDFLAGS =
+DB_LDLIBS =
+
+# NO Debug flags
+NDB_CFLAGS =
+NDB_LDFLAGS =
+NDB_LDLIBS =
+
+# Local configuration modifications for CFLAGS.
+CFLAGS += -I$(OS)
+
+# Common Win32 source files.
+OS_SRC += dchdir.c
+
+# Imported Win95 files.
+WIN95SRC += switchar.c
+
+# Imported MSDOS Files.
+DOSSRC += dstrlwr.c arlib.c dirbrk.c
+
+SRC += $(OS_SRC) $(UNIXSRC) $(DOSSRC)
+
+# Provide our own %$O : %$S rule.
+%$O : %$S
+ +$(AS) $(ASFLAGS) \
+ $(<:s,\,${__.DIVSEP-sh-${USESHELL}},:s,/,${__.DIVSEP-sh-${USESHELL}},);
+ mv $(@:f) $(OBJDIR)
+
+# Set source dirs so that we can find files named in this
+# config file.
+.SOURCE.h : $(OS)
+
+# See if we modify anything in the lower levels.
+.IF $(OSRELEASE) != $(NULL)
+ .INCLUDE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
+.END
+
+.SETDIR=msdos : $(DOSSRC)
+.SETDIR=win95 : $(WIN95SRC)
+.SETDIR=$(OS) : $(ASRC) $(OS_SRC)
diff --git a/dmake/winnt/dchdir.c b/dmake/winnt/dchdir.c
new file mode 100644
index 000000000000..de2cf18041a8
--- /dev/null
+++ b/dmake/winnt/dchdir.c
@@ -0,0 +1,47 @@
+/* RCS $Id: dchdir.c,v 1.1.1.1 2000-09-22 15:33:37 hr Exp $
+--
+-- SYNOPSIS
+-- Change directory.
+--
+-- DESCRIPTION
+-- Under DOS change the current drive as well as the current directory.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include <dir.h>
+#include <direct.h>
+#include "extern.h"
+
+PUBLIC int
+dchdir(path)
+char *path;
+{
+ int res;
+
+ res = chdir(path);
+
+ if (res != -1 && path[1] == ':') {
+ unsigned new_drive;
+
+ /* for WIN32 just use the _chdrive library call */
+ new_drive = (*path & ~0x20) - 'A' + 1;
+ _chdrive(new_drive);
+ }
+
+ return (res);
+}
diff --git a/dmake/winnt/microsft/config.h b/dmake/winnt/microsft/config.h
new file mode 100644
index 000000000000..32d59716185a
--- /dev/null
+++ b/dmake/winnt/microsft/config.h
@@ -0,0 +1,85 @@
+/* RCS $Id: config.h,v 1.9 2008-03-05 18:41:51 kz Exp $
+--
+-- SYNOPSIS
+-- Configurarion include file.
+--
+-- DESCRIPTION
+-- There is one of these for each specific machine configuration.
+-- It can be used to further tweek the machine specific sources
+-- so that they compile.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* Name and version number of this package */
+#define PACKAGE "dmake"
+#define VERSION "4.12"
+#define BUILDINFO "Windows / MS Visual C++"
+
+#if defined (_MSC_VER)
+# if _MSC_VER < 500
+ Force a compile-time blowup.
+ Do not define "#define _MSC_VER" for MSC compilers earlier than 5.0.
+# endif
+#endif
+
+/* define this for configurations that don't have the coreleft function
+ * so that the code compiles. To my knowledge coreleft exists only on
+ * Turbo C, but it is needed here since the function is used in many debug
+ * macros. */
+#define coreleft() 0L
+
+/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
+#ifndef SIGTERM
+# define SIGTERM SIGINT
+#endif
+
+/* Fixes unimplemented line buffering for MSC 5.x and 6.0.
+ * MSC _IOLBF is the same as _IOFBF
+ */
+#if defined(MSDOS) && defined (_MSC_VER)
+# undef _IOLBF
+# define _IOLBF _IONBF
+#endif
+
+/* in alloc.h: size_t is redefined
+ * defined in stdio.h which is included by alloc.h
+ */
+#if defined(MSDOS) && defined (_MSC_VER)
+# define _TYPES_
+#endif
+
+/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
+#ifndef SIGQUIT
+# define SIGQUIT SIGTERM
+#endif
+
+/* MSC didn't seem to care about CONST in the past */
+#ifndef CONST
+# define CONST
+#endif
+
+#ifndef MSDOS
+# define MSDOS 1
+#endif
+
+/* a small problem with pointer to voids on some unix machines needs this */
+#define DMPVOID void *
+
+/* Use my own tempnam */
+#define tempnam dtempnam
+
diff --git a/dmake/winnt/microsft/config.mk b/dmake/winnt/microsft/config.mk
new file mode 100644
index 000000000000..352eed716d2f
--- /dev/null
+++ b/dmake/winnt/microsft/config.mk
@@ -0,0 +1,61 @@
+# This is the MSC 4.0 and higher DOS configuration file for DMAKE
+# It simply modifies the values of SRC, and checks to see if
+# OSENVIRONMENT is defined. If so it includes the appropriate
+# config.mk file.
+#
+# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
+# directory.
+#
+osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
+
+TMPDIR :=
+.EXPORT : TMPDIR
+
+# Definition of macros for library, and C startup code.
+
+# The following sources are required for MSC
+OSR_SRC += tempnam.c ruletab.c
+DOS_SRC += runargv.c rmprq.c
+
+.SETDIR=$(osrdir) : $(OSR_SRC)
+.SETDIR=msdos : $(DOS_SRC)
+
+SRC += $(OSR_SRC) $(DOS_SRC)
+.SOURCE.h : $(osrdir)
+
+SET_STACK = /stack:4096
+ASFLAGS += -t -mx $(S_$(MODEL))
+
+# Microsoft C doesn't need tail but needs head
+LDTAIL !=
+LDHEAD != $(LDFLAGS)
+LDARGS != $(LDHEAD) -out:$(TARGET) @$(LDTMPOBJ) $(LDTAIL)
+LDTAIL != $(_libs)
+_libs != $(!null,$(LDLIBS) ,@$(LDTMPLIB))
+LDTMPOBJ != $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"\n")\n)
+LDTMPLIB != $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"\n")\n)
+
+# Debugging libraries and flags
+DB_LDFLAGS += /nologo /co /li /map
+DB_LDLIBS +=
+DB_CFLAGS += -Zi
+
+# NO Debug MSC flags:
+# Set the environment variable MSC_VER to be one of 5.1, 6.0, 8.0 (for VC++4.0)
+# to get these by default when you make dmake using 'dmake'.
+#
+
+NDB_LDFLAGS += /nologo
+CFLAGS += -I$(osrdir)
+
+# See if we modify anything in the lower levels.
+.IF $(OSENVIRONMENT) != $(NULL)
+ .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
+.END
+
+CFLAGS += /nologo
+
+S_s = -Dmsmall
+S_m = -Dmmedium
+S_c = -Dmcompact
+S_l = -Dmlarge
diff --git a/dmake/winnt/microsft/optoff.h b/dmake/winnt/microsft/optoff.h
new file mode 100644
index 000000000000..7dd3cb839572
--- /dev/null
+++ b/dmake/winnt/microsft/optoff.h
@@ -0,0 +1,27 @@
+/* RCS $Id: optoff.h,v 1.1.1.1 2000-09-22 15:33:37 hr Exp $
+--
+-- SYNOPSIS
+-- Turn off microsoft loop optimization.
+--
+-- DESCRIPTION
+-- This is broken in some pre 600 compilers so just turn it off.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+#if _MSC_VER < 600
+# pragma loop_opt(off)
+#endif
diff --git a/dmake/winnt/microsft/ruletab.c b/dmake/winnt/microsft/ruletab.c
new file mode 100644
index 000000000000..ed7686f7b5e0
--- /dev/null
+++ b/dmake/winnt/microsft/ruletab.c
@@ -0,0 +1,45 @@
+/* RCS $Id: ruletab.c,v 1.3 2006-06-29 11:33:07 ihi Exp $
+--
+-- SYNOPSIS
+-- Default initial configuration of dmake.
+--
+-- DESCRIPTION
+-- Define here the initial set of rules that are defined before
+-- dmake performs any processing.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* These are control macros for dmake that MUST be defined at some point
+ * if they are NOT dmake will not work! These are default definitions. They
+ * may be overridden inside the .STARTUP makefile, they are here
+ * strictly so that dmake can parse the STARTUP makefile */
+
+#include <stdio.h>
+
+static char *_rules[] = {
+ "MAXLINELENGTH := 32766",
+ "MAXPROCESSLIMIT := 4",
+ "MAXPROCESS := 1",
+ ".IMPORT .IGNORE: DMAKEROOT"
+ ".MAKEFILES : makefile.mk makefile",
+ ".SOURCE : .NULL",
+#include "startup.h"
+ (char *)NULL };
+
+char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
+
diff --git a/dmake/winnt/microsft/sysintf.h b/dmake/winnt/microsft/sysintf.h
new file mode 100644
index 000000000000..010280bb802b
--- /dev/null
+++ b/dmake/winnt/microsft/sysintf.h
@@ -0,0 +1,57 @@
+/* RCS $Id: sysintf.h,v 1.3 2007-01-18 09:52:02 vg Exp $
+--
+-- SYNOPSIS
+-- Interfaces for sysintf.c
+--
+-- DESCRIPTION
+-- Abstractions of functions in sysintf.c
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#define DMSTAT stat
+#define VOID_LCACHE(l,m)
+#define GETPID _psp
+#define Hook_std_writes(A)
+
+extern char * tempnam();
+extern char * getcwd();
+
+/* for directory cache */
+#define CacheStat(A,B) really_dostat(A,&buf)
+
+/*
+** standard C items
+*/
+
+/*
+** DOS interface standard items
+*/
+#define chdir(p) dchdir(p)
+
+/*
+** make parameters
+*/
+#ifdef _POSIX_NAME_MAX
+#undef _POSIX_NAME_MAX
+#endif
+#define _POSIX_NAME_MAX _MAX_FNAME
+
+#ifdef _POSIX_PATH_MAX
+#undef _POSIX_PATH_MAX
+#endif
+#define _POSIX_PATH_MAX _MAX_PATH
diff --git a/dmake/winnt/microsft/tempnam.c b/dmake/winnt/microsft/tempnam.c
new file mode 100644
index 000000000000..c3a8fa140f29
--- /dev/null
+++ b/dmake/winnt/microsft/tempnam.c
@@ -0,0 +1,110 @@
+/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:37 hr Exp $
+--
+-- SYNOPSIS
+-- tempnam
+--
+-- DESCRIPTION
+-- temp file name generation routines.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/*LINTLIBRARY*/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <process.h>
+
+#if defined(max)
+# undef max
+#endif
+#define max(A,B) (((A)<(B))?(B):(A))
+
+extern char *mktemp();
+extern int access();
+int d_access();
+
+/* MSC stdio.h defines P_tmpdir, so let's undo it here */
+/* Under DOS leave the default tmpdir pointing here! */
+#ifdef P_tmpdir
+#undef P_tmpdir
+#endif
+static char *P_tmpdir = "";
+
+char *
+dtempnam(dir, prefix)
+char *dir; /* use this directory please (if non-NULL) */
+char *prefix; /* use this (if non-NULL) as filename prefix */
+{
+ static int count = 0;
+ register char *p, *q, *tmpdir;
+ int tl=0, dl=0, pl;
+ char buf[30];
+
+ pl = strlen(P_tmpdir);
+
+ if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
+ else if( (tmpdir = getenv("TMP")) != NULL ) tl = strlen(tmpdir);
+ if( dir != NULL ) dl = strlen(dir);
+
+ if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
+ return(NULL);
+
+ *p = '\0';
+
+ if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) )
+ if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) )
+ if( d_access( strcpy(p, P_tmpdir), 0) != 0 )
+ if( !prefix )
+ prefix = "tp";
+
+ if(prefix)
+ {
+ *(p+strlen(p)+2) = '\0';
+ (void)strncat(p, prefix, 2);
+ }
+
+ sprintf( buf, "%08x", getpid() );
+ buf[6]='\0';
+ (void)strcat(p, buf );
+ sprintf( buf, "%04d", count++ );
+ q=p+strlen(p)-6;
+ *q++ = buf[0]; *q++ = buf[1];
+ *q++ = buf[2]; *q++ = buf[3];
+
+ if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
+
+ return(p);
+}
+
+
+
+d_access( name, flag )
+char *name;
+int flag;
+{
+ extern char *DirSepStr;
+ char *p;
+ int r;
+
+ if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
+ r = access( name, flag );
+ p = name+strlen(name)-1;
+ if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
+
+ return( r );
+}
diff --git a/dmake/winnt/microsft/vpp40/config.mk b/dmake/winnt/microsft/vpp40/config.mk
new file mode 100644
index 000000000000..14fe952eac00
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/config.mk
@@ -0,0 +1,14 @@
+# Definition of macros for library, and C startup code.
+osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)
+
+.IMPORT .IGNORE : MSC_VER
+MSC_VER *= 8.0
+
+CFLAGS += -I$(osedir)
+
+NDB_CFLAGS += -Od -GF -Ge
+NDB_LDFLAGS +=
+NDB_LDLIBS +=
+
+# Redefine rule for making our objects, we don't need mv
+%$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
diff --git a/dmake/winnt/microsft/vpp40/lib.rsp b/dmake/winnt/microsft/vpp40/lib.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/lib.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/winnt/microsft/vpp40/mk.bat b/dmake/winnt/microsft/vpp40/mk.bat
new file mode 100755
index 000000000000..22917df5eaee
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/mk.bat
@@ -0,0 +1,32 @@
+md objects
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\infer.obj infer.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\make.obj make.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\stat.obj stat.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\expand.obj expand.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dmstring.obj dmstring.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\hash.obj hash.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dag.obj dag.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dmake.obj dmake.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\path.obj path.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\imacs.obj imacs.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\sysintf.obj sysintf.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\parse.obj parse.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\getinp.obj getinp.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\quit.obj quit.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\state.obj state.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dmdump.obj dmdump.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\macparse.obj macparse.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\rulparse.obj rulparse.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\percent.obj percent.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\function.obj function.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dchdir.obj win95\dchdir.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\switchar.obj win95\switchar.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dstrlwr.obj msdos\dstrlwr.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\arlib.obj msdos\arlib.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\dirbrk.obj msdos\dirbrk.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\tempnam.obj tempnam.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\ruletab.obj win95\microsft\ruletab.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\runargv.obj msdos\runargv.c
+cl -c -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 \nologo -Od -GF -Ge -Foobjects\rmprq.obj msdos\rmprq.c
+rem link /nologo @win95\microsft\vpp40\obj.rsp,dmake.exe,NUL.MAP;
+link /out:dmake.exe @.\win95\microsft\vpp40\obj.rsp
diff --git a/dmake/winnt/microsft/vpp40/mk.cmd b/dmake/winnt/microsft/vpp40/mk.cmd
new file mode 100755
index 000000000000..5fcc801fae91
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/mk.cmd
@@ -0,0 +1,31 @@
+md objects
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\infer.obj infer.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\make.obj make.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\stat.obj stat.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\expand.obj expand.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dmstring.obj dmstring.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\hash.obj hash.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dag.obj dag.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dmake.obj dmake.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\path.obj path.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\imacs.obj imacs.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\sysintf.obj sysintf.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\parse.obj parse.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\getinp.obj getinp.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\quit.obj quit.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\state.obj state.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dmdump.obj dmdump.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\macparse.obj macparse.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\rulparse.obj rulparse.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\percent.obj percent.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\function.obj function.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dchdir.obj winnt\dchdir.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dstrlwr.obj msdos\dstrlwr.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\arlib.obj msdos\arlib.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\dirbrk.obj msdos\dirbrk.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\tempnam.obj winnt\microsft\tempnam.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\ruletab.obj winnt\microsft\ruletab.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\runargv.obj msdos\runargv.c
+cl -c -I. -Iwinnt -Iwinnt\microsft -Iwinnt\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\rmprq.obj msdos\rmprq.c
+link /nologo /out:dmake.exe @fix95nt\winnt\microsft\vpp40\obj.rsp
+copy winnt\microsft\vpp40\template.mk startup\config.mk
diff --git a/dmake/winnt/microsft/vpp40/obj.rsp b/dmake/winnt/microsft/vpp40/obj.rsp
new file mode 100644
index 000000000000..5c00dab6c29c
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/obj.rsp
@@ -0,0 +1,28 @@
+objects\infer.obj
+objects\make.obj
+objects\stat.obj
+objects\expand.obj
+objects\dmstring.obj
+objects\hash.obj
+objects\dag.obj
+objects\dmake.obj
+objects\path.obj
+objects\imacs.obj
+objects\sysintf.obj
+objects\parse.obj
+objects\getinp.obj
+objects\quit.obj
+objects\state.obj
+objects\dmdump.obj
+objects\macparse.obj
+objects\rulparse.obj
+objects\percent.obj
+objects\function.obj
+objects\dchdir.obj
+objects\dstrlwr.obj
+objects\arlib.obj
+objects\dirbrk.obj
+objects\tempnam.obj
+objects\ruletab.obj
+objects\runargv.obj
+objects\rmprq.obj
diff --git a/dmake/winnt/microsft/vpp40/public.h b/dmake/winnt/microsft/vpp40/public.h
new file mode 100644
index 000000000000..ffbe4e463560
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/public.h
@@ -0,0 +1,167 @@
+/* RCS $Id: public.h,v 1.9 2007-10-15 15:59:48 ihi Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+int main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+void Do_profile_output ANSI((char *, uint16, CELLPTR));
+int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, int));
+char ** Pack_argv ANSI((int, int, char **));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)(int)));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI((int));
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int dchdir ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, t_attr, char **));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+void Remove_prq ANSI((CELLPTR));
+
+#endif
diff --git a/dmake/winnt/microsft/vpp40/runargv.c b/dmake/winnt/microsft/vpp40/runargv.c
new file mode 100644
index 000000000000..9042dfc80a47
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/runargv.c
@@ -0,0 +1,288 @@
+Blake sent me the wrong one.
+
+/* RCS $Id: runargv.c,v 1.2 2007-10-15 16:00:01 ihi Exp $
+--
+-- SYNOPSIS
+-- Invoke a sub process.
+--
+-- DESCRIPTION
+-- Use the standard methods of executing a sub process.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include <process.h>
+#include <errno.h>
+#include <signal.h>
+#include "extern.h"
+#include "sysintf.h"
+
+extern char **environ;
+
+typedef struct prp {
+ char *prp_cmd;
+ int prp_group;
+ int prp_ignore;
+ int prp_last;
+ int prp_shell;
+ struct prp *prp_next;
+} RCP, *RCPPTR;
+
+typedef struct pr {
+ int pr_valid;
+ int pr_pid;
+ CELLPTR pr_target;
+ int pr_ignore;
+ int pr_last;
+ RCPPTR pr_recipe;
+ RCPPTR pr_recipe_end;
+ char *pr_dir;
+} PR;
+
+static PR *_procs = NIL(PR);
+static int _proc_cnt = 0;
+static int _abort_flg= FALSE;
+static int _use_i = -1;
+static int _do_upd = 0;
+
+static void _add_child ANSI((int, CELLPTR, int, int));
+static void _attach_cmd ANSI((char *, int, int, CELLPTR, int, int));
+static void _finished_child ANSI((int, int));
+static int _running ANSI((CELLPTR));
+
+PUBLIC int
+runargv(target, ignore, group, last, shell, cmd)
+CELLPTR target;
+int ignore;
+int group;
+int last;
+int shell;
+char *cmd;
+{
+ extern int errno;
+ extern char *sys_errlist[];
+ int pid;
+ char **argv;
+
+ if( _running(target) /*&& Max_proc != 1*/ ) {
+ /* The command will be executed when the previous recipe
+ * line completes. */
+ _attach_cmd( cmd, group, ignore, target, last, shell );
+ return(1);
+ }
+
+ while( _proc_cnt == Max_proc )
+ if( Wait_for_child(FALSE, -1) == -1 ) Fatal( "Lost a child %d", errno );
+
+ argv = Pack_argv( group, shell, cmd );
+
+ pid = _spawnvpe(_P_NOWAIT, argv[0], argv, environ);
+ if (pid == -1) { /* failed */
+ Error("%s: %s", argv[0], sys_errlist[errno]);
+ Handle_result(-1, ignore, _abort_flg, target);
+ return(-1);
+ } else
+ _add_child(pid, target, ignore, last);
+
+ return(1);
+}
+
+
+PUBLIC int
+Wait_for_child( abort_flg, pid )
+int abort_flg;
+int pid;
+{
+ int wid;
+ int status;
+ int waitchild;
+
+ waitchild = (pid == -1)? FALSE : Wait_for_completion;
+
+ do {
+ if( (wid = wait(&status)) == -1 ) return(-1);
+
+ _abort_flg = abort_flg;
+ _finished_child(wid, status);
+ _abort_flg = FALSE;
+ } while( waitchild && pid != wid );
+
+ return(0);
+}
+
+
+PUBLIC void
+Clean_up_processes()
+{
+ register int i;
+
+ if( _procs != NIL(PR) ) {
+ for( i=0; i<Max_proc; i++ )
+ if( _procs[i].pr_valid )
+ kill(_procs[i].pr_pid, SIGTERM);
+
+ while( Wait_for_child(TRUE, -1) != -1 );
+ }
+}
+
+
+static void
+_add_child( pid, target, ignore, last )
+int pid;
+CELLPTR target;
+int ignore;
+int last;
+{
+ register int i;
+ register PR *pp;
+
+ if( _procs == NIL(PR) ) {
+ TALLOC( _procs, Max_proc, PR );
+ }
+
+ if( (i = _use_i) == -1 )
+ for( i=0; i<Max_proc; i++ )
+ if( !_procs[i].pr_valid )
+ break;
+
+ pp = _procs+i;
+
+ pp->pr_valid = 1;
+ pp->pr_pid = pid;
+ pp->pr_target = target;
+ pp->pr_ignore = ignore;
+ pp->pr_last = last;
+ pp->pr_dir = DmStrDup(Get_current_dir());
+
+ Current_target = NIL(CELL);
+
+ _proc_cnt++;
+
+ if( Wait_for_completion ) Wait_for_child( FALSE, pid );
+}
+
+
+static void
+_finished_child(pid, status)
+int pid;
+int status;
+{
+ register int i;
+ register PR *pp;
+ char *dir;
+
+ for( i=0; i<Max_proc; i++ )
+ if( _procs[i].pr_valid && _procs[i].pr_pid == pid )
+ break;
+
+ /* Some children we didn't make esp true if using /bin/sh to execute a
+ * a pipe and feed the output as a makefile into dmake. */
+ if( i == Max_proc ) return;
+ _procs[i].pr_valid = 0;
+ _proc_cnt--;
+ dir = DmStrDup(Get_current_dir());
+ Set_dir( _procs[i].pr_dir );
+
+ if( _procs[i].pr_recipe != NIL(RCP) && !_abort_flg ) {
+ RCPPTR rp = _procs[i].pr_recipe;
+
+
+ Current_target = _procs[i].pr_target;
+ Handle_result( status, _procs[i].pr_ignore, FALSE, _procs[i].pr_target );
+ Current_target = NIL(CELL);
+
+ if ( _procs[i].pr_target->ce_attr & A_ERROR ) {
+ _procs[i].pr_last = TRUE;
+ goto ABORT_REMAINDER_OF_RECIPE;
+ }
+
+ _procs[i].pr_recipe = rp->prp_next;
+
+ _use_i = i;
+ runargv( _procs[i].pr_target, rp->prp_ignore, rp->prp_group,
+ rp->prp_last, rp->prp_shell, rp->prp_cmd );
+ _use_i = -1;
+
+ FREE( rp->prp_cmd );
+ FREE( rp );
+
+ if( _proc_cnt == Max_proc ) Wait_for_child( FALSE, -1 );
+ }
+ else {
+ Handle_result(status,_procs[i].pr_ignore,_abort_flg,_procs[i].pr_target);
+
+ ABORT_REMAINDER_OF_RECIPE:
+ if( _procs[i].pr_last ) {
+ FREE(_procs[i].pr_dir );
+
+ if( !Doing_bang ) Update_time_stamp( _procs[i].pr_target );
+ }
+ }
+
+ Set_dir(dir);
+ FREE(dir);
+}
+
+
+static int
+_running( cp )
+CELLPTR cp;
+{
+ register int i;
+
+ if( !_procs ) return(FALSE);
+
+ for( i=0; i<Max_proc; i++ )
+ if( _procs[i].pr_valid &&
+ _procs[i].pr_target == cp )
+ break;
+
+ return( i != Max_proc );
+}
+
+
+static void
+_attach_cmd( cmd, group, ignore, cp, last, shell )
+char *cmd;
+int group;
+int ignore;
+CELLPTR cp;
+int last;
+int shell;
+{
+ register int i;
+ RCPPTR rp;
+
+ for( i=0; i<Max_proc; i++ )
+ if( _procs[i].pr_valid &&
+ _procs[i].pr_target == cp )
+ break;
+
+ TALLOC( rp, 1, RCP );
+ rp->prp_cmd = DmStrDup(cmd);
+ rp->prp_group = group;
+ rp->prp_ignore= ignore;
+ rp->prp_last = last;
+ rp->prp_shell = shell;
+
+ if( _procs[i].pr_recipe == NIL(RCP) )
+ _procs[i].pr_recipe = _procs[i].pr_recipe_end = rp;
+ else {
+ _procs[i].pr_recipe_end->prp_next = rp;
+ _procs[i].pr_recipe_end = rp;
+ }
+}
diff --git a/dmake/winnt/microsft/vpp40/template.mk b/dmake/winnt/microsft/vpp40/template.mk
new file mode 100644
index 000000000000..e53922df68c3
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/template.mk
@@ -0,0 +1,7 @@
+# ** Default build configuration for dmake.
+# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED
+# ** USE "startup/local.mk" for those.
+
+ OS *:= winnt
+ OSRELEASE *:= microsft
+ OSENVIRONMENT *:= vpp40
diff --git a/dmake/winnt/microsft/vpp40/tempnam.c b/dmake/winnt/microsft/vpp40/tempnam.c
new file mode 100644
index 000000000000..c27da47c7602
--- /dev/null
+++ b/dmake/winnt/microsft/vpp40/tempnam.c
@@ -0,0 +1,110 @@
+/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:37 hr Exp $
+--
+-- SYNOPSIS
+-- tempnam
+--
+-- DESCRIPTION
+-- temp file name generation routines.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/*LINTLIBRARY*/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <dos.h>
+
+#if defined(max)
+# undef max
+#endif
+#define max(A,B) (((A)<(B))?(B):(A))
+
+extern char *mktemp();
+extern int access();
+int d_access();
+
+/* MSC stdio.h defines P_tmpdir, so let's undo it here */
+/* Under DOS leave the default tmpdir pointing here! */
+#ifdef P_tmpdir
+#undef P_tmpdir
+#endif
+static char *P_tmpdir = "";
+
+char *
+tempnam(dir, prefix)
+char *dir; /* use this directory please (if non-NULL) */
+char *prefix; /* use this (if non-NULL) as filename prefix */
+{
+ static int count = 0;
+ register char *p, *q, *tmpdir;
+ int tl=0, dl=0, pl;
+ char buf[30];
+
+ pl = strlen(P_tmpdir);
+
+ if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
+ else if( (tmpdir = getenv("TMP")) != NULL ) tl = strlen(tmpdir);
+ if( dir != NULL ) dl = strlen(dir);
+
+ if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
+ return(NULL);
+
+ *p = '\0';
+
+ if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) )
+ if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) )
+ if( d_access( strcpy(p, P_tmpdir), 0) != 0 )
+ if( !prefix )
+ prefix = "tp";
+
+ if(prefix)
+ {
+ *(p+strlen(p)+2) = '\0';
+ (void)strncat(p, prefix, 2);
+ }
+
+ sprintf( buf, "%08x", _psp );
+ buf[6]='\0';
+ (void)strcat(p, buf );
+ sprintf( buf, "%04d", count++ );
+ q=p+strlen(p)-6;
+ *q++ = buf[0]; *q++ = buf[1];
+ *q++ = buf[2]; *q++ = buf[3];
+
+ if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
+
+ return(p);
+}
+
+
+
+d_access( name, flag )
+char *name;
+int flag;
+{
+ extern char *DirSepStr;
+ char *p;
+ int r;
+
+ if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
+ r = access( name, flag );
+ p = name+strlen(name)-1;
+ if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
+
+ return( r );
+}
diff --git a/dmake/winnt/mingw/public.h b/dmake/winnt/mingw/public.h
new file mode 100644
index 000000000000..303b1ff65a96
--- /dev/null
+++ b/dmake/winnt/mingw/public.h
@@ -0,0 +1,167 @@
+/* RCS $Id: public.h,v 1.7 2007-10-15 16:00:18 ihi Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+int main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+void Do_profile_output ANSI((char *, uint16, CELLPTR));
+int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, int));
+char ** Pack_argv ANSI((int, int, char **));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)(int)));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI((int));
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int dchdir ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, t_attr, char **));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+void Remove_prq ANSI((CELLPTR));
+
+#endif
diff --git a/dmake/winnt/mingw/sysintf.h b/dmake/winnt/mingw/sysintf.h
new file mode 100644
index 000000000000..06aec476fe90
--- /dev/null
+++ b/dmake/winnt/mingw/sysintf.h
@@ -0,0 +1,62 @@
+/* RCS $Id: sysintf.h,v 1.4 2007-01-18 09:53:01 vg Exp $
+--
+-- SYNOPSIS
+-- Interfaces for sysintf.c
+--
+-- DESCRIPTION
+-- Abstractions of functions in sysintf.c
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#define DMSTAT stat
+#define VOID_LCACHE(l,m)
+#define GETPID _psp
+#define Hook_std_writes(A)
+
+extern char * tempnam();
+extern char * getcwd();
+
+/* for directory cache */
+#define CacheStat(A,B) really_dostat(A,&buf)
+
+/*
+** standard C items
+*/
+
+/*
+** DOS interface standard items
+*/
+#define chdir(p) dchdir(p)
+
+/* in sysintf.c: SIGQUIT is used, this is not defined in MinGW */
+#ifndef SIGQUIT
+# define SIGQUIT SIGTERM
+#endif
+
+/*
+** make parameters
+*/
+#ifdef _POSIX_NAME_MAX
+#undef _POSIX_NAME_MAX
+#endif
+#define _POSIX_NAME_MAX _MAX_FNAME
+
+#ifdef _POSIX_PATH_MAX
+#undef _POSIX_PATH_MAX
+#endif
+#define _POSIX_PATH_MAX _MAX_PATH
diff --git a/dmake/winnt/msvc6/public.h b/dmake/winnt/msvc6/public.h
new file mode 100644
index 000000000000..c10f7a23468e
--- /dev/null
+++ b/dmake/winnt/msvc6/public.h
@@ -0,0 +1,167 @@
+/* RCS $Id: public.h,v 1.7 2007-10-15 16:00:31 ihi Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+int main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+void Do_profile_output ANSI((char *, uint16, CELLPTR));
+int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, int));
+char ** Pack_argv ANSI((int, int, char **));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)(int)));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI((int));
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int dchdir ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, t_attr, char **));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+void Remove_prq ANSI((CELLPTR));
+
+#endif
diff --git a/dmake/winnt/msvc6/sysintf.h b/dmake/winnt/msvc6/sysintf.h
new file mode 100644
index 000000000000..631e0fc2d80a
--- /dev/null
+++ b/dmake/winnt/msvc6/sysintf.h
@@ -0,0 +1,62 @@
+/* RCS $Id: sysintf.h,v 1.3 2007-01-18 09:53:49 vg Exp $
+--
+-- SYNOPSIS
+-- Interfaces for sysintf.c
+--
+-- DESCRIPTION
+-- Abstractions of functions in sysintf.c
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#define DMSTAT stat
+#define VOID_LCACHE(l,m)
+#define GETPID _psp
+#define Hook_std_writes(A)
+
+extern char * tempnam();
+extern char * getcwd();
+
+/* for directory cache */
+#define CacheStat(A,B) really_dostat(A,&buf)
+
+/*
+** standard C items
+*/
+
+/*
+** DOS interface standard items
+*/
+#define chdir(p) dchdir(p)
+
+/* in sysintf.c: SIGQUIT is used, this is not defined in MinGW */
+#ifndef SIGQUIT
+# define SIGQUIT SIGTERM
+#endif
+
+/*
+** make parameters
+*/
+#ifdef _POSIX_NAME_MAX
+#undef _POSIX_NAME_MAX
+#endif
+#define _POSIX_NAME_MAX 12
+
+#ifdef _POSIX_PATH_MAX
+#undef _POSIX_PATH_MAX
+#endif
+#define _POSIX_PATH_MAX _MAX_PATH
diff --git a/dmake/winnt/startup.h b/dmake/winnt/startup.h
new file mode 100644
index 000000000000..18f48cfd9bde
--- /dev/null
+++ b/dmake/winnt/startup.h
@@ -0,0 +1,29 @@
+/* RCS $Id: startup.h,v 1.2 2006-04-20 12:25:19 hr Exp $
+--
+-- SYNOPSIS
+-- Definition of MAKESTARTUP
+--
+-- DESCRIPTION
+-- Default MAKESTARTUP value defining where dmake locates the
+-- startup file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file <distribution-root>/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+"DMAKEROOT *= $(ABSMAKECMD:d)startup",
+"MAKESTARTUP := $(DMAKEROOT)\\startup.mk",
+