diff --git a/graphics/path.c b/graphics/path.c
index 6e174fc35de4741132bba8d038fa4164eed3ecf5..49b049c30ea5e3781a2ee0cdfe067b0ab5d149d6 100644
--- a/graphics/path.c
+++ b/graphics/path.c
@@ -8,6 +8,10 @@
 #include <malloc.h>
 #include <math.h>
 #include <string.h>
+#include "config.h"
+#if defined(HAVE_FLOAT_H)
+#include <float.h>
+#endif
 
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/graphics/psdrv/graphics.c b/graphics/psdrv/graphics.c
index 97d3bc7ad28b4a1d87f09ccca6d37b05242a04b3..a7f970e63668a5424a193ad682f55f9a88645b4a 100644
--- a/graphics/psdrv/graphics.c
+++ b/graphics/psdrv/graphics.c
@@ -6,12 +6,16 @@
  */
 #include <string.h>
 #include <math.h>
+#include "config.h"
+#if defined(HAVE_FLOAT_H)
+ #include <float.h>
+#endif
+#if !defined(PI)
+ #define PI M_PI
+#endif
 #include "psdrv.h"
 #include "debug.h"
 #include "winspool.h"
-#ifndef PI
-#define PI M_PI
-#endif
 
 /**********************************************************************
  *	     PSDRV_MoveToEx
diff --git a/include/sig_context.h b/include/sig_context.h
index cd4618705293036edaae3a56a2272fb9a8c254b1..1c43d948c50449a64387090a843c3ee464eaee44 100644
--- a/include/sig_context.h
+++ b/include/sig_context.h
@@ -98,8 +98,6 @@ typedef struct ucontext SIGCONTEXT;
 #endif  /* svr4 || SCO_DS */
 
 #ifdef __EMX__
-typedef unsigned long ULONG;
-typedef unsigned short USHORT;
 typedef struct _fpreg		/* Note 1 */
 {
   ULONG	 losig;
diff --git a/tools/make_os2.cmd b/tools/make_os2.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..ec0cc541eec2d34062c786e3aaad50717950b16e
--- /dev/null
+++ b/tools/make_os2.cmd
@@ -0,0 +1,13 @@
+@echo off
+rem #!/bin/sh
+rem GCCLOAD not needed, but recommended...
+rem set GCCLOAD=5
+set MAKE=make
+set CC=gcc
+set CFLAGS=-O2 -Zmtd -D__ST_MT_ERRNO__
+set YACC=bison -y
+set LEX=flex -olex.yy.c
+set RANLIB=ar -s
+set PROGEXT=.exe
+rem export CC CFLAGS YACC LEX RANLIB PROGEXT
+sh configure --x-includes=%X11ROOT%/XFree86/include -x-libraries=%X11ROOT%/XFree86/lib
diff --git a/tools/make_os2.sh b/tools/make_os2.sh
deleted file mode 100644
index 10519705d93c3aa668a2a47119b88bdd698722bf..0000000000000000000000000000000000000000
--- a/tools/make_os2.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# GCCLOAD not needed, but recommended...
-#GCCLOAD=5
-CC=gcc
-CFLAGS="-O2 -Zmtd -D__ST_MT_ERRNO__"
-YACC="bison -y"
-LEX="flex -olex.yy.c"
-RANLIB="ar -s"
-PROGEXT=".exe"
-export CC CFLAGS YACC LEX RANLIB PROGEXT
-./configure --x-includes=$X11ROOT/XFree86/include -x-libraries=$X11ROOT/XFree86/lib