summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2006-02-16 07:17:31 +0000
committerKeith Packard <keithp@keithp.com>2006-02-16 07:17:31 +0000
commit8987b2c1efc9a4667e278e6ba411772ba2a4a4e6 (patch)
treeeb7aa732b0f74c958770e26717679c8e893449bc
parentc8acb342695936db062c966029019a458d45459e (diff)
Make more extensions optional in build (for kdrive). Fix kdrive build for
actual hardware. Fix kdrive pointer signed/unsigned types. Add kdrive-required YX rotation functions. Replace rgb text file loading with static rgb color table.
-rw-r--r--ChangeLog40
-rw-r--r--Makefile.am12
-rw-r--r--Xext/Makefile.am29
-rw-r--r--configure.ac32
-rw-r--r--hw/kdrive/ati/ChangeLog9
-rw-r--r--hw/kdrive/ati/Makefile.am3
-rw-r--r--hw/kdrive/ati/ati.c2
-rw-r--r--hw/kdrive/ati/ati.h2
-rw-r--r--hw/kdrive/ati/ati_cursor.c10
-rw-r--r--hw/kdrive/chips/Makefile.am1
-rw-r--r--hw/kdrive/epson/Makefile.am1
-rw-r--r--hw/kdrive/fbdev/Makefile.am2
-rw-r--r--hw/kdrive/fbdev/fbdev.c10
-rw-r--r--hw/kdrive/i810/Makefile.am1
-rw-r--r--hw/kdrive/linux/mouse.c4
-rw-r--r--hw/kdrive/linux/ms.c2
-rw-r--r--hw/kdrive/linux/ps2.c2
-rw-r--r--hw/kdrive/mach64/Makefile.am2
-rw-r--r--hw/kdrive/mga/Makefile.am1
-rw-r--r--hw/kdrive/neomagic/ChangeLog5
-rw-r--r--hw/kdrive/neomagic/Makefile.am2
-rw-r--r--hw/kdrive/nvidia/Makefile.am2
-rw-r--r--hw/kdrive/pm2/Makefile.am1
-rw-r--r--hw/kdrive/r128/Makefile.am1
-rw-r--r--hw/kdrive/sdl/Makefile.am1
-rw-r--r--hw/kdrive/smi/Makefile.am1
-rw-r--r--hw/kdrive/src/kaa.c2
-rw-r--r--hw/kdrive/src/kinput.c3
-rw-r--r--hw/kdrive/vesa/Makefile.am3
-rw-r--r--hw/kdrive/via/Makefile.am2
-rw-r--r--include/kdrive-config.h.in14
-rwxr-xr-xmiext/damage/damage.c2
-rw-r--r--miext/shadow/Makefile.am5
-rw-r--r--miext/shadow/shadow.h12
-rw-r--r--miext/shadow/shrot16pack_270YX.c33
-rw-r--r--miext/shadow/shrot16pack_90YX.c33
-rw-r--r--os/oscolor.c97
-rw-r--r--os/osdep.h2
-rw-r--r--os/utils.c14
39 files changed, 351 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ca7eae02..af59d2156 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2006-02-15 Keith Packard <keithp@keithp.com>
+
+ * Makefile.am:
+ * Xext/Makefile.am:
+ * configure.ac:
+ * hw/kdrive/chips/Makefile.am:
+ * hw/kdrive/epson/Makefile.am:
+ * hw/kdrive/fbdev/Makefile.am:
+ * hw/kdrive/fbdev/fbdev.c: (fbdevInitialize):
+ * hw/kdrive/i810/Makefile.am:
+ * hw/kdrive/linux/mouse.c: (ps2Init):
+ * hw/kdrive/linux/ms.c: (MsRead):
+ * hw/kdrive/linux/ps2.c: (Ps2Read):
+ * hw/kdrive/mach64/Makefile.am:
+ * hw/kdrive/mga/Makefile.am:
+ * hw/kdrive/nvidia/Makefile.am:
+ * hw/kdrive/pm2/Makefile.am:
+ * hw/kdrive/r128/Makefile.am:
+ * hw/kdrive/sdl/Makefile.am:
+ * hw/kdrive/smi/Makefile.am:
+ * hw/kdrive/src/kaa.c: (kaaMoveInPixmap):
+ * hw/kdrive/src/kinput.c: (KdKeybdProc):
+ * hw/kdrive/vesa/Makefile.am:
+ * hw/kdrive/via/Makefile.am:
+ * include/kdrive-config.h.in:
+ * miext/damage/damage.c: (DamageSetup):
+ * miext/shadow/Makefile.am:
+ * miext/shadow/shadow.h:
+ * miext/shadow/shrot16pack_270YX.c:
+ * miext/shadow/shrot16pack_90YX.c:
+ * os/oscolor.c: (OsToLower), (OsStrCaseCmp), (OsInitColors),
+ (OsLookupColor):
+ * os/osdep.h:
+ * os/utils.c:
+ Make more extensions optional in build (for kdrive).
+ Fix kdrive build for actual hardware.
+ Fix kdrive pointer signed/unsigned types.
+ Add kdrive-required YX rotation functions.
+ Replace rgb text file loading with static rgb color table.
+
2006-02-16 Benjamin Herrenschmidt <benh@kernel.crashing.org>
* hw/xfree86/ramdac/xf86Cursor.c:
diff --git a/Makefile.am b/Makefile.am
index 51145ebd7..d8ca377fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,14 @@ if LBX
LBX_DIR=lbx
endif
+if XINPUT
+XINPUT_DIR=Xi
+endif
+
+if DBE
+DBE_DIR=dbe
+endif
+
SUBDIRS = \
doc \
include \
@@ -46,9 +54,9 @@ SUBDIRS = \
os \
randr \
render \
- Xi \
+ $(XINPUT_DIR) \
xkb \
- dbe \
+ $(DBE_DIR) \
$(MFB_DIR) \
$(AFB_DIR) \
$(CFB_DIR) \
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index b991958cf..c62e75410 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -4,7 +4,11 @@
# Xorg by default
# libXextmodule.la: includes those extensions that are built into a module
# that Xorg loads
+if XORG
noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la
+else
+noinst_LTLIBRARIES = libXext.la
+endif
INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
@@ -22,8 +26,7 @@ BUILTIN_SRCS = \
xtest.c \
xtest1di.c \
xtest1dd.c \
- xtest1dd.h \
- xf86bigfont.c
+ xtest1dd.h
# Sources always included in libXextmodule.la & libXext.la
MODULE_SRCS = \
@@ -31,9 +34,7 @@ MODULE_SRCS = \
mitmisc.c \
shape.c \
sync.c \
- xcmisc.c \
- dpms.c \
- dpmsproc.h
+ xcmisc.c
# Optional sources included if extension enabled by configure.ac rules
@@ -123,13 +124,27 @@ if FONTCACHE
MODULE_SRCS += $(FONTCACHE_SRCS)
endif
+# XF86 Big Font extension
+BIGFONT_SRCS = xf86bigfont.c
+if XF86BIGFONT
+MODULE_SRCS += $(BIGFONT_SRCS)
+endif
+
+# DPMS extension
+DPMS_SRCS = dpms.c dpmsproc.h
+if DPMSExtension
+MODULE_SRCS += $(DPMS_SRCS)
+endif
+
# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
+if XORG
libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS)
libXextmodule_la_SOURCES = $(MODULE_SRCS)
+endif
EXTRA_DIST = \
README.xtest1-ddx \
@@ -147,5 +162,7 @@ EXTRA_DIST = \
$(EVI_SRCS) \
$(MULTIBUFFER_SRCS) \
$(EXTRA_MULTIBUFFER_SRCS) \
- $(FONTCACHE_SRCS)
+ $(FONTCACHE_SRCS) \
+ $(BIGFONT_SRCS) \
+ $(DPMS_SRCS)
diff --git a/configure.ac b/configure.ac
index da9684970..7318cd788 100644
--- a/configure.ac
+++ b/configure.ac
@@ -390,6 +390,9 @@ AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Vi
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
+AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled (sigh))]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
+AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled (sigh))]), [DPMS=$enableval], [DPMSExtension=yes])
+AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$ENABLEVAL], [XINPUT=yes])
dnl DDXes.
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -632,6 +635,16 @@ if test "x$DBE" = xyes; then
DBE_LIB='$(top_builddir)/dbe/libdbe.la'
fi
+AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes])
+if test "x$XF86BIGFONT" = xyes; then
+ AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension])
+fi
+
+AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes])
+if test "x$DPMSExtension" = xyes; then
+ AC_DEFINE(DPMSExtension, 1, [Support DPMS extension])
+fi
+
if test "x$XF86VIDMODE" = xyes; then
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
fi
@@ -671,9 +684,12 @@ if test "$COMPOSITE" = yes; then
fi
MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
-AC_DEFINE(XINPUT, 1, [Support X Input extension])
-XI_LIB='$(top_builddir)/Xi/libXi.la'
-XI_INC='-I$(top_srcdir)/Xi'
+AM_CONDITIONAL(XINPUT, [test "x$XINPUT" = xyes])
+if test "x$XINPUT" = xyes; then
+ AC_DEFINE(XINPUT, 1, [Support X Input extension])
+ XI_LIB='$(top_builddir)/Xi/libXi.la'
+ XI_INC='-I$(top_srcdir)/Xi'
+fi
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
@@ -1355,10 +1371,10 @@ AC_SUBST(KDRIVE_PURE_LIBS)
AC_SUBST(KDRIVE_LIBS)
AM_CONDITIONAL(TSLIB, false)
AM_CONDITIONAL(H3600_TS, false)
-#AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
-#AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
-AM_CONDITIONAL(KDRIVEVESA, false)
-AM_CONDITIONAL(KDRIVEFBDEV, false)
+AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
+AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
+#AM_CONDITIONAL(KDRIVEVESA, false)
+#AM_CONDITIONAL(KDRIVEFBDEV, false)
AM_CONDITIONAL(XEPHYR, [test x"$xephyr" = xyes])
XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS"
@@ -1401,9 +1417,7 @@ AC_SUBST(XKB_COMPILED_DIR)
dnl and the rest of these are generic, so they're in config.h
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
-AC_DEFINE(XF86BIGFONT, 1, [Build XFree86 BigFont extension])
AC_DEFINE(XResExtension, 1, [Build XRes extension])
-AC_DEFINE(DPMSExtension, 1, [Build DPMS extension])
dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined
dnl _*_SOURCE on Solaris restricts to the standards, and removes non-standard
diff --git a/hw/kdrive/ati/ChangeLog b/hw/kdrive/ati/ChangeLog
index d842f19b2..a76712897 100644
--- a/hw/kdrive/ati/ChangeLog
+++ b/hw/kdrive/ati/ChangeLog
@@ -1,3 +1,12 @@
+2006-02-15 Keith Packard <keithp@keithp.com>
+
+ * Makefile.am:
+ * ati.c: (ATIMapReg):
+ * ati.h:
+ * ati_cursor.c: (ATIMoveCursor), (ClassicSetCursorColors),
+ (ClassicLoadCursor), (RadeonLoadCursor), (ATIUnloadCursor):
+ Fix kdrive pointer signed/unsigned types.
+
2006-02-14 Eric Anholt <anholt@FreeBSD.org>
* ati_draw.c: (ATIDrawDisable):
diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am
index 186978887..22f763b80 100644
--- a/hw/kdrive/ati/Makefile.am
+++ b/hw/kdrive/ati/Makefile.am
@@ -65,7 +65,8 @@ ATI_LIBS = \
Xati_LDADD = \
$(ATI_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
-Xati_DEPENDENCIES = $(ATI_LIBS) @KDRIVE_LIBS@
+Xati_DEPENDENCIES = $(ATI_LIBS)
diff --git a/hw/kdrive/ati/ati.c b/hw/kdrive/ati/ati.c
index 4db069a8b..5b4e80ff2 100644
--- a/hw/kdrive/ati/ati.c
+++ b/hw/kdrive/ati/ati.c
@@ -532,7 +532,7 @@ ATIScreenFini(KdScreenInfo *screen)
Bool
ATIMapReg(KdCardInfo *card, ATICardInfo *atic)
{
- atic->reg_base = (CARD8 *)KdMapDevice(ATI_REG_BASE(card),
+ atic->reg_base = (char *)KdMapDevice(ATI_REG_BASE(card),
ATI_REG_SIZE(card));
if (atic->reg_base == NULL)
diff --git a/hw/kdrive/ati/ati.h b/hw/kdrive/ati/ati.h
index 3b5fee380..5ffd227ca 100644
--- a/hw/kdrive/ati/ati.h
+++ b/hw/kdrive/ati/ati.h
@@ -139,7 +139,7 @@ typedef struct _ATICardInfo {
struct backend_funcs backend_funcs;
struct pci_id_entry *pci_id;
- CARD8 *reg_base;
+ char *reg_base;
Bool is_radeon;
Bool is_r100;
Bool is_r200;
diff --git a/hw/kdrive/ati/ati_cursor.c b/hw/kdrive/ati/ati_cursor.c
index a14fc6c97..e8c711707 100644
--- a/hw/kdrive/ati/ati_cursor.c
+++ b/hw/kdrive/ati/ati_cursor.c
@@ -37,7 +37,7 @@ ATIMoveCursor(ScreenPtr pScreen, int x, int y)
ATIScreenInfo(pScreenPriv);
ATICursor *pCurPriv = &atis->cursor;
CARD16 xoff, yoff;
- CARD8 *mmio = atic->reg_base;
+ char *mmio = atic->reg_base;
int stride = atic->is_radeon ? 256 : 16;
if (!pCurPriv->has_cursor)
@@ -99,7 +99,7 @@ ClassicSetCursorColors(ScreenPtr pScreen)
ATICardInfo(pScreenPriv);
ATIScreenInfo(pScreenPriv);
ATICursor *pCurPriv = &atis->cursor;
- CARD8 *mmio = atic->reg_base;
+ char *mmio = atic->reg_base;
MMIO_OUT32(mmio, ATI_REG_CUR_CLR0, pCurPriv->mask);
MMIO_OUT32(mmio, ATI_REG_CUR_CLR1, pCurPriv->source);
@@ -154,7 +154,7 @@ ClassicLoadCursor(ScreenPtr pScreen)
int i;
int lwsrc;
CARD32 tmp;
- CARD8 *mmio = atic->reg_base;
+ char *mmio = atic->reg_base;
ClassicAllocCursorColors(pScreen);
@@ -243,7 +243,7 @@ RadeonLoadCursor(ScreenPtr pScreen)
CARD32 *ram, *msk, *mskLine, *src, *srcLine;
int lwsrc;
CARD32 tmp;
- CARD8 *mmio = atic->reg_base;
+ char *mmio = atic->reg_base;
pCurPriv->pCursor = pCursor;
pCurPriv->xhot = pCursor->bits->xhot;
@@ -351,7 +351,7 @@ ATIUnloadCursor(ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
ATICardInfo(pScreenPriv);
- CARD8 *mmio = atic->reg_base;
+ char *mmio = atic->reg_base;
CARD32 tmp;
tmp = MMIO_IN32(mmio, ATI_REG_GEN_CNTL);
diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am
index 210005594..e3080774b 100644
--- a/hw/kdrive/chips/Makefile.am
+++ b/hw/kdrive/chips/Makefile.am
@@ -27,6 +27,7 @@ CHIPS_LIBS = \
Xchips_LDADD = \
$(CHIPS_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xchips_DEPENDENCIES = $(CHIPS_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am
index 1a2554994..0538f4c39 100644
--- a/hw/kdrive/epson/Makefile.am
+++ b/hw/kdrive/epson/Makefile.am
@@ -27,6 +27,7 @@ EPSON_LIBS = \
Xepson_LDADD = \
$(EPSON_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xepson_DEPENDENCIES = $(EPSON_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am
index 046836a44..fce6df9f4 100644
--- a/hw/kdrive/fbdev/Makefile.am
+++ b/hw/kdrive/fbdev/Makefile.am
@@ -20,7 +20,7 @@ Xfbdev_SOURCES = \
Xfbdev_LDADD = \
libfbdev.a \
@KDRIVE_LIBS@ \
- @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xfbdev_DEPENDENCIES = \
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index e8338136a..86384f0a4 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -58,11 +58,11 @@ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
return FALSE;
}
- priv->fb_base = (unsigned char *) mmap ((caddr_t) NULL,
- priv->fix.smem_len,
- PROT_READ|PROT_WRITE,
- MAP_SHARED,
- priv->fd, 0);
+ priv->fb_base = (char *) mmap ((caddr_t) NULL,
+ priv->fix.smem_len,
+ PROT_READ|PROT_WRITE,
+ MAP_SHARED,
+ priv->fd, 0);
if (priv->fb_base == (char *)-1)
{
diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am
index 15913e11a..d676a6902 100644
--- a/hw/kdrive/i810/Makefile.am
+++ b/hw/kdrive/i810/Makefile.am
@@ -29,6 +29,7 @@ I810_LIBS = \
Xi810_LDADD = \
$(I810_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xi810_DEPENDENCIES = $(I810_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index 16c0e7ba3..5fe997864 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -491,7 +491,7 @@ ps2Init (KdMouseInfo *mi)
int ninit;
/* Send Intellimouse initialization sequence */
- MouseWriteBytes (km->iob.fd, intelli_init, strlen (intelli_init), 100);
+ MouseWriteBytes (km->iob.fd, intelli_init, strlen ((char *) intelli_init), 100);
/*
* Send ID command
*/
@@ -518,7 +518,7 @@ ps2Init (KdMouseInfo *mi)
break;
}
if (init)
- MouseWriteBytes (km->iob.fd, init, strlen (init), 100);
+ MouseWriteBytes (km->iob.fd, init, strlen ((char *) init), 100);
/*
* Flush out the available data to eliminate responses to the
* initialization string. Make sure any partial event is
diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c
index 6c8e6dc38..7f046bdc3 100644
--- a/hw/kdrive/linux/ms.c
+++ b/hw/kdrive/linux/ms.c
@@ -74,7 +74,7 @@ MsRead (int port, void *closure)
int dx, dy;
unsigned long flags;
- while ((n = MsReadBytes (port, buf, sizeof (buf), 3)) > 0)
+ while ((n = MsReadBytes (port, (char *) buf, sizeof (buf), 3)) > 0)
{
b = buf;
while (n >= 3)
diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
index 29b6a46a2..b59dbfac7 100644
--- a/hw/kdrive/linux/ps2.c
+++ b/hw/kdrive/linux/ps2.c
@@ -90,7 +90,7 @@ Ps2Read (int ps2Port, void *closure)
right_button = KD_BUTTON_1;
}
#endif
- while ((n = Ps2ReadBytes (ps2Port, buf, sizeof (buf), 3)) > 0)
+ while ((n = Ps2ReadBytes (ps2Port, (char *) buf, sizeof (buf), 3)) > 0)
{
b = buf;
while (n >= 3)
diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am
index efe0f74ec..299565fdb 100644
--- a/hw/kdrive/mach64/Makefile.am
+++ b/hw/kdrive/mach64/Makefile.am
@@ -30,7 +30,7 @@ MACH64_LIBS = \
Xmach64_LDADD = \
$(MACH64_LIBS) \
@KDRIVE_LIBS@ \
- @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am
index d084d8824..64d260ede 100644
--- a/hw/kdrive/mga/Makefile.am
+++ b/hw/kdrive/mga/Makefile.am
@@ -29,6 +29,7 @@ MGA_LIBS = \
Xmga_LDADD = \
$(MGA_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xmga_DEPENDENCIES = $(MGA_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/neomagic/ChangeLog b/hw/kdrive/neomagic/ChangeLog
index 20724d66c..4e0788e5a 100644
--- a/hw/kdrive/neomagic/ChangeLog
+++ b/hw/kdrive/neomagic/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-15 Keith Packard <keithp@keithp.com>
+
+ * Makefile.am:
+ Add XSERVER_LIBS to build in xorg tree
+
2005-08-07 Keith Packard <keithp@keithp.com>
* neo_draw.c:
diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am
index 2bc4e9d87..b37bfc303 100644
--- a/hw/kdrive/neomagic/Makefile.am
+++ b/hw/kdrive/neomagic/Makefile.am
@@ -41,7 +41,7 @@ NEOMAGIC_LIBS = \
Xneomagic_LDADD = \
$(NEOMAGIC_LIBS) \
@KDRIVE_LIBS@ \
- @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am
index c2e0fcf7a..48551a3a6 100644
--- a/hw/kdrive/nvidia/Makefile.am
+++ b/hw/kdrive/nvidia/Makefile.am
@@ -30,7 +30,7 @@ NVIDIA_LIBS = \
Xnvidia_LDADD = \
$(NVIDIA_LIBS) \
@KDRIVE_LIBS@ \
- @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am
index 9a03b678b..1a712072a 100644
--- a/hw/kdrive/pm2/Makefile.am
+++ b/hw/kdrive/pm2/Makefile.am
@@ -28,6 +28,7 @@ PM2_LIBS = \
Xpm2_LDADD = \
$(PM2_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xpm2_DEPENDENCIES = $(PM2_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am
index d0596125a..b33e138e1 100644
--- a/hw/kdrive/r128/Makefile.am
+++ b/hw/kdrive/r128/Makefile.am
@@ -27,6 +27,7 @@ R128_LIBS = \
Xr128_LDADD = \
$(R128_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xr128_DEPENDENCIES = $(R128_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am
index b884af042..ba6ed4d4a 100644
--- a/hw/kdrive/sdl/Makefile.am
+++ b/hw/kdrive/sdl/Makefile.am
@@ -13,6 +13,7 @@ Xsdl_SOURCES = sdl.c
Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG) \
@XSDL_LIBS@
diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am
index 4790e438e..a214e762e 100644
--- a/hw/kdrive/smi/Makefile.am
+++ b/hw/kdrive/smi/Makefile.am
@@ -32,6 +32,7 @@ SMI_LIBS = \
Xsmi_LDADD = \
$(SMI_LIBS) \
@KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xsmi_DEPENDENCIES = $(SMI_LIBS) @KDRIVE_LIBS@
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index 178544ce0..6c07f2dee 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -192,7 +192,7 @@ kaaMoveInPixmap (PixmapPtr pPixmap)
if (pKaaScr->info->UploadToScreen)
{
- if (pKaaScr->info->UploadToScreen(pPixmap, src, src_pitch))
+ if (pKaaScr->info->UploadToScreen(pPixmap, (char *) src, src_pitch))
return;
}
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index cfe89f13a..7f1c07f9a 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -39,7 +39,6 @@
#include <stdio.h>
#ifdef XKB
-#define XKB_IN_SERVER
#include <X11/extensions/XKBsrv.h>
#endif
@@ -457,7 +456,7 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff)
names.keymap = XkbInitialMap;
XkbSetRulesDflts ("base", "pc101", "us", NULL, NULL);
- ret = XkbInitKeyboardDeviceStruct (pDev,
+ ret = XkbInitKeyboardDeviceStruct ((DeviceIntPtr) pDev,
&names,
&kdKeySyms,
kdModMap,
diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am
index c82b02cf8..01bc0a3e1 100644
--- a/hw/kdrive/vesa/Makefile.am
+++ b/hw/kdrive/vesa/Makefile.am
@@ -28,7 +28,8 @@ Xvesa_LDADD = \
libvesa.a \
@KDRIVE_LIBS@ \
@KDRIVE_LIBS@ \
- $(TSLIB_FLAG)
+ $(TSLIB_FLAG) \
+ @XSERVER_LIBS@
Xvesa_DEPENDENCIES = \
libvesa.a \
diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am
index 3c2f45f9d..4d52df9b1 100644
--- a/hw/kdrive/via/Makefile.am
+++ b/hw/kdrive/via/Makefile.am
@@ -28,7 +28,7 @@ VIA_LIBS = \
Xvia_LDADD = \
$(VIA_LIBS) \
@KDRIVE_LIBS@ \
- @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@ \
$(TSLIB_FLAG)
Xvia_DEPENDENCIES = $(VIA_LIBS) @KDRIVE_LIBS@
diff --git a/include/kdrive-config.h.in b/include/kdrive-config.h.in
index 621d62e5c..9e611c584 100644
--- a/include/kdrive-config.h.in
+++ b/include/kdrive-config.h.in
@@ -10,4 +10,16 @@
/* Building kdrive server. */
#undef KDRIVESERVER
-#endif /* _XORG_CONFIG_H_ */
+/* Include framebuffer support in X servers */
+#undef KDRIVEFBDEV
+
+/* Include vesa support in X servers */
+#undef KDRIVEVESA
+
+/* Enable touchscreen support */
+#undef TOUCHSCREEN
+
+/* Support tslib touchscreen abstraction library */
+#undef TSLIB
+
+#endif /* _KDRIVE_CONFIG_H_ */
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 5203d42b3..54f168039 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1773,6 +1773,7 @@ DamageSetup (ScreenPtr pScreen)
if (!pScrPriv)
return FALSE;
+#ifdef XFree86Server
#ifdef COMPOSITE
/* This is a kludge to ensure wrapping order with the composite wrapper.
* If it's done from compinit.c, then DamageSetup may be called before the
@@ -1782,6 +1783,7 @@ DamageSetup (ScreenPtr pScreen)
if (!noCompositeExtension)
miInitializeCompositeWrapper (pScreen);
#endif
+#endif
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;
diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 9490530e3..1426c033e 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -17,7 +17,9 @@ libshadow_la_SOURCES = \
shplanar.c \
shrot16pack_180.c \
shrot16pack_270.c \
+ shrot16pack_270YX.c \
shrot16pack_90.c \
+ shrot16pack_90YX.c \
shrot16pack.c \
shrot32pack_180.c \
shrot32pack_270.c \
@@ -28,4 +30,5 @@ libshadow_la_SOURCES = \
shrot8pack_90.c \
shrot8pack.c \
shrotate.c \
- shrotpack.h
+ shrotpack.h \
+ shrotpackYX.h
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index 2b51f2c82..5f4f8ccbe 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -129,6 +129,10 @@ shadowUpdateRotate16_90 (ScreenPtr pScreen,
shadowBufPtr pBuf);
void
+shadowUpdateRotate16_90YX (ScreenPtr pScreen,
+ shadowBufPtr pBuf);
+
+void
shadowUpdateRotate32_90 (ScreenPtr pScreen,
shadowBufPtr pBuf);
@@ -153,9 +157,17 @@ shadowUpdateRotate16_270 (ScreenPtr pScreen,
shadowBufPtr pBuf);
void
+shadowUpdateRotate16_270YX (ScreenPtr pScreen,
+ shadowBufPtr pBuf);
+
+void
shadowUpdateRotate32_270 (ScreenPtr pScreen,
shadowBufPtr pBuf);
+void
+shadowUpdateRotate16 (ScreenPtr pScreen,
+ shadowBufPtr pBuf);
+
typedef void (* shadowUpdateProc)(ScreenPtr, shadowBufPtr);
shadowUpdateProc shadowUpdatePackedWeak(void);
diff --git a/miext/shadow/shrot16pack_270YX.c b/miext/shadow/shrot16pack_270YX.c
new file mode 100644
index 000000000..3a3dfa8a3
--- /dev/null
+++ b/miext/shadow/shrot16pack_270YX.c
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * Copyright 2000 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#define FUNC shadowUpdateRotate16_270YX
+#define Data CARD16
+#define ROTATE 270
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "shrotpackYX.h"
diff --git a/miext/shadow/shrot16pack_90YX.c b/miext/shadow/shrot16pack_90YX.c
new file mode 100644
index 000000000..2eb721581
--- /dev/null
+++ b/miext/shadow/shrot16pack_90YX.c
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * Copyright 2000 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#define FUNC shadowUpdateRotate16_90YX
+#define Data CARD16
+#define ROTATE 90
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "shrotpackYX.h"
diff --git a/os/oscolor.c b/os/oscolor.c
index d7b1f7ba7..ab8baf1bf 100644
--- a/os/oscolor.c
+++ b/os/oscolor.c
@@ -51,6 +51,101 @@ SOFTWARE.
#include <dix-config.h>
#endif
+#define USE_RGB_BUILTIN 1
+
+#if USE_RGB_BUILTIN
+
+#include <X11/keysym.h>
+#include "os.h"
+
+static unsigned char
+OsToLower (unsigned char a)
+{
+ if ((a >= XK_A) && (a <= XK_Z))
+ return a + (XK_a - XK_A);
+ else if ((a >= XK_Agrave) && (a <= XK_Odiaeresis))
+ return a + (XK_agrave - XK_Agrave);
+ else if ((a >= XK_Ooblique) && (a <= XK_Thorn))
+ return a + (XK_oslash - XK_Ooblique);
+ else
+ return a;
+}
+
+static int
+OsStrCaseCmp (const unsigned char *s1, const unsigned char *s2, int l2)
+{
+ unsigned char c1, c2;
+
+ for (;;)
+ {
+ c1 = OsToLower (*s1++);
+ if (l2 == 0)
+ c2 = '\0';
+ else
+ c2 = OsToLower (*s2++);
+ if (!c1 || !c2)
+ break;
+ if (c1 != c2)
+ break;
+ l2--;
+ }
+ return c2 - c1;
+}
+
+typedef struct _builtinColor {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+ unsigned short name;
+} BuiltinColor;
+
+#include "oscolor.h"
+
+#define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0]))
+
+Bool
+OsInitColors()
+{
+ return TRUE;
+}
+
+Bool
+OsLookupColor(int screen,
+ char *s_name,
+ unsigned int len,
+ unsigned short *pred,
+ unsigned short *pgreen,
+ unsigned short *pblue)
+{
+ const BuiltinColor *c;
+ unsigned char *name = (unsigned char *) s_name;
+ int low, mid, high;
+ int r;
+
+ low = 0;
+ high = NUM_BUILTIN_COLORS - 1;
+ while (high >= low)
+ {
+ mid = (low + high) / 2;
+ c = &BuiltinColors[mid];
+ r = OsStrCaseCmp (&BuiltinColorNames[c->name], name, len);
+ if (r == 0)
+ {
+ *pred = c->red * 0x101;
+ *pgreen = c->green * 0x101;
+ *pblue = c->blue * 0x101;
+ return TRUE;
+ }
+ if (r < 0)
+ high = mid - 1;
+ else
+ low = mid + 1;
+ }
+ return FALSE;
+}
+
+#else
+
/*
* This file builds the server's internal database mapping color names to
* RGB tuples by reading in an rgb.txt file. This is still slightly foolish,
@@ -200,3 +295,5 @@ OsLookupColor(int screen, char *name, unsigned int len,
return FALSE;
}
+
+#endif /* USE_RGB_BUILTIN */
diff --git a/os/osdep.h b/os/osdep.h
index b837d7605..f566ac5d1 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -119,9 +119,11 @@ SOFTWARE.
/* MAXSELECT is the number of fds that select() can handle */
#define MAXSELECT (sizeof(fd_set) * NBBY)
+#ifndef HAS_GETDTABLESIZE
#if !defined(hpux) && !defined(SVR4) && !defined(SYSV)
#define HAS_GETDTABLESIZE
#endif
+#endif
#include <stddef.h>
diff --git a/os/utils.c b/os/utils.c
index 3c5de9d8b..73d25026b 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xserver/xorg/os/utils.c,v 1.22 2006/01/08 23:43:54 ajax Exp $ */
+/* $XdotOrg: xserver/xorg/os/utils.c,v 1.23 2006-02-15 20:44:13 ajax Exp $ */
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/*
@@ -136,10 +136,16 @@ _X_EXPORT Bool noTestExtensions;
_X_EXPORT Bool noBigReqExtension = FALSE;
#endif
#ifdef COMPOSITE
-/* COMPOSITE is disabled by default for now until the
- * interface is stable */
-_X_EXPORT Bool noCompositeExtension = TRUE;
+ #ifdef XFree86Server
+ /* COMPOSITE is disabled by default for now until the
+ * interface is stable */
+ #define COMPOSITE_DEFAULT FALSE
+ #else
+ #define COMPOSITE_DEFAULT TRUE
+ #endif
+_X_EXPORT Bool noCompositeExtension = !COMPOSITE_DEFAULT;
#endif
+
#ifdef DAMAGE
_X_EXPORT Bool noDamageExtension = FALSE;
#endif