[Xquartz-changes] xserver: Branch 'master' - 4 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Dec 20 01:05:37 PST 2011


Rebased ref, commits from common ancestor:
commit 2d34b34ed7547b829979756ccfb2cff79368d0a4
Merge: e4b4d83 1deede3
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 20 00:23:33 2011 -0800

    Merge remote-tracking branch 'jeremyhu/master'

commit 1deede3c48d5ac91f50774c79f02afc6e036614e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat Dec 17 12:56:59 2011 -0800

    kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
    
    Reported-by: Arkadiusz Miśkiewicz <arekm at maven.pl>
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c
index f5f9d9b..ba2637b 100644
--- a/hw/kdrive/linux/keyboard.c
+++ b/hw/kdrive/linux/keyboard.c
@@ -692,7 +692,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki)
         return !Success;
 
     fd = LinuxConsoleFd;
-    ki->driverPrivate = (void *) fd;
+    ki->driverPrivate = (void *) (intptr_t) fd;
 
     ioctl (fd, KDGKBMODE, &LinuxKbdTrans);
     tcgetattr (fd, &LinuxTermios);
@@ -724,7 +724,7 @@ LinuxKeyboardDisable (KdKeyboardInfo *ki)
     if (!ki)
         return;
 
-    fd = (int) ki->driverPrivate;
+    fd = (int) (intptr_t) ki->driverPrivate;
 
     KdUnregisterFd(ki, fd, FALSE);
     ioctl(fd, KDSKBMODE, LinuxKbdTrans);
@@ -753,7 +753,7 @@ LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds)
     if (!ki)
         return;
 
-    ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7);
+    ioctl ((int)(intptr_t)ki->driverPrivate, KDSETLED, leds & 7);
 }
 
 KdKeyboardDriver LinuxKeyboardDriver = {
diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c
index b6151cd..176e125 100644
--- a/hw/kdrive/linux/ms.c
+++ b/hw/kdrive/linux/ms.c
@@ -152,7 +152,7 @@ MsEnable (KdPointerInfo *pi)
     }
     if (KdRegisterFd (port, MsRead, pi))
 	return TRUE;
-    pi->driverPrivate = (void *)port;
+    pi->driverPrivate = (void *)(intptr_t)port;
 
     return Success;
 
@@ -164,7 +164,7 @@ MsEnable (KdPointerInfo *pi)
 static void
 MsDisable (KdPointerInfo *pi)
 {
-    KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
+    KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
 }
 
 static void
diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
index 465b963..b62d769 100644
--- a/hw/kdrive/linux/ps2.c
+++ b/hw/kdrive/linux/ps2.c
@@ -159,7 +159,7 @@ Ps2Enable (KdPointerInfo *pi)
         return BadAlloc;
     }
 
-    pi->driverPrivate = (void *)fd;
+    pi->driverPrivate = (void *)(intptr_t)fd;
 
     return Success;
 }
@@ -168,7 +168,7 @@ Ps2Enable (KdPointerInfo *pi)
 static void
 Ps2Disable (KdPointerInfo *pi)
 {
-    KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
+    KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
 }
 
 static void
commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat Dec 17 12:25:26 2011 -0800

    configure.ac: Make Xephyr dependency error message more informative
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/configure.ac b/configure.ac
index db8d33c..e94b408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2020,12 +2020,10 @@ if test "$KDRIVE" = yes; then
         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
     fi
 
-    PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
     if test "x$XEPHYR" = xauto; then
-        XEPHYR=$xephyr
-    fi
-    if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then	
-        AC_MSG_ERROR([Xephyr dependencies missing])
+        PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"])
+    elif test "x$XEPHYR" = xyes ; then
+        PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS)
     fi
 
     # Xephyr needs nanosleep() which is in librt on Solaris
commit 511beddffab3c4fd43c75556132159117b6ba884
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Nov 25 09:45:25 2011 -0800

    XQuartz: Provide in-tree implementation of strndup(3) if needed
    
    This function was added to Mac OS X 10.7, so we need to provide it
    for earlier releases.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 0b1f897..21ad5b5 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -12,6 +12,13 @@ x11app_PROGRAMS = X11.bin
 dist_X11_bin_SOURCES = \
 	bundle-main.c 
 
+# strndup(3) was added in Mac OS X 10.7, but we do this unconditionally to deal
+# with the case where we build on Lion but target Snow Leopard as the minimum
+# OS version.
+#if NEED_STRNDUP
+dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c
+#endif
+
 nodist_X11_bin_SOURCES = \
 	mach_startupServer.c \
 	mach_startupUser.c


More information about the Xquartz-changes mailing list