summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2005-02-17 02:36:37 +0000
committerjbj <devnull@localhost>2005-02-17 02:36:37 +0000
commit094e57ce7127374375533093b8b60764de8359a0 (patch)
tree25a3a03dd41e2d8d25f598c3c09755e03887d682 /rpmio
parentba7be476a7db37d1051aa7cb13da98b57f4fceab (diff)
downloadlibrpm-tizen-094e57ce7127374375533093b8b60764de8359a0.tar.gz
librpm-tizen-094e57ce7127374375533093b8b60764de8359a0.tar.bz2
librpm-tizen-094e57ce7127374375533093b8b60764de8359a0.zip
- rework configure.ac et al to lose internal library baggage flexibly.
CVS patchset: 7775 CVS date: 2005/02/17 02:36:37
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/Makefile.am8
-rw-r--r--rpmio/rpmdav.c50
-rw-r--r--rpmio/rpmurl.h20
3 files changed, 49 insertions, 29 deletions
diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
index 8a6a723a1..b3c221411 100644
--- a/rpmio/Makefile.am
+++ b/rpmio/Makefile.am
@@ -11,8 +11,9 @@ EXTRA_PROGRAMS = tax tdigest tdir tfts tget thkp tput tglob tinv tkey tring trpm
INCLUDES = -I. \
-I$(top_srcdir) \
@WITH_BEECRYPT_INCLUDE@ \
+ @WITH_NEON_INCLUDE@ \
@WITH_LUA_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
@INCPATH@
@@ -35,10 +36,11 @@ librpmio_la_SOURCES = \
rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c
librpmio_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
@WITH_BEECRYPT_LIB@ \
+ @WITH_NEON_LIB@ \
@WITH_LUA_LIB@ \
- $(top_builddir)/file/src/libmagic.la \
+ @WITH_MAGIC_LIB@ \
@WITH_ZLIB_LIB@ \
- -lneon -lpthread
+ -lpthread
librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
librpmio_la_DEPENDENCIES = # .created
diff --git a/rpmio/rpmdav.c b/rpmio/rpmdav.c
index d990fc670..876239230 100644
--- a/rpmio/rpmdav.c
+++ b/rpmio/rpmdav.c
@@ -9,16 +9,23 @@
#include <pthread.h>
#endif
-#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>
-#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 "ne_alloc.h"
+#include "ne_auth.h"
+#include "ne_basic.h"
+#include "ne_dates.h"
+#include "ne_locks.h"
+
+#define NEONBLOWSCHUNKS
+#ifndef NEONBLOWSCHUNKS
+/* HACK: include ne_private.h to access sess->socket for now. */
+#include "../neon/src/ne_private.h"
+#endif
+
+#include "ne_props.h"
+#include "ne_request.h"
+#include "ne_socket.h"
+#include "ne_string.h"
+#include "ne_utils.h"
#include <rpmio_internal.h>
@@ -936,7 +943,7 @@ assert(ctrl->req != NULL);
#endif
if (!strcmp(httpCmd, "PUT")) {
-#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
+#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
ctrl->wr_chunked = 1;
ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
ne_set_request_chunked(ctrl->req, 1);
@@ -1065,13 +1072,28 @@ hexdump(buf, rc);
ssize_t davWrite(void * cookie, const char * buf, size_t count)
{
-#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
FD_t fd = cookie;
ssize_t rc;
int xx;
+#ifndef NEONBLOWSCHUNKS
+ ne_session * sess;
+
+assert(fd->req != NULL);
+ sess = ne_get_session(fd->req);
+assert(sess != NULL);
+
+ /* HACK: include ne_private.h to access sess->socket for now. */
+ xx = ne_sock_fullwrite(sess->socket, buf, count);
+#else
+#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
assert(fd->req != NULL);
xx = ne_send_request_chunk(fd->req, buf, count);
+#else
+ errno = EIO; /* HACK */
+ return -1;
+#endif
+#endif
/* HACK: stupid error impedence matching. */
rc = (xx == 0 ? count : -1);
@@ -1084,10 +1106,6 @@ hexdump(buf, count);
#endif
return rc;
-#else
- errno = EIO; /* HACK */
- return -1;
-#endif
}
int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
diff --git a/rpmio/rpmurl.h b/rpmio/rpmurl.h
index a254fb5cf..4b02a21f4 100644
--- a/rpmio/rpmurl.h
+++ b/rpmio/rpmurl.h
@@ -53,20 +53,20 @@ struct urlinfo_s {
FD_t data; /*!< per-xfer data channel */
/*@relnull@*/
- void * capabilities; /*!< neon ne_server_capabilities ptr */
+ void * capabilities; /*!< neon: ne_server_capabilities ptr */
/*@relnull@*/
- void * lockstore; /*!< neon ne_lock_store ptr */
+ void * lockstore; /*!< neon: ne_lock_store ptr */
/*@relnull@*/
- void * sess; /*!< neon ne_session ptr */
- off_t current; /*!< neon current body offset. */
- off_t total; /*!< neon total body length. */
- int connstatus; /*!< neon connection status. */
+ void * sess; /*!< neon: ne_session ptr */
+ off_t current; /*!< neon: current body offset. */
+ off_t total; /*!< neon: total body length. */
+ int connstatus; /*!< neon: connection status. */
#ifdef REFERENCE
typedef enum {
- ne_conn_namelookup, /* lookup up hostname (info = hostname) */
- ne_conn_connecting, /* connecting to host (info = hostname) */
- ne_conn_connected, /* connected to host (info = hostname) */
- ne_conn_secure /* connection now secure (info = crypto level) */
+ ne_conn_namelookup, /* lookup up hostname (info = hostname) */
+ ne_conn_connecting, /* connecting to host (info = hostname) */
+ ne_conn_connected, /* connected to host (info = hostname) */
+ ne_conn_secure /* connection now secure (info = crypto level) */
} ne_conn_status;
#endif