openbsd-ports/x11/olvwm/patches/patch-pixmap_c
2004-01-28 20:58:53 +00:00

44 lines
1.2 KiB
Plaintext

$OpenBSD: patch-pixmap_c,v 1.1 2004/01/28 20:58:54 naddy Exp $
--- pixmap.c.orig 1994-01-13 22:36:12.000000000 +0100
+++ pixmap.c 2004-01-28 21:49:10.000000000 +0100
@@ -4,7 +4,7 @@
*/
#ifdef IDENT
-#ident "%W% olvwm version %G%"
+#ident "@(#)pixmap.c 1.3 olvwm version 09 Feb 1994"
#endif
/*
@@ -20,8 +20,20 @@
#include <X11/XWDFile.h>
#ifdef XPM
-#include <xpm.h>
-#endif
+#ifndef NO_PIXEL_FIX
+/* The problem with xpm.h is that it includes <X11/Intrinsic.h> to get
+ * the typedef for Pixel. Intrinsic.h, however, also typedefs Boolean
+ * (to char). This causes the compiler to fail on the Boolean typedef
+ * in <olgx/olgx.h> (which is, of course, also char). <olgx/olgx.h> is
+ * included within "win.h".
+ * This kludge typedefs Pixel and defines _XtIntrinsic_h so that the
+ * real Intrinsic.h does not get included.
+ */
+#define _XtIntrinsic_h
+typedef unsigned long Pixel; /* Index into colormap */
+#endif /* NO_PIXEL_FIX */
+#include <X11/xpm.h>
+#endif XPM
#include "i18n.h"
#include <olgx/olgx.h>
@@ -159,6 +171,7 @@ XColor **colors;
}
FreePixmapColors(dpy, ncolors, colors, colormap)
+ Display *dpy;
int ncolors;
XColor *colors;
Colormap *colormap;