xserver: Branch 'server-1.5-branch' - 2 commits

Alan Coopersmith alanc at kemper.freedesktop.org
Mon Jun 23 19:52:39 PDT 2008


 config/hal.c                |   13 +++++++++++++
 configure.ac                |    2 +-
 hw/xfree86/modes/xf86Crtc.c |    1 +
 include/dix-config.h.in     |    3 +++
 4 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 2f8ad7f938ee31583b0da0d3dce0980832dd68d3
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Mon May 12 18:49:34 2008 -0700

    Check for strcasestr and workaround it on systems without it
    (cherry picked from ed65e8b4f02a6da7f1c5d85984a9ccf6a94d0181 commit)

diff --git a/config/hal.c b/config/hal.c
index ac9e3d2..1d62a1d 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -262,7 +262,17 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                      * Since we can't predict the order in which the keys
                      * arrive, we need to store them.
                      */
+#ifndef HAVE_STRCASESTR
+                    int psi_key_len = strlen(psi_key);
+                    char *lower_psi_key = xalloc(psi_key_len + 1);
+
+                    CopyISOLatin1Lowered((unsigned char *) lower_psi_key,
+                                         (unsigned char *) psi_key,
+                                         psi_key_len);
+                    if ((tmp = strstr(lower_psi_key, "xkb")))
+#else
                     if ((tmp = strcasestr(psi_key, "xkb")))
+#endif
                     {
                         if (!strcasecmp(&tmp[3], "layout"))
                         {
@@ -291,6 +301,9 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                         add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
                         xfree(tmp_val);
                     }
+#ifndef HAVE_STRCASESTR
+                    xfree(lower_psi_key);
+#endif
                 }
             } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
 
diff --git a/configure.ac b/configure.ac
index 223d4df..99b2bf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,7 +190,7 @@ dnl Checks for library functions.
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
 		strtol getopt getopt_long vsnprintf walkcontext backtrace \
-		getisax getzoneid shmctl64])
+		getisax getzoneid shmctl64 strcasestr])
 AC_FUNC_ALLOCA
 dnl Old HAS_* names used in os/*.c.
 AC_CHECK_FUNC([getdtablesize],
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 38639d6..9468ad0 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -199,6 +199,9 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
commit dfb326790e4131d0c9700cb879dc812b1e8e7529
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Mon May 19 18:43:29 2008 -0700

    Restore return type on xf86SetScrnInfoModes
    
    Seems to have been accidentally lost by commit 	76943fec860315f3c93539e59a59080b8a7b3e75
    (cherry picked from 925e895b869e461a9e7f135891463c56ee633cd6 commit)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 02c447d..17cf745 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1683,6 +1683,7 @@ SetCompatOutput(xf86CrtcConfigPtr config)
     return output;
 }
 
+_X_EXPORT void
 xf86SetScrnInfoModes (ScrnInfoPtr scrn)
 {
     xf86CrtcConfigPtr	config = XF86_CRTC_CONFIG_PTR(scrn);


More information about the xorg-commit mailing list