xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Dec 18 16:43:35 PST 2009


 configure.ac                    |   23 ++++++++++++++++++++---
 hw/xfree86/common/compiler.h    |   14 ++++++++++++++
 hw/xfree86/common/xf86Config.c  |   17 +++--------------
 hw/xfree86/common/xf86Globals.c |    2 +-
 hw/xfree86/common/xf86Helper.c  |    2 +-
 hw/xfree86/common/xf86Privstr.h |    2 +-
 include/xorg-config.h.in        |    3 +++
 7 files changed, 43 insertions(+), 20 deletions(-)

New commits:
commit 1df4bd6011e110dcf0649b15bfffd4ab9e6961d6
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Thu Dec 17 18:24:40 2009 -0800

    Change default xkb model from pc104 to pc105
    
    PC105 is a more useful default for non-American keyboard users,
    not harmful for American PC101/PC104 keyboard users.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 9cad91b..e202726 100644
--- a/configure.ac
+++ b/configure.ac
@@ -527,9 +527,9 @@ AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
                                 [ XKB_DFLT_RULES="$withval" ],
                                 [ XKB_DFLT_RULES="" ])
 AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL],
-                                   [Keyboard model (default: pc104)]),
+                                   [Keyboard model (default: pc105)]),
                                 [ XKB_DFLT_MODEL="$withval" ],
-                                [ XKB_DFLT_MODEL="pc104" ])
+                                [ XKB_DFLT_MODEL="pc105" ])
 AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT],
                                    [Keyboard layout (default: us)]),
                                 [ XKB_DFLT_LAYOUT="$withval" ],
commit 1d2e189cdc1d65c9ca2aa0a950780dc18e6c50f1
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Thu Dec 17 18:24:39 2009 -0800

    Change sysconfdir brackets to avoid some shells trying to run it as a command
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 50d2bf3..9cad91b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -505,7 +505,7 @@ XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi)
 dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
 dnl otherwise uses standard subdirectories of FONTROOTDIR
 AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
-	[DEFAULT_FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d'],
+	[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
 	[
 		DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
 		case $host_os in
commit 48749cc21b074ee8e68c3854bd3977ec7c408225
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Thu Dec 17 18:24:38 2009 -0800

    Add platform compatibility defines for Sun Studio compilers
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index dc5f157..ded71ee 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -55,6 +55,20 @@
 # define DO_PROTOTYPES
 #endif
 
+/* Map Sun compiler platform defines to gcc-style used in the code */
+#if defined(__amd64) && !defined(__amd64__)
+# define __amd64__
+#endif
+#if defined(__i386) && !defined(__i386__)
+# define __i386__
+#endif
+#if defined(__sparc) && !defined(__sparc__)
+# define __sparc__
+#endif
+#if defined(__sparcv9) && !defined(__sparc64__)
+# define __sparc64__
+#endif
+
 #ifndef _X_EXPORT
 # include <X11/Xfuncproto.h>
 #endif
commit b63912ed4c69fedd1bea92274d6cae0429a79677
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Thu Dec 17 18:24:37 2009 -0800

    Convert checks for PC98 support from platform #ifdefs to configure flag
    
    Default remains the same - on for most OS'es on i386 (except Solaris),
    off for everyone else.   Can be manually toggled via --enable-pc98 or
    --disable-pc98.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 55763f5..50d2bf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -577,6 +577,9 @@ AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use
 AC_ARG_ENABLE(visibility,     AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
 				[SYMBOL_VISIBILITY=$enableval],
 				[SYMBOL_VISIBILITY=auto])
+AC_ARG_ENABLE(pc98,     	AC_HELP_STRING([--enable-pc98], [Enable PC98 support in Xorg (default: auto)]),
+				[SUPPORT_PC98=$enableval],
+				[SUPPORT_PC98=auto])
 
 dnl GLX build options
 AC_ARG_WITH(dri-driver-path,  AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]),
@@ -1652,6 +1655,9 @@ if test "x$XORG" = xyes; then
 			XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
 		fi
 		AC_SUBST([SOLARIS_ASM_CFLAGS])
+		if test "x$SUPPORT_PC98" = xauto; then
+			SUPPORT_PC98="no"
+		fi
 		;;
 	  gnu*)
 	  	XORG_OS="gnu"
@@ -1673,8 +1679,19 @@ if test "x$XORG" = xyes; then
 	  sparc*)
 		xorg_bus_sparc="yes"
 		;;
+	  i*86)
+		if test "x$SUPPORT_PC98" = xauto; then
+			SUPPORT_PC98="yes"
+		fi
+		;;
 	esac
 
+	if test "x$SUPPORT_PC98" = xauto; then
+		SUPPORT_PC98="no"
+	fi
+	if test "x$SUPPORT_PC98" = xyes; then
+		AC_DEFINE(SUPPORT_PC98, 1, [Support PC98])
+	fi
 	if test "x$XORG_OS_PCI" = x ; then
 		XORG_OS_PCI=$XORG_OS
 	fi
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a6d66f3..6fbf613 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -71,13 +71,6 @@ extern DeviceAssocRec mouse_assoc;
 #include "picture.h"
 #endif
 
-#if (defined(__i386__)) && \
-    (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
-     defined(__NetBSD__) || defined(linux) || \
-     (defined(SVR4) && !defined(sun)) || defined(__GNU__))
-#define SUPPORT_PC98
-#endif
-
 /*
  * These paths define the way the config file search is done.  The escape
  * sequences are documented in parser/scan.c.
@@ -778,11 +771,10 @@ static OptionInfoRec FlagOptions[] = {
 	{0}, FALSE },
 };
 
-#ifdef __i386__
+#ifdef SUPPORT_PC98
 static Bool
 detectPC98(void)
 {
-#ifdef SUPPORT_PC98
     unsigned char buf[2];
 
     if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
@@ -791,11 +783,8 @@ detectPC98(void)
 	return TRUE;
     else
 	return FALSE;
-#else
-    return FALSE;
-#endif
 }
-#endif /* __i386__ */
+#endif
 
 static Bool
 configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
@@ -1054,7 +1043,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 	xf86Info.pixmap24 = Pix24DontCare;
 	xf86Info.pix24From = X_DEFAULT;
     }
-#ifdef __i386__
+#ifdef SUPPORT_PC98
     if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
 	xf86Info.pc98 = value;
 	if (value) {
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index d8f7f7f..98f8284 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
     .miscModInDevAllowNonLocal  = FALSE,
     .pixmap24                   = Pix24DontCare,
     .pix24From                  = X_DEFAULT,
-#ifdef __i386__
+#ifdef SUPPORT_PC98
     .pc98                       = FALSE,
 #endif
     .pmFlag                     = TRUE,
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 56ab266..1cc1526 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -2140,7 +2140,7 @@ xf86GetAllowMouseOpenFail(void)
 Bool
 xf86IsPc98(void)
 {
-#ifdef __i386__
+#if SUPPORT_PC98
     return xf86Info.pc98;
 #else
     return FALSE;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 9982601..b2095aa 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -91,7 +91,7 @@ typedef struct {
 						   input device events */
     Pix24Flags		pixmap24;
     MessageType		pix24From;
-#ifdef __i386__
+#ifdef SUPPORT_PC98
     Bool		pc98;
 #endif
     Bool		pmFlag;
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 794de7a..9fe7cde 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -133,4 +133,7 @@
 /* Use SIGIO handlers for input device events by default */
 #undef USE_SIGIO_BY_DEFAULT
 
+/* Support PC98 */
+#undef SUPPORT_PC98
+
 #endif /* _XORG_CONFIG_H_ */


More information about the xorg-commit mailing list