Index: dmake/dag.c =================================================================== RCS file: /cvs/tools/dmake/dag.c,v retrieving revision 1.11.2.1 diff -u -r1.11.2.1 dag.c --- dmake/dag.c 11 Nov 2007 23:05:48 -0000 1.11.2.1 +++ dmake/dag.c 11 Nov 2007 23:53:21 -0000 @@ -28,10 +28,6 @@ #include "extern.h" -#if defined(USE_CREATEPROCESS) -#include -#endif - static void set_macro_value(hp)/* Index: dmake/extern.h =================================================================== RCS file: /cvs/tools/dmake/extern.h,v retrieving revision 1.12.2.2 diff -u -r1.12.2.2 extern.h --- dmake/extern.h 11 Nov 2007 23:05:48 -0000 1.12.2.2 +++ dmake/extern.h 11 Nov 2007 23:53:22 -0000 @@ -29,6 +29,12 @@ #ifndef EXTERN_h #define EXTERN_h +/* For MSVC++ needs to include windows.h first to avoid problems with + * type redefinitions. Include it also for MinGW for consistency. */ +#if defined(__MINGW32__) || defined(_MSC_VER) +#include +#endif + #include "config.h" /* Define this for the RS/6000 if it breaks something then we have to put a Index: dmake/imacs.c =================================================================== RCS file: /cvs/tools/dmake/imacs.c,v retrieving revision 1.8.2.1 diff -u -r1.8.2.1 imacs.c --- dmake/imacs.c 11 Nov 2007 23:05:48 -0000 1.8.2.1 +++ dmake/imacs.c 11 Nov 2007 23:53:22 -0000 @@ -28,10 +28,6 @@ #include "extern.h" -#if defined(USE_CREATEPROCESS) -#include -#endif - static void _set_int_var ANSI((char *, char *, int, int *)); static void _set_string_var ANSI((char *, char *, int, char **)); static void _set_bit_var ANSI((char *, char *, int)); Index: dmake/sysintf.c =================================================================== RCS file: /cvs/tools/dmake/sysintf.c,v retrieving revision 1.12.2.2 diff -u -r1.12.2.2 sysintf.c --- dmake/sysintf.c 11 Nov 2007 23:05:48 -0000 1.12.2.2 +++ dmake/sysintf.c 11 Nov 2007 23:53:22 -0000 @@ -61,10 +61,9 @@ #include "extern.h" -/* The following include file is only needed for GetModuleFileName() */ +/* The following definition controls the use of GetModuleFileName() */ #if defined(_MSC_VER) || defined(__MINGW32__) # define HAVE_GETMODULEFILENAMEFUNC 1 -# include /* this is needed for the _ftime call below. Only needed here. */ # include Index: dmake/unix/runargv.c =================================================================== RCS file: /cvs/tools/dmake/unix/runargv.c,v retrieving revision 1.13.2.2 diff -u -r1.13.2.2 runargv.c --- dmake/unix/runargv.c 11 Nov 2007 23:05:49 -0000 1.13.2.2 +++ dmake/unix/runargv.c 11 Nov 2007 23:53:22 -0000 @@ -112,10 +112,6 @@ #include "extern.h" -#if defined(USE_CREATEPROCESS) -#include -#endif - #ifdef HAVE_WAIT_H # include #else Index: dmake/win95/microsft/config.mk =================================================================== RCS file: /cvs/tools/dmake/win95/microsft/config.mk,v retrieving revision 1.2 diff -u -r1.2 config.mk --- dmake/win95/microsft/config.mk 20 Apr 2006 12:24:24 -0000 1.2 +++ dmake/win95/microsft/config.mk 11 Nov 2007 23:53:22 -0000 @@ -15,10 +15,12 @@ # The following sources are required for MSC OSR_SRC += ruletab.c -DOS_SRC += runargv.c rmprq.c +DOS_SRC += rmprq.c +UNX_SRC += runargv.c .SETDIR=$(osrdir) : $(OSR_SRC) .SETDIR=msdos : $(DOS_SRC) +.SETDIR=unix : $(UNX_SRC) SRC += $(OSR_SRC) $(DOS_SRC) .SOURCE.h : $(osrdir) Index: dmake/win95/microsft/ruletab.c =================================================================== RCS file: /cvs/tools/dmake/win95/microsft/ruletab.c,v retrieving revision 1.4.26.1 diff -u -r1.4.26.1 ruletab.c --- dmake/win95/microsft/ruletab.c 11 Nov 2007 23:05:49 -0000 1.4.26.1 +++ dmake/win95/microsft/ruletab.c 11 Nov 2007 23:53:22 -0000 @@ -31,9 +31,6 @@ #include "extern.h" -#if defined(USE_CREATEPROCESS) -#include -#endif #if !defined(MAXIMUM_WAIT_OBJECTS) #define MAXIMUM_WAIT_OBJECTS 1 #endif Index: dmake/win95/microsft/vpp40/mk.bat =================================================================== RCS file: /cvs/tools/dmake/win95/microsft/vpp40/mk.bat,v retrieving revision 1.4 diff -u -r1.4 mk.bat --- dmake/win95/microsft/vpp40/mk.bat 20 Apr 2006 12:24:58 -0000 1.4 +++ dmake/win95/microsft/vpp40/mk.bat 11 Nov 2007 23:53:22 -0000 @@ -31,7 +31,7 @@ rem Not needed for MSVC 6 and up. Lesser versions not supported rem cl -c %c_flg% -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\tempnam.obj tempnam.c cl -c %c_flg% -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\ruletab.obj win95\microsft\ruletab.c -cl -c %c_flg% -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\runargv.obj msdos\runargv.c +cl -c %c_flg% -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\runargv.obj unix\runargv.c cl -c %c_flg% -I. -Iwin95 -Iwin95\microsft -Iwin95\microsft\vpp40 /nologo -Od -GF -Ge -Foobjects\rmprq.obj msdos\rmprq.c :link