xserver: Branch 'master' - 2 commits

Dodji Seketeli dodji at kemper.freedesktop.org
Tue Jul 22 16:10:58 PDT 2008


 hw/kdrive/ephyr/XF86dri.c        |   10 ++++++++++
 hw/kdrive/ephyr/ephyr.c          |    2 +-
 hw/kdrive/ephyr/ephyrdri.c       |    2 +-
 hw/kdrive/ephyr/ephyrdri.h       |    2 +-
 hw/kdrive/ephyr/ephyrdriext.c    |   27 +++++++++++++--------------
 hw/kdrive/ephyr/ephyrhostglx.c   |   11 +++++++++++
 hw/kdrive/ephyr/ephyrhostvideo.c |   10 ++++++++++
 hw/kdrive/ephyr/ephyrvideo.c     |    4 ++--
 hw/kdrive/ephyr/hostx.c          |   12 ++++++++++++
 9 files changed, 61 insertions(+), 19 deletions(-)

New commits:
commit 92fdd01d8e46dd4b41338754e1a34e9d3c387d4a
Author: Dodji Seketeli <dodji at seketeli.org>
Date:   Wed Jul 23 01:07:29 2008 +0200

    [Xephyr] various X86_64 build cleanups

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 65d55af..408144e 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -91,7 +91,7 @@ Bool
 ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
 {
   int width = 640, height = 480; 
-  unsigned long redMask, greenMask, blueMask;
+  CARD32 redMask, greenMask, blueMask;
   
   if (hostx_want_screen_size(screen, &width, &height)
       || !screen->width || !screen->height)
diff --git a/hw/kdrive/ephyr/ephyrdri.c b/hw/kdrive/ephyr/ephyrdri.c
index 9aa68b1..932e468 100644
--- a/hw/kdrive/ephyr/ephyrdri.c
+++ b/hw/kdrive/ephyr/ephyrdri.c
@@ -143,7 +143,7 @@ ephyrDRIGetClientDriverName (int a_screen,
 Bool
 ephyrDRICreateContext (int a_screen,
                        int a_visual_id,
-                       unsigned long int *a_returned_ctxt_id,
+                       XID *a_returned_ctxt_id,
                        drm_context_t *a_hw_ctxt)
 {
     Display *dpy = hostx_get_display () ;
diff --git a/hw/kdrive/ephyr/ephyrdri.h b/hw/kdrive/ephyr/ephyrdri.h
index af8bb11..28ae8ea 100644
--- a/hw/kdrive/ephyr/ephyrdri.h
+++ b/hw/kdrive/ephyr/ephyrdri.h
@@ -42,7 +42,7 @@ Bool ephyrDRIGetClientDriverName (int a_screen,
                                   char ** a_client_driver_name) ;
 Bool ephyrDRICreateContext (int a_screen,
                             int a_visual_id,
-                            unsigned long int *a_returned_ctx_id,
+                            XID *a_returned_ctx_id,
                             drm_context_t *a_hw_ctx) ;
 Bool ephyrDRIDestroyContext (int a_screen,
                              int a_context_id) ;
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 883e330..21e895f 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -219,8 +219,7 @@ ephyrDRICreateWindow (WindowPtr a_win)
                               && screen_priv->CreateWindow,
                               FALSE) ;
 
-    EPHYR_LOG ("enter. win:%#x\n",
-               (unsigned int)a_win) ;
+    EPHYR_LOG ("enter. win:%p\n", a_win) ;
 
     screen->CreateWindow = screen_priv->CreateWindow ;
     is_ok = (*screen->CreateWindow) (a_win) ;
@@ -294,7 +293,7 @@ ephyrDRIMoveWindow (WindowPtr a_win,
     }
     screen->MoveWindow = ephyrDRIMoveWindow ;
 
-    EPHYR_LOG ("window: %#x\n", (unsigned int)a_win) ;
+    EPHYR_LOG ("window: %p\n", a_win) ;
     if (!a_win->parent) {
         EPHYR_LOG ("cannot move root window\n") ;
         is_ok = TRUE ;
@@ -354,7 +353,7 @@ ephyrDRIPositionWindow (WindowPtr a_win,
     }
     screen->PositionWindow = ephyrDRIPositionWindow ;
 
-    EPHYR_LOG ("window: %#x\n", (unsigned int)a_win) ;
+    EPHYR_LOG ("window: %p\n", a_win) ;
     win_priv = GET_EPHYR_DRI_WINDOW_PRIV (a_win) ;
     if (!win_priv) {
         EPHYR_LOG ("not a DRI peered window\n") ;
@@ -406,7 +405,7 @@ ephyrDRIClipNotify (WindowPtr a_win,
     }
     screen->ClipNotify = ephyrDRIClipNotify ;
 
-    EPHYR_LOG ("window: %#x\n", (unsigned int)a_win) ;
+    EPHYR_LOG ("window: %p\n", a_win) ;
     win_priv = GET_EPHYR_DRI_WINDOW_PRIV (a_win) ;
     if (!win_priv) {
         EPHYR_LOG ("not a DRI peered window\n") ;
@@ -912,7 +911,7 @@ appendWindowPairToList (WindowPtr a_local,
 
     EPHYR_RETURN_VAL_IF_FAIL (a_local, FALSE) ;
 
-    EPHYR_LOG ("(local,remote):(%#x, %d)\n", (unsigned int)a_local, a_remote) ;
+    EPHYR_LOG ("(local,remote):(%p, %d)\n", a_local, a_remote) ;
 
     for (i=0; i < NUM_WINDOW_PAIRS; i++) {
         if (window_pairs[i].local == NULL) {
@@ -935,8 +934,8 @@ findWindowPairFromLocal (WindowPtr a_local,
     for (i=0; i < NUM_WINDOW_PAIRS; i++) {
         if (window_pairs[i].local == a_local) {
             *a_pair = &window_pairs[i] ;
-            EPHYR_LOG ("found (%#x, %d)\n",
-                       (unsigned int)(*a_pair)->local,
+            EPHYR_LOG ("found (%p, %d)\n",
+                       (*a_pair)->local,
                        (*a_pair)->remote) ;
             return TRUE ;
         }
@@ -976,7 +975,7 @@ createHostPeerWindow (const WindowPtr a_win,
     EPHYR_RETURN_VAL_IF_FAIL (a_win->drawable.pScreen,
                               FALSE) ;
 
-    EPHYR_LOG ("enter. a_win '%#x'\n", (unsigned int)a_win) ;
+    EPHYR_LOG ("enter. a_win '%p'\n", a_win) ;
     if (!getWindowVisual (a_win, &visual)) {
         EPHYR_LOG_ERROR ("failed to get window visual\n") ;
         goto out ;
@@ -1056,12 +1055,12 @@ ProcXF86DRICreateDrawable (ClientPtr client)
         EPHYR_LOG_ERROR ("non drawable windows are not yet supported\n") ;
         return BadImplementation ;
     }
-    EPHYR_LOG ("lookedup drawable %#x\n", (unsigned int)drawable) ;
+    EPHYR_LOG ("lookedup drawable %p\n", drawable) ;
     window = (WindowPtr)drawable;
     if (findWindowPairFromLocal (window, &pair) && pair) {
         remote_win = pair->remote ;
-        EPHYR_LOG ("found window '%#x' paire with remote '%d'\n",
-                   (unsigned int)window, remote_win) ;
+        EPHYR_LOG ("found window '%p' paire with remote '%d'\n",
+                   window, remote_win) ;
     } else if (!createHostPeerWindow (window, &remote_win)) {
         EPHYR_LOG_ERROR ("failed to create host peer window\n") ;
         return BadAlloc ;
@@ -1082,8 +1081,8 @@ ProcXF86DRICreateDrawable (ClientPtr client)
             return BadAlloc ;
         }
 	dixSetPrivate(&window->devPrivates, ephyrDRIWindowKey, win_priv);
-        EPHYR_LOG ("paired window '%#x' with remote '%d'\n",
-                   (unsigned int)window, remote_win) ;
+        EPHYR_LOG ("paired window '%p' with remote '%d'\n",
+                   window, remote_win) ;
     }
 
     WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *)&rep);
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index bfe4d72..c4eb066 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -1259,8 +1259,8 @@ ephyrQueryImageAttributes (KdScreenInfo *a_info,
 
     EPHYR_RETURN_VAL_IF_FAIL (a_w && a_h, FALSE) ;
 
-    EPHYR_LOG ("enter: dim (%dx%d), pitches: %#x, offsets: %#x\n",
-               *a_w, *a_h, (unsigned int)a_pitches, (unsigned int)a_offsets) ;
+    EPHYR_LOG ("enter: dim (%dx%d), pitches: %p, offsets: %p\n",
+               *a_w, *a_h, a_pitches, a_offsets) ;
 
    if (!ephyrHostXVQueryImageAttributes (s_base_port_id,
                                          a_id,
commit 5de1867fbb0a336ff3fdc92cbf734849f6111b1b
Author: Dodji Seketeli <dodji at seketeli.org>
Date:   Wed Jul 23 01:00:26 2008 +0200

    [Xephyr] Fix #15839
    
    Make sure the _XSERVER64 macro is not defined in Xlib client code.
    That macro is meant to be define only on pure server code, when necessary.

diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c
index be65edf..31f7963 100644
--- a/hw/kdrive/ephyr/XF86dri.c
+++ b/hw/kdrive/ephyr/XF86dri.c
@@ -45,6 +45,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifdef HAVE_CONFIG_H
 #include <kdrive-config.h>
 #endif
+/*
+ * including some server headers (like kdrive-config.h)
+ * might define the macro _XSERVER64
+ * on 64 bits machines. That macro must _NOT_ be defined for Xlib
+ * client code, otherwise bad things happen.
+ * So let's undef that macro if necessary.
+ */
+#ifdef _XSERVER64
+#undef _XSERVER64
+#endif
 
 /* THIS IS NOT AN X CONSORTIUM STANDARD */
 
diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c
index 6d783d2..a05bba2 100644
--- a/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/hw/kdrive/ephyr/ephyrhostglx.c
@@ -31,6 +31,17 @@
 #include <kdrive-config.h>
 #endif
 
+/*
+ * including some server headers (like kdrive-config.h)
+ * might define the macro _XSERVER64
+ * on 64 bits machines. That macro must _NOT_ be defined for Xlib
+ * client code, otherwise bad things happen.
+ * So let's undef that macro if necessary.
+ */
+#ifdef _XSERVER64
+#undef _XSERVER64
+#endif
+
 #include <X11/Xlibint.h>
 #include <GL/glx.h>
 #include <GL/internal/glcore.h>
diff --git a/hw/kdrive/ephyr/ephyrhostvideo.c b/hw/kdrive/ephyr/ephyrhostvideo.c
index 562c2a4..41c0b75 100644
--- a/hw/kdrive/ephyr/ephyrhostvideo.c
+++ b/hw/kdrive/ephyr/ephyrhostvideo.c
@@ -28,6 +28,16 @@
 #ifdef HAVE_CONFIG_H
 #include <kdrive-config.h>
 #endif
+/*
+ * including some server headers (like kdrive-config.h)
+ * might define the macro _XSERVER64
+ * on 64 bits machines. That macro must _NOT_ be defined for Xlib
+ * client code, otherwise bad things happen.
+ * So let's undef that macro if necessary.
+ */
+#ifdef _XSERVER64
+#undef _XSERVER64
+#endif
 #include <X11/Xutil.h>
 #include <X11/Xlibint.h>
 #include <X11/extensions/Xvlib.h>
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 171d78c..1bc95a8 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -27,6 +27,18 @@
 #include <kdrive-config.h>
 #endif
 
+/*
+ * including some server headers (like kdrive-config.h)
+ * might define the macro _XSERVER64
+ * on 64 bits machines. That macro must _NOT_ be defined for Xlib
+ * client code, otherwise bad things happen.
+ * So let's undef that macro if necessary.
+ */
+#ifdef _XSERVER64
+#undef _XSERVER64
+#endif
+
+
 #include "hostx.h"
 
 #include <stdlib.h>


More information about the xorg-commit mailing list