summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPär Lidberg <par.lidberg@elekta.com>2011-10-03 00:24:06 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-03 00:24:06 -0700
commit7d88d8ab44b17247753f7225a1d8133d55d8423e (patch)
tree1733d63c875f18067706087b176e64f937aed83f
parent95315108d25d0a17aef488e2bd4df8e98415d5d7 (diff)
Fix LP64 bug
https://bugs.freedesktop.org/show_bug.cgi?id=14321 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--multiVis.c7
-rw-r--r--wsutils.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/multiVis.c b/multiVis.c
index 7ac5780..086aacd 100644
--- a/multiVis.c
+++ b/multiVis.c
@@ -38,6 +38,7 @@ from The Open Group.
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
+#include <X11/Intrinsic.h>
#include <stdio.h>
#include "list.h"
#include "wsutils.h"
@@ -1088,10 +1089,10 @@ int GetXVisualInfo(/* Which X server (aka "display"). */
* do-while loop makes sure we get the entire list from the X server.
*/
bytesAfter = 0;
- numLongs = sizeof(OverlayVisualPropertyRec) / 4;
+ numLongs = sizeof(OverlayVisualPropertyRec) / sizeof(long);
do
{
- numLongs += bytesAfter * 4;
+ numLongs += bytesAfter * sizeof(long);
XGetWindowProperty(display, RootWindow(display, screen),
overlayVisualsAtom, 0, numLongs, False,
overlayVisualsAtom, &actualType, &actualFormat,
@@ -1100,7 +1101,7 @@ int GetXVisualInfo(/* Which X server (aka "display"). */
/* Calculate the number of overlay visuals in the list. */
- *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / 4);
+ *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / sizeof(long));
}
else
{
diff --git a/wsutils.h b/wsutils.h
index 26b4469..67aba90 100644
--- a/wsutils.h
+++ b/wsutils.h
@@ -49,7 +49,7 @@ typedef struct
VisualID visualID; /* The VisualID of the overlay visual */
int transparentType; /* Can be None, TransparentPixel or
* TransparentMask */
- int value; /* Pixel value */
+ Pixel value; /* Pixel value */
int layer; /* Overlay planes will always be in
* layer 1 */
} OverlayVisualPropertyRec;
@@ -65,7 +65,7 @@ typedef struct
XVisualInfo *pOverlayVisualInfo; /* Pointer to the XVisualInfo struct */
int transparentType; /* Can be None, TransparentPixel or
* TransparentMask */
- int value; /* Pixel value */
+ Pixel value; /* Pixel value */
int layer; /* Overlay planes will always be in
* layer 1 */
} OverlayInfo;