SOURCES (rpm-4_5): rpm-no-neon.patch - updated rpmio/rpmdav.[ch]

glen glen at pld-linux.org
Thu Sep 4 16:50:53 CEST 2008


Author: glen                         Date: Thu Sep  4 14:50:53 2008 GMT
Module: SOURCES                       Tag: rpm-4_5
---- Log message:
- updated rpmio/rpmdav.[ch]

---- Files affected:
SOURCES:
   rpm-no-neon.patch (1.11.4.1 -> 1.11.4.2) 

---- Diffs:

================================================================
Index: SOURCES/rpm-no-neon.patch
diff -u SOURCES/rpm-no-neon.patch:1.11.4.1 SOURCES/rpm-no-neon.patch:1.11.4.2
--- SOURCES/rpm-no-neon.patch:1.11.4.1	Thu Sep  4 16:25:46 2008
+++ SOURCES/rpm-no-neon.patch	Thu Sep  4 16:50:47 2008
@@ -1,14 +1,22 @@
---- 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
@@ -16,14 +24,33 @@
 -#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)
@@ -32,10 +59,19 @@
  #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 @*/
@@ -80,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;
@@ -109,7 +150,9 @@
 -} ne_conn_status;
 -#endif
 -
+-#if WITH_NEON_MIN_VERSION < 0x002700
 -    u->connstatus = connstatus;
+-#endif
 -
 -/*@-boundsread@*/
 -if (_dav_debug < 0)
@@ -346,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);
@@ -375,7 +422,7 @@
 -exit:
 -/*@-boundswrite@*/
 -    if (uret != NULL)
--	*uret = urlLink(u, __FUNCTION__);
+-	*uret = urlLink(u, "davInit");
 -/*@=boundswrite@*/
 -    u = urlFree(u, "urlSplit (davInit)");
 -
@@ -431,7 +478,11 @@
 -}
 -#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));
@@ -468,7 +519,7 @@
 -    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));
@@ -492,7 +543,7 @@
 -
 -    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;
@@ -564,8 +615,13 @@
 -    }
 -}
 -
+-#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;
@@ -575,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
@@ -1166,9 +1222,11 @@
 -
 -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;
@@ -1359,7 +1417,7 @@
 -}
 -
 -/*@unchecked@*/
--static int dav_st_ino = 0xdead0000;
+-static unsigned int dav_st_ino = 0xdead0000;
 -
 -/*@-boundswrite@*/
 -int davStat(const char * path, /*@out@*/ struct stat *st)
@@ -1373,7 +1431,7 @@
 -/* 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;
 -    }
@@ -1468,14 +1526,14 @@
 -}
 -#endif	/* NOTYET */
 -
--/* =============================================================== */
+ /* =============================================================== */
  /*@unchecked@*/
  int avmagicdir = 0x3607113;
- 
-@@ -1625,171 +167,3 @@
+@@ -1660,179 +145,3 @@
+ /*@=kepttrans@*/
  }
  /*@=boundswrite@*/
- 
+-
 -/* =============================================================== */
 -/*@unchecked@*/
 -int davmagicdir = 0x8440291;
@@ -1514,7 +1572,7 @@
 -    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@*/
@@ -1530,7 +1588,7 @@
 -    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@*/
@@ -1599,7 +1657,7 @@
 -    /*@-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@*/
 -
@@ -1644,10 +1702,16 @@
 -/*@=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)))
  
@@ -1660,7 +1724,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -80,133 +74,6 @@
+@@ -85,133 +79,6 @@
  	/*@globals fileSystem, internalState @*/
  	/*@modifies fileSystem, internalState @*/;
  
@@ -1794,7 +1858,6 @@
  #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 @@
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-no-neon.patch?r1=1.11.4.1&r2=1.11.4.2&f=u



More information about the pld-cvs-commit mailing list