pkgsrc/graphics/imlib2/patches/patch-ae
tv 0f8b64736d Use my_lround() on Interix too.
Add minimalist #ifndef blocks to rip out XShm support on Interix.
2005-11-04 20:11:47 +00:00

45 lines
1.4 KiB
Text

$NetBSD: patch-ae,v 1.4 2005/11/04 20:11:47 tv Exp $
--- src/lib/ximage.c.orig 2004-11-01 04:39:42.000000000 -0500
+++ src/lib/ximage.c
@@ -81,8 +81,10 @@ __imlib_FlushXImage(Display * d)
xim = list_xim[i];
list_mem_use -= xim->bytes_per_line * xim->height;
+#ifndef __INTERIX
if (list_si[i])
XShmDetach(d, list_si[i]);
+#endif /* !__INTERIX */
XDestroyImage(xim);
if (list_si[i])
{
@@ -163,11 +165,13 @@ __imlib_ProduceXImage(Display * d, Visua
/* if we havent check the shm extension before - see if its there */
if (x_does_shm < 0)
{
+#ifndef __INTERIX
/* if its there set dose_xhm flag */
if (XShmQueryExtension(d))
x_does_shm = 1;
/* clear the flag - no shm at all */
else
+#endif
x_does_shm = 0;
}
/* find a cached XImage (to avoid server to & fro) that is big enough */
@@ -219,6 +223,7 @@ __imlib_ProduceXImage(Display * d, Visua
/* work on making a shared image */
xim = NULL;
+#ifndef __INTERIX
/* if the server does shm */
if (x_does_shm)
{
@@ -301,6 +306,7 @@ __imlib_ProduceXImage(Display * d, Visua
}
}
}
+#endif /* !__INTERIX */
/* ok if xim == NULL it all failed - fall back to XImages */
if (!xim)
{