xserver: Branch 'master' - 2 commits

Alan Coopersmith alanc at kemper.freedesktop.org
Tue Nov 20 18:31:29 PST 2007


 configure.ac                             |   10 +++++++---
 hw/xfree86/os-support/bus/Pci.h          |    2 +-
 hw/xfree86/os-support/solaris/sun_bios.c |    4 ++--
 hw/xfree86/os-support/solaris/sun_init.c |   11 ++++-------
 hw/xfree86/os-support/solaris/sun_vid.c  |   12 ++++++------
 hw/xfree86/os-support/xf86_OSlib.h       |    6 +++---
 hw/xfree86/utils/xorgconfig/xorgconfig.c |    2 +-
 include/servermd.h                       |    2 +-
 mi/micoord.h                             |    2 +-
 9 files changed, 26 insertions(+), 25 deletions(-)

New commits:
commit a55ec1a9f4b62139dc5e5462d79d47b330c27c79
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Nov 20 18:31:03 2007 -0800

    Restore checks for __i386 where needed for Sun compilers on Solaris

diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 6bd0eb7..0abb34f 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -210,7 +210,7 @@
 #  define ARCH_PCI_INIT ia64linuxPciInit
 # endif
 # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__i386)
 # if defined(linux)
 #  define ARCH_PCI_INIT linuxPciInit
 # else
diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c
index 1223dcd..1fae975 100644
--- a/hw/xfree86/os-support/solaris/sun_bios.c
+++ b/hw/xfree86/os-support/solaris/sun_bios.c
@@ -26,7 +26,7 @@
 #include <xorg-config.h>
 #endif
 
-#ifdef __i386__
+#if defined(__i386__) || defined(__i386)
 #define _NEED_SYSI86
 #endif
 #include "xf86.h"
@@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
 	Offset += Base & (psize - 1);
 	Base &= ~(psize - 1);
 	mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-#if defined(__i386__) && !defined(__SOL8__)
+#if (defined(__i386__) || defined(__i386)) && !defined(__SOL8__)
 	if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0)
 		sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno);
 	else
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index c7fac52..1f389cb 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -29,7 +29,7 @@
 #include "xf86.h"
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 # include <sys/kd.h>
 #endif
 
@@ -40,7 +40,7 @@ static int VTnum = -1;
 static int xf86StartVT = -1;
 #endif
 
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
 static char fb_dev[PATH_MAX] = "/dev/fb";
 #else
 static char fb_dev[PATH_MAX] = "/dev/console";
@@ -209,11 +209,8 @@ xf86CloseConsole(void)
 #ifdef HAS_USL_VTS
     struct vt_mode VT;
 #endif
-#if defined(__SOL8__) || !defined(__i386__)
-    int tmp;
-#endif
 
-#if !defined(__i386__) && !defined(__x86)
+#if !defined(__i386__) && !defined(__i386) && !defined(__x86)
 
     if (!xf86DoProbe && !xf86DoConfigure) {
 	int fd;
@@ -332,7 +329,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
 
 #endif /* HAS_USL_VTS */
 
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
 
     if ((i + 1) < argc) {
 	if (!strcmp(argv[i], "-dev")) {
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 494b2cf..e7b529c 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -28,7 +28,7 @@
 
 #include <sys/types.h> /* get __x86 definition if not set by compiler */
 
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 #define _NEED_SYSI86
 #endif
 #include "xf86.h"
@@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
 /* I/O Permissions section						   */
 /***************************************************************************/
 
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 static Bool ExtendedEnabled = FALSE;
 #endif
 
 _X_EXPORT Bool
 xf86EnableIO(void)
 {
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 	if (ExtendedEnabled)
 		return TRUE;
 
@@ -171,7 +171,7 @@ xf86EnableIO(void)
 _X_EXPORT void
 xf86DisableIO(void)
 {
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 	if(!ExtendedEnabled)
 		return;
 
@@ -188,7 +188,7 @@ xf86DisableIO(void)
 
 _X_EXPORT Bool xf86DisableInterrupts(void)
 {
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 	if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
 		return FALSE;
 
@@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void)
 
 _X_EXPORT void xf86EnableInterrupts(void)
 {
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
 	if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
 		return;
 
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 662dbaa..77f2253 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -140,7 +140,7 @@ typedef signed long xf86ssize_t;
 #  endif /* SVR4 && !sun */
 /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
 #  if defined(sun) && defined (SVR4)		/* Solaris? */
-#   if defined(__i386__) || defined(__x86)		/* on x86 or x64? */
+#   if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */
 #    if !defined(V86SC_IOPL)			/* Solaris 7 or later? */
 #     include <sys/v86.h>			/* Nope */
 #    endif
@@ -148,7 +148,7 @@ typedef signed long xf86ssize_t;
 #  else 
 #   include <sys/v86.h>					/* Not solaris */
 #  endif /* sun && i386 && SVR4 */
-#  if defined(sun) && (defined (__i386__) || defined(__x86))  && defined (SVR4)
+#  if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86))  && defined (SVR4)
 #    include <sys/psw.h>
 #  endif
 # endif /* _NEED_SYSI86 */
@@ -224,7 +224,7 @@ typedef signed long xf86ssize_t;
 #  define POSIX_TTY
 # endif
 
-# if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__)
+# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__)
 #  define USE_VT_SYSREQ
 #  define VT_SYSREQ_DEFAULT TRUE
 # endif
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index efabc9d..30eb831 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -631,7 +631,7 @@ mouse_configuration(void) {
 		config_emulate3buttons = 0;
 	printf("\n");
 
-#if (defined(sun) && (defined(__i386__) || defined(__x86)))
+#if (defined(sun) && (defined(__i386) || defined(__x86)))
 	/* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse, 
 	   but PS/2 mice default to /dev/kdmouse */
 	if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {
diff --git a/include/servermd.h b/include/servermd.h
index 2616bfe..2f511da 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -444,7 +444,7 @@ SOFTWARE.
 
 #endif /* luna */
 
-#if	(defined(SVR4) && defined(__i386__)) || \
+#if	(defined(SVR4) && (defined(__i386__) || (defined(__i386)))) ||	\
 	defined(__alpha__) || defined(__alpha) || \
 	defined(__i386__) || defined(__QNX__) || \
 	defined(__s390x__) || defined(__s390__)
diff --git a/mi/micoord.h b/mi/micoord.h
index 16a244b..16d0861 100644
--- a/mi/micoord.h
+++ b/mi/micoord.h
@@ -46,7 +46,7 @@
 #if defined(mips) || defined(sgi) || \
     defined(sparc) || defined(__sparc64__) || \
     defined(__alpha) || defined(__alpha__) || \
-    defined(__i386__) || defined(__ia64__) || \
+    defined(__i386__) || defined(__i386) || defined(__ia64__) || \
     defined(__s390x__) || defined(__s390__) || \
     defined(__amd64__) || defined(amd64) || defined(__amd64)
 #define GetHighWord(x) (((int) (x)) >> 16)
commit 2f387d913aa76f1b6d21d8e2698be165301c6bc1
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Nov 20 18:27:12 2007 -0800

    Enable use of /dev/urandom on Solaris as well

diff --git a/configure.ac b/configure.ac
index 7d43216..f8c8fe4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,12 +172,19 @@ b = bswap16(a);
 	fi
 fi
 
+dnl Check to see if dlopen is in default libraries (like Solaris, which
+dnl has it in libc), or if libdl is needed to get it.
 AC_CHECK_FUNC([dlopen], [],
 	AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
 
 case $host_os in
     linux*)
 	AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;;
+    solaris*)
+	# Solaris 8 with patches, or Solaris 9 or later have /dev/urandom
+	if test -r /dev/urandom ; then
+	   AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom])
+	fi ;;
     *) ;;
 esac
 
@@ -1314,9 +1321,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
 	XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
 	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB"
 
-dnl Check to see if dlopen is in default libraries (like Solaris, which
-dnl has it in libc), or if libdl is needed to get it.
-
 	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
 	XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
 	XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"


More information about the xorg-commit mailing list