diff --git a/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h b/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h index 3efdc272e9c846083da871148e3b39d8c55e4d5f..5085028c2239c8c34e51897c338a3ed3cf14d169 100644 --- a/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h +++ b/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h @@ -30,6 +30,8 @@ extern "C" { #endif +#include + #include "java_awt_AlphaComposite.h" #include "SurfaceData.h" @@ -484,7 +486,9 @@ extern struct _CompositeTypes { #define ArraySize(A) (sizeof(A) / sizeof(A[0])) #define PtrAddBytes(p, b) ((void *) (((intptr_t) (p)) + (b))) -#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, (y)*(yinc) + (x)*(xinc)) +#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, \ + ((ptrdiff_t)(y))*(yinc) + \ + ((ptrdiff_t)(x))*(xinc)) /* * The function to call with an array of NativePrimitive structures