jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h
changeset 10086 a6dbbf4eb30f
parent 7668 d4a77089c587
child 16862 247af361e9ca
--- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Tue Jul 19 14:09:25 2011 -0700
+++ b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Wed Jul 20 16:18:08 2011 +0400
@@ -30,6 +30,8 @@
 extern "C" {
 #endif
 
+#include <stddef.h>
+
 #include "java_awt_AlphaComposite.h"
 
 #include "SurfaceData.h"
@@ -484,7 +486,9 @@
 #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