xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Nov 2 08:11:57 PST 2009


 configure.ac            |   14 +++++++++++++-
 exa/exa_mixed.c         |    4 ----
 include/dix-config.h.in |    3 +++
 os/xsha1.c              |    3 ++-
 4 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 412c56ef3332d09efbd861e41c3e985f44729729
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Nov 1 22:08:40 2009 +0100

    exa: remove some outdated comment
    
    - This comment is still in exa_driver.c and there it makes sense.
    
    Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
    Acked-by: Michel Dänzer <michel at daenzer.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index bc393c7..b29ee35 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -154,10 +154,6 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
     if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) {
 	ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
 						bitsPerPixel, devKind, pPixData);
-	/* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL.
-	 * If pPixmap->devPrivate.ptr is non-NULL, then we've got a non-offscreen pixmap.
-	 * We need to store the pointer, because PrepareAccess won't be called.
-	 */
 	if (ret == TRUE)
 	    goto out;
     }
commit 48b8c076a7b7dbbddfc472e8c6e5251a0b174cbc
Author: Matthieu Herrb <matthieu at laas.fr>
Date:   Mon Nov 2 11:11:24 2009 +0100

    add libc as a choice for SHA1 implementation
    
    On Sun, Nov 01, 2009 at 02:54:13PM -0800, Keith Packard wrote:
    > Excerpts from Matthieu Herrb's message of Sun Nov 01 09:34:35 -0800 2009:
    >
    > > +AC_CHECK_FUNCS([SHA1Init], [HAVE_LIBC_SHA1=yes])
    >
    > I'd suggest AC_CHECK_FUNC instead; as far as I can tell, AC_CHECK_FUNCS
    > will also define HAVE_SHA1INIT. Also, can you  use HAVE_LIBC_SHA1
    > consistently rather than having two separate names (HAVE_LIBC_SHA1 and
    > HAVE_SHA1_IN_LIBC)? Yes, I know one is a preprocessor symbol and the
    > other is a cpp shell variable, but I think that will work anyway.
    >
    New version taking you comments into account.
    
    From: Matthieu Herrb <matthieu.herrb at laas.fr>
    Date: Sun, 1 Nov 2009 18:19:27 +0100
    Subject: [PATCH] Add a probe for SHA1 functions in libc in *BSD.
    
    The interface is the same as the one in libmd.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index bdbbc7a..8e1edba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1287,8 +1287,20 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
 
 # SHA1 hashing
 AC_ARG_WITH([sha1],
-            [AS_HELP_STRING([--with-sha1=libmd|libgcrypt|libcrypto|libsha1],
+            [AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1],
                             [choose SHA1 implementation])])
+AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
+	with_sha1=libc
+fi
+if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
+	AC_MSG_ERROR([libc requested but not found])
+fi
+if test "x$with_sha1" = xlibc; then
+	AC_DEFINE([HAVE_SHA1_IN_LIBC], [1],
+		[Use libc SHA1 functions])
+	SHA1_LIBS=""
+fi
 AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
 if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
 	with_sha1=libmd
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index ebf3733..274ce89 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -160,6 +160,9 @@
 /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
 #undef HAVE_RPCSVC_DBM_H
 
+/* Define to use libc SHA1 functions */
+#undef HAVE_SHA1_IN_LIBC
+
 /* Define to use libmd SHA1 functions */
 #undef HAVE_SHA1_IN_LIBMD
 
diff --git a/os/xsha1.c b/os/xsha1.c
index 94092ca..229ce89 100644
--- a/os/xsha1.c
+++ b/os/xsha1.c
@@ -5,7 +5,8 @@
 #include "os.h"
 #include "xsha1.h"
 
-#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+#if defined(HAVE_SHA1_IN_LIBMD)  /* Use libmd for SHA1 */ \
+	|| defined(HAVE_SHA1_IN_LIBC) /* Use libc for SHA1 */
 
 # include <sha1.h>
 


More information about the xorg-commit mailing list