Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DBlitLoops.cpp
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DBlitLoops.cpp	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DBlitLoops.cpp	(revision 185)
@@ -110,4 +110,5 @@
                           tx1, ty1, tx2, ty2);
 
+#ifndef __WIN32OS2__
     if (hint == D3DSD_XFORM_BILINEAR) {
         d3dDevice->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR);
@@ -117,4 +118,5 @@
         d3dDevice->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFG_POINT);
     }
+#endif
 
     HRESULT res;
Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DContext.h
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DContext.h	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DContext.h	(revision 185)
@@ -341,5 +341,9 @@
 // - Various vertex formats -------------------------------------------
 
+#ifdef __WIN32OS2__
+#define D3DFVF_J2DLVERTEX D3DVT_LVERTEX
+#else
 #define D3DFVF_J2DLVERTEX (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1)
+#endif
 typedef struct _J2DLVERTEX {
     float x, y, z;
Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DUtils.h
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DUtils.h	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/d3d/D3DUtils.h	(revision 185)
@@ -135,12 +135,12 @@
             break; \
         } else if (RES == DDERR_SURFACEBUSY || RES == DDERR_WASSTILLDRAWING) { \
-            J2dTraceLn(J2D_TRACE_VERBOSE, #PRIM ## ": surface is busy."); \
+            J2dTraceLn(J2D_TRACE_VERBOSE, PRIM ": surface is busy."); \
             continue; \
         } else if (RES == DDERR_SURFACELOST) { \
-            J2dTraceLn(J2D_TRACE_INFO, #PRIM ## ": dest surface lost."); \
+            J2dTraceLn(J2D_TRACE_INFO, PRIM ": dest surface lost."); \
             DST_WSDO->RestoreSurface(ENV, DST_WSDO); \
             break; \
         } else { \
-            DebugPrintDirectDrawError(RES, #PRIM); \
+            DebugPrintDirectDrawError(RES, PRIM); \
         } \
      } \
@@ -152,18 +152,18 @@
             break; \
         } else if (RES == DDERR_SURFACEBUSY || RES == DDERR_WASSTILLDRAWING) { \
-            J2dTraceLn(J2D_TRACE_VERBOSE, #PRIM ## ": surface is busy."); \
+            J2dTraceLn(J2D_TRACE_VERBOSE, PRIM ": surface is busy."); \
             continue; \
         } else if (RES == DDERR_SURFACELOST) { \
             if (FAILED((DST_WSDO)->lpSurface->IsLost())) { \
-                J2dTraceLn(J2D_TRACE_INFO, #PRIM ## ": dst surface lost."); \
+                J2dTraceLn(J2D_TRACE_INFO, PRIM ": dst surface lost."); \
                 (DST_WSDO)->RestoreSurface(ENV, (DST_WSDO)); \
             } \
             if (FAILED((SRC_WSDO)->lpSurface->IsLost())) { \
-                J2dTraceLn(J2D_TRACE_INFO, #PRIM ## ": src surface lost."); \
+                J2dTraceLn(J2D_TRACE_INFO, PRIM ": src surface lost."); \
                 (SRC_WSDO)->RestoreSurface(ENV, (SRC_WSDO)); \
             } \
             break; \
         } else { \
-            DebugPrintDirectDrawError(RES, #PRIM); \
+            DebugPrintDirectDrawError(RES, PRIM); \
         } \
      } \
Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/RegistryKey.cpp
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/RegistryKey.cpp	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/RegistryKey.cpp	(revision 185)
@@ -57,4 +57,8 @@
 #include <windows.h>
 #include <stdio.h>
+#ifdef __WIN32OS2__
+#include <minivcrt.h>
+#endif
+
 #include "Trace.h"
 #include "WindowsFlags.h"
Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.h
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.h	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.h	(revision 185)
@@ -77,4 +77,5 @@
 #define IDirect3DDevice7    IDirect3DDevice2
 #define D3DDEVICEDESC7      D3DDEVICEDESC
+#define LPD3DDEVICEDESC7    LPD3DDEVICEDESC
 #endif
 
Index: /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/dxInit.cpp
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/dxInit.cpp	(revision 184)
+++ /trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/dxInit.cpp	(revision 185)
@@ -31,4 +31,8 @@
 #include "WindowsFlags.h"
 #include "Devices.h"
+
+#ifdef __WIN32OS2__
+#include <minivcrt.h>
+#endif
 
 /**
@@ -572,4 +576,7 @@
  */
 BOOL DDCreateObject() {
+#ifdef __WIN32OS2__
+    typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
+#endif
     LPDIRECTDRAWENUMERATEEXA lpDDEnum;
 
