[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn rev 7778: FAIL (i386-unknown-freebsdelf5.0 shared)

From: <brane_at_xbc.nu>
Date: 2003-11-17 15:57:32 CET

Quoting brane@xbc.nu:

> PASS: update apr
> PASS: update apr-util
> PASS: update subversion
> PASS: autogen.sh
>
> BUILD: Revision 7778 on i386-unknown-freebsdelf5.0 shared
[snip]

> cd subversion/clients/cmdline && /usr/local/bin/bash
> /home/brane/svn/obj-sh/libtool --silent --mode=link gcc -g -O2 -g -O2
> -DNEON_ZLIB -DNEON_SSL -L/usr/local/lib -L/usr/local/lib -rpath
> /home/brane/svn/inst/lib -o svn add-cmd.o blame-cmd.o cat-cmd.o
> checkout-cmd.o cleanup-cmd.o commit-cmd.o copy-cmd.o delete-cmd.o
> diff-cmd.o export-cmd.o help-cmd.o import-cmd.o info-cmd.o log-cmd.o
> ls-cmd.o main.o merge-cmd.o mkdir-cmd.o move-cmd.o notify.o prompt.o
> propdel-cmd.o propedit-cmd.o propget-cmd.o proplist-cmd.o props.o
> propset-cmd.o resolved-cmd.o revert-cmd.o status-cmd.o status.o
> switch-cmd.o update-cmd.o util.o
> ../../../subversion/libsvn_client/libsvn_client-1.la
> ../../../subversion/libsvn_wc/libsvn_wc-1.la
> ../../../subversion/libsvn_ra/libsvn_ra-1.la
> ../../../subversion/libsvn_delta/libsvn_delta-1.la
> ../../../subversion/libsvn_subr/libsvn_subr-1.la
> /home/brane/svn/obj-sh/apr-util/libaprutil-1.la -ldb4 -lexpat -liconv
> /home/brane/svn/obj-sh/apr/libapr-1.la -lm -lcrypt!
> /home/brane/svn/obj-sh/neon/src/libneon.la -L/usr/local/lib
> -L/home/brane/svn/inst/lib -lssl -lcrypto -lz -L/usr/lib -lgssapi
> -lkrb5 -lasn1 -lcrypto -lroken -lcrypt -lcom_err -lexpat
> /home/brane/svn/obj-sh/subversion/libsvn_ra_svn/.libs/libsvn_ra_svn-1.so:
> undefined reference to `apr_poll'
> *** Error code 1

The apr_poll interface was removed from HEAD, so we have to use apr_pollset_poll
instead. Here's a proposed patch; unfortunetely, it doesn't work :-( and I can't
debug it right now. Apologies if the patch gets wrapped, this mailer isn't among
the smartest...

[[[
Use the apr_pollset_t-based polling fucntions in svnserve.

* subversion/libsvn_ra_svn/ra_svn.h: Include apr_poll.h.
  (svn_ra_svn_conn_t): Add pollfd and pollset members.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn): Create a pollset for this connection.
  (svn_ra_svn__input_waiting): Use the connection's pollset to
  call apr_pollset_poll instead of the deprecated and now-dead
  apr_poll.
]]]

Index: subversion/libsvn_ra_svn/marshal.c
===================================================================
--- subversion/libsvn_ra_svn/marshal.c (revision 7778)
+++ subversion/libsvn_ra_svn/marshal.c (working copy)
@@ -59,6 +59,24 @@
   conn->block_baton = NULL;
   conn->capabilities = apr_hash_make(pool);
   conn->pool = pool;
+
+ conn->pollfd.p = pool;
+ conn->pollfd.client_data = NULL;
+ if (conn->sock)
+ {
+ conn->pollfd.desc_type = APR_POLL_SOCKET;
+ conn->pollfd.desc.s = conn->sock;
+ }
+ else
+ {
+ conn->pollfd.desc_type = APR_POLL_FILE;
+ conn->pollfd.desc.f = conn->in_file;
+ }
+
+ if (apr_pollset_create(&conn->pollset, 1, pool, 0)
+ || apr_pollset_add(conn->pollset, &conn->pollfd))
+ abort(); /* FIXME: What to do, what to do... ? */
+
   return conn;
 }
 
@@ -105,22 +123,12 @@
 svn_boolean_t svn_ra_svn__input_waiting(svn_ra_svn_conn_t *conn,
                                         apr_pool_t *pool)
 {
- apr_pollfd_t pfd;
+ const apr_pollfd_t *descriptors;
   int n;
-
- if (conn->sock)
- {
- pfd.desc_type = APR_POLL_SOCKET;
- pfd.desc.s = conn->sock;
- }
- else
- {
- pfd.desc_type = APR_POLL_FILE;
- pfd.desc.f = conn->in_file;
- }
- pfd.p = pool;
- pfd.reqevents = APR_POLLIN;
- return (APR_STATUS_IS_SUCCESS(apr_poll(&pfd, 1, &n, 0)) && n);
+ conn->pollfd.reqevents = APR_POLLIN;
+ return (APR_STATUS_IS_SUCCESS(apr_pollset_poll(conn->pollset, 0, &n,
+ &descriptors))
+ && n);
 }
 
 /* --- WRITE BUFFER MANAGEMENT --- */
Index: subversion/libsvn_ra_svn/ra_svn.h
===================================================================
--- subversion/libsvn_ra_svn/ra_svn.h (revision 7778)
+++ subversion/libsvn_ra_svn/ra_svn.h (working copy)
@@ -28,6 +28,7 @@
 #include <apr_network_io.h>
 #include <apr_file_io.h>
 #include <apr_thread_proc.h>
+#include <apr_poll.h>
 #include <svn_ra_svn.h>
 
 /* Handler for blocked writes. */
@@ -54,6 +55,10 @@
   void *block_baton;
   apr_hash_t *capabilities;
   apr_pool_t *pool;
+
+ /* These are used for polling */
+ apr_pollfd_t pollfd;
+ apr_pollset_t *pollset;
 };
 
 /* Set a callback for blocked writes on conn. This handler may

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 17 15:58:29 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.