RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/rpmio/ rpmdav.c

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Sat 25 Aug 2007 - 09:42:22 CEST
Message-Id: <20070825074222.62E7934845B@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   25-Aug-2007 09:42:22
  Branch: HEAD                             Handle: 2007082508422101

  Modified files:
    rpm                     CHANGES
    rpm/rpmio               rpmdav.c

  Log:
    Add minimum support for building against NEON >= 0.27.0.

  Summary:
    Revision    Changes     Path
    1.1601      +1  -0      rpm/CHANGES
    2.46        +26 -5      rpm/rpmio/rpmdav.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1600 -r1.1601 CHANGES
  --- rpm/CHANGES	24 Aug 2007 21:07:46 -0000	1.1600
  +++ rpm/CHANGES	25 Aug 2007 07:42:21 -0000	1.1601
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: add support for building against NEON >= 0.27.0
       - jbj: use keyutils to get password out of rpm's address space.
       - jbj: start ripping availablePackages.
       - jbj: rpmtsDbmode() and rpmtsSetDbmode() added for rpmts-py.c opaqueness.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmdav.c
  ============================================================================
  $ cvs diff -u -r2.45 -r2.46 rpmdav.c
  --- rpm/rpmio/rpmdav.c	6 Aug 2007 10:43:42 -0000	2.45
  +++ rpm/rpmio/rpmdav.c	25 Aug 2007 07:42:22 -0000	2.46
  @@ -28,9 +28,19 @@
   #include "ne_socket.h"
   #include "ne_string.h"
   #include "ne_utils.h"
  +#include "ne_md5.h" /* for version detection only */
   
  -/* XXX API changes for neon-0.26.0 */
  -#if !defined(NE_FREE)
  +/* poor-man's NEON version determination */
  +#if defined(NE_MD5_H)
  +#define WITH_NEON_MIN_VERSION 0x002700
  +#elif defined(NE_FEATURE_I18N)
  +#define WITH_NEON_MIN_VERSION 0x002600
  +#else
  +#define WITH_NEON_MIN_VERSION 0x002500
  +#endif
  +
  +/* XXX API changes for NEON 0.26 */
  +#if WITH_NEON_MIN_VERSION >= 0x002600
   #define	ne_set_persist(_sess, _flag)
   #define	ne_propfind_set_private(_pfh, _create_item, NULL) \
   	ne_propfind_set_private(_pfh, _create_item, NULL, NULL)
  @@ -106,8 +116,13 @@
   fprintf(stderr, "*** davProgress(%p,0x%x:0x%x) sess %p u %p\n", userdata, (unsigned int)current, (unsigned int)total, sess, u);
   }
   
  +#if WITH_NEON_MIN_VERSION >= 0x002700
  +static void davNotify(void * userdata,
  +		ne_session_status connstatus, const ne_session_status_info *info)
  +#else
   static void davNotify(void * userdata,
   		ne_conn_status connstatus, const char * info)
  +#endif
   	/*@*/
   {
       urlinfo u = userdata;
  @@ -135,7 +150,9 @@
   } ne_conn_status;
   #endif
   
  +#if WITH_NEON_MIN_VERSION < 0x002700
       u->connstatus = connstatus;
  +#endif
   
   /*@-boundsread@*/
   if (_dav_debug < 0)
  @@ -372,7 +389,11 @@
   #endif
   
   	ne_set_progress(u->sess, davProgress, u);
  +#if WITH_NEON_MIN_VERSION >= 0x002700
  +	ne_set_notifier(u->sess, davNotify, u);
  +#else
   	ne_set_status(u->sess, davNotify, u);
  +#endif
   
   	ne_set_persist(u->sess, 1);
   	ne_set_read_timeout(u->sess, httpTimeoutSecs);
  @@ -457,7 +478,7 @@
   }
   #endif
   
  -#if !defined(NE_FREE)
  +#if WITH_NEON_MIN_VERSION >= 0x002600
   static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const ne_uri *uri)
   #else
   static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri)
  @@ -594,7 +615,7 @@
       }
   }
   
  -#if !defined(NE_FREE)
  +#if WITH_NEON_MIN_VERSION >= 0x002600
   static void fetch_results(void *userdata, const ne_uri *uarg,
   		    const ne_prop_result_set *set)
   #else
  @@ -610,7 +631,7 @@
       const ne_status *status = NULL;
       const char * path = NULL;
   
  -#if !defined(NE_FREE)
  +#if WITH_NEON_MIN_VERSION >= 0x002600
       const ne_uri * uri = uarg;
       (void) urlPath(uri->path, &path);
   #else
  @@ .
Received on Sat Aug 25 09:42:22 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.