RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ configure.ac rpm/rpmio/ digest.c

From: Anders F. Björklund <afb@rpm5.org>
Date: Tue 19 Aug 2008 - 17:02:59 CEST
Message-Id: <20080819150259.6AF2F71CC6@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Anders F. Björklund
  Root:   /v/rpm/cvs                       Email:  afb@rpm5.org
  Module: rpm                              Date:   19-Aug-2008 17:02:59
  Branch: HEAD                             Handle: 2008081915025801

  Modified files:
    rpm                     configure.ac
    rpm/rpmio               digest.c

  Log:
    check that crc32_combine/adler32_combine really exist, for murky old
    zlib

  Summary:
    Revision    Changes     Path
    2.312       +2  -0      rpm/configure.ac
    2.40        +4  -0      rpm/rpmio/digest.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.311 -r2.312 configure.ac
  --- rpm/configure.ac	18 Aug 2008 23:32:47 -0000	2.311
  +++ rpm/configure.ac	19 Aug 2008 15:02:58 -0000	2.312
  @@ -959,6 +959,8 @@
       [rpmz z gz], [gzread], [zlib.h],
       [yes,external:none], [zlib],
       [ AC_CHECK_FUNC(gzseek)
  +      AC_CHECK_FUNC(crc32_combine, AC_DEFINE(HAVE_ZLIB_CRC32_COMBINE, 1, [Define as 1 if you have crc32_combine() in zlib]))
  +      AC_CHECK_FUNC(adler32_combine, AC_DEFINE(HAVE_ZLIB_ADLER32_COMBINE, 1, [Define as 1 if you have adler32_combine() in zlib]))
         if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
             AC_DEFINE(HAVE_ZLIB_H, 1, [Define to 1 if you have <zlib.h>])
         fi
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/digest.c
  ============================================================================
  $ cvs diff -u -r2.39 -r2.40 digest.c
  --- rpm/rpmio/digest.c	31 Jul 2008 02:40:10 -0000	2.39
  +++ rpm/rpmio/digest.c	19 Aug 2008 15:02:59 -0000	2.40
  @@ -502,8 +502,10 @@
   /*@-type @*/
   	    mp->update = (rpmuint32_t (*)(rpmuint32_t, const byte *, size_t)) crc32;
   #if defined(ZLIB_H)
  +#if defined(HAVE_ZLIB_CRC32_COMBINE)
   	    mp->combine = (rpmuint32_t (*)(rpmuint32_t, rpmuint32_t, size_t)) crc32_combine;
   #endif
  +#endif
   /*@=type @*/
   	    ctx->paramsize = sizeof(*mp);
   	    ctx->param = mp;
  @@ -522,8 +524,10 @@
   /*@-type @*/
   #if defined(ZLIB_H)
   	    mp->update = (rpmuint32_t (*)(rpmuint32_t, const byte *, size_t)) adler32;
  +#if defined(HAVE_ZLIB_ADLER32_COMBINE)
   	    mp->combine = (rpmuint32_t (*)(rpmuint32_t, rpmuint32_t, size_t)) adler32_combine;
   #endif
  +#endif
   /*@=type @*/
   	    ctx->paramsize = sizeof(*mp);
   	    ctx->param = mp;
  @@ .
Received on Tue Aug 19 17:02:59 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.