---- rpm-4.4.8/rpmio/rpmdav.c.orig 2007-02-20 00:51:07.000000000 +0100
-+++ rpm-4.4.8/rpmio/rpmdav.c 2007-04-08 20:07:07.814412143 +0200
-@@ -9,31 +9,6 @@
+--- rpm-4.5/rpmio/rpmdav.c~ 2008-07-09 12:38:31.000000000 +0300
++++ rpm-4.5/rpmio/rpmdav.c 2008-09-04 17:43:50.215697868 +0300
+@@ -9,58 +9,6 @@
#include <pthread.h>
#endif
+-#if USE_INTERNAL_NEON
-#include "ne_alloc.h"
-#include "ne_auth.h"
-#include "ne_basic.h"
-#include "ne_dates.h"
-#include "ne_locks.h"
+-#else
+-#include "neon/ne_alloc.h"
+-#include "neon/ne_auth.h"
+-#include "neon/ne_basic.h"
+-#include "neon/ne_dates.h"
+-#include "neon/ne_locks.h"
+-#endif
-
-#define NEONBLOWSCHUNKS
-#ifndef NEONBLOWSCHUNKS
-#include "../neon/src/ne_private.h"
-#endif
-
+-#if USE_INTERNAL_NEON
-#include "ne_props.h"
-#include "ne_request.h"
-#include "ne_socket.h"
-#include "ne_string.h"
-#include "ne_utils.h"
+-#include "ne_md5.h" /* for version detection only */
+-#else
+-#include "neon/ne_props.h"
+-#include "neon/ne_request.h"
+-#include "neon/ne_socket.h"
+-#include "neon/ne_string.h"
+-#include "neon/ne_utils.h"
+-#include "neon/ne_md5.h" /* for version detection only */
+-#endif
-
--/* 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)
#include <rpmio_internal.h>
#define _RPMDAV_INTERNAL
-@@ -69,1439 +44,6 @@
- }
+@@ -74,1469 +22,6 @@
+ /*@access FD_t @*/
+ /*@access urlinfo @*/
- /* =============================================================== */
+-#if 0 /* HACK: reasonable value needed. */
+-#define TIMEOUT_SECS 60
+-#else
+-#define TIMEOUT_SECS 5
+-#endif
+-/*@unchecked@*/
+-static int httpTimeoutSecs = TIMEOUT_SECS;
+-
+-/* =============================================================== */
-int davFree(urlinfo u)
- /*@globals internalState @*/
- /*@modifies u, internalState @*/
-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;
-} ne_conn_status;
-#endif
-
+-#if WITH_NEON_MIN_VERSION < 0x002700
- u->connstatus = connstatus;
+-#endif
-
-/*@-boundsread@*/
-if (_dav_debug < 0)
-#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);
-exit:
-/*@-boundswrite@*/
- if (uret != NULL)
-- *uret = urlLink(u, __FUNCTION__);
+- *uret = urlLink(u, "davInit");
-/*@=boundswrite@*/
- u = urlFree(u, "urlSplit (davInit)");
-
-}
-#endif
-
+-#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)
+-#endif
- /*@*/
-{
- struct fetch_resource_s * res = ne_calloc(sizeof(*res));
- ctx->modes = _free(ctx->modes);
- ctx->sizes = _free(ctx->sizes);
- ctx->mtimes = _free(ctx->mtimes);
-- ctx->u = urlFree(ctx->u, __FUNCTION__);
+- ctx->u = urlFree(ctx->u, "fetch_destroy_context");
- ctx->uri = _free(ctx->uri);
-/*@-boundswrite@*/
- memset(ctx, 0, sizeof(*ctx));
-
- ctx = ne_calloc(sizeof(*ctx));
- ctx->uri = xstrdup(uri);
-- ctx->u = urlLink(u, __FUNCTION__);
+- ctx->u = urlLink(u, "fetch_create_context");
- if ((ctx->st = st) != NULL)
- memset(ctx->st, 0, sizeof(*ctx->st));
- return ctx;
- }
-}
-
+-#if WITH_NEON_MIN_VERSION >= 0x002600
+-static void fetch_results(void *userdata, const ne_uri *uarg,
+- const ne_prop_result_set *set)
+-#else
-static void fetch_results(void *userdata, void *uarg,
- const ne_prop_result_set *set)
+-#endif
- /*@*/
-{
- struct fetch_context_s *ctx = userdata;
- 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
-
-ssize_t davWrite(void * cookie, const char * buf, size_t count)
-{
+-#if !defined(NEONBLOWSCHUNKS) || defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
- FD_t fd = cookie;
+-#endif
- ssize_t rc;
-- int xx;
+- int xx = -1;
-
-#if !defined(NEONBLOWSCHUNKS)
- ne_session * sess;
-}
-
-/*@unchecked@*/
--static int dav_st_ino = 0xdead0000;
+-static unsigned int dav_st_ino = 0xdead0000;
-
-/*@-boundswrite@*/
-int davStat(const char * path, /*@out@*/ struct stat *st)
-/* HACK: neon really wants collections with trailing '/' */
- ctx = fetch_create_context(path, st);
- if (ctx == NULL) {
--fprintf(stderr, "==> %s fetch_create_context ctx %p\n", __FUNCTION__, ctx);
+-fprintf(stderr, "==> %s fetch_create_context ctx %p\n", "davStat", ctx);
-/* HACK: errno = ??? */
- goto exit;
- }
-}
-#endif /* NOTYET */
-
--/* =============================================================== */
+ /* =============================================================== */
/*@unchecked@*/
int avmagicdir = 0x3607113;
-
-@@ -1625,171 +167,3 @@
+@@ -1660,179 +145,3 @@
+ /*@=kepttrans@*/
}
/*@=boundswrite@*/
-
+-
-/* =============================================================== */
-/*@unchecked@*/
-int davmagicdir = 0x8440291;
- dp = (struct dirent *) avdir->data;
- av = (const char **) (dp + 1);
- ac = avdir->size;
-- dt = (char *) (av + (ac + 1));
+- dt = (unsigned char *) (av + (ac + 1));
- i = avdir->offset + 1;
-
-/*@-boundsread@*/
- dp->d_reclen = 0; /* W2DO? */
-
-#if !(defined(hpux) || defined(__hpux) || defined(sun))
--#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
+-#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)
- dp->d_off = 0; /* W2DO? */
-#endif
-/*@-boundsread@*/
- /*@-abstract@*/
- dp = (struct dirent *) (avdir + 1);
- nav = (const char **) (dp + 1);
-- dt = (char *) (nav + (ac + 1));
+- dt = (unsigned char *) (nav + (ac + 1));
- t = (char *) (dt + ac + 1);
- /*@=abstract@*/
-
-/*@=kepttrans@*/
-}
-/*@=modfilesys@*/
-diff -ur rpm-4.4.7.org/rpmio/rpmdav.h rpm-4.4.7/rpmio/rpmdav.h
---- rpm-4.4.7.org/rpmio/rpmdav.h 2005-10-11 21:13:59.000000000 +0200
-+++ rpm-4.4.7/rpmio/rpmdav.h 2006-10-17 22:35:33.742783250 +0200
-@@ -41,12 +41,6 @@
+-
+-char * davRealpath(const char * path, char * resolved_path)
+-{
+-assert(resolved_path == NULL); /* XXX no POSIXly broken realpath(3) here. */
+- /* XXX TODO: handle redirects. For now, just dupe the path. */
+- return xstrdup(path);
+-}
+--- rpm-4.5/rpmio/rpmdav.h 2007-05-25 20:36:36.000000000 +0300
++++ rpm-4.4.9/rpmio/rpmdav.h 2008-09-04 17:21:50.369579599 +0300
+@@ -46,12 +46,6 @@
extern int avmagicdir;
#define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
#ifdef __cplusplus
extern "C" {
#endif
-@@ -80,133 +74,6 @@
+@@ -85,133 +79,6 @@
/*@globals fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/;
#ifdef __cplusplus
}
#endif
-diff -ur rpm-4.4.7.org/rpmio/rpmio.c rpm-4.4.7/rpmio/rpmio.c
--- rpm-4.4.7.org/rpmio/rpmio.c 2006-08-08 08:55:01.000000000 +0200
+++ rpm-4.4.7/rpmio/rpmio.c 2006-10-17 22:18:38.135311750 +0200
@@ -406,13 +406,6 @@