summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-12-02 18:17:11 +0000
committerBrian Paul <[email protected]>2005-12-02 18:17:11 +0000
commit1b3128cc9a6b51874bf98871ec1b171049770d71 (patch)
treeeeeb237e91674f603d130bcd96150877893a9981 /src/glx
parent8716e7570d17c3e6bcf7e5c1d8aa3a0c5035a5ac (diff)
Test sizeof(drm_handle_t) instead of LONG64 when returning handles
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/XF86dri.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/glx/x11/XF86dri.c b/src/glx/x11/XF86dri.c
index 03fa4e57bce..3f989fa986e 100644
--- a/src/glx/x11/XF86dri.c
+++ b/src/glx/x11/XF86dri.c
@@ -200,9 +200,10 @@ PUBLIC Bool XF86DRIOpenConnection(dpy, screen, hSAREA, busIdString)
}
*hSAREA = rep.hSAREALow;
-#ifdef LONG64
- *hSAREA |= ((drm_handle_t)rep.hSAREAHigh) << 32;
-#endif
+ if (sizeof(drm_handle_t) == 8) {
+ const int shift = 32; /* var to prevent warning on next line */
+ *hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << shift;
+ }
if (rep.length) {
if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) {
@@ -562,9 +563,10 @@ PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer,
}
*hFrameBuffer = rep.hFrameBufferLow;
-#ifdef LONG64
- *hFrameBuffer |= ((drm_handle_t)rep.hFrameBufferHigh) << 32;
-#endif
+ if (sizeof(drm_handle_t) == 8) {
+ const int shift = 32; /* var to prevent warning on next line */
+ *hFrameBuffer |= ((drm_handle_t) rep.hFrameBufferHigh) << shift;
+ }
*fbOrigin = rep.framebufferOrigin;
*fbSize = rep.framebufferSize;