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

Re: [PATCH] #3 Update on port to OS400/EBCDIC

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-02-14 15:45:42 CET

Julian Foad <julianfoad@btopenworld.com> wrote on 02/13/2006 05:31:50 PM:

> Paul Burba wrote:
> > Index: subversion/libsvn_ra_svn/marshal.c
> > ===================================================================
> > --- subversion/libsvn_ra_svn/marshal.c (revision 18448)
> > +++ subversion/libsvn_ra_svn/marshal.c (working copy)
> > @@ -121,7 +121,15 @@
> > }
> > pfd.p = pool;
> > pfd.reqevents = APR_POLLIN;
> > +#ifndef AS400
> > return ((apr_poll(&pfd, 1, &n, 0) == APR_SUCCESS) && n);
> > +#else
> > + /* IBM's apr_poll() implmentation behaves badly with some large
values
>
> Typo: "implementation" (in both files).
>
> > + * of n (apr_palloc fails) so we initialize it. */
> > + n = 0;
>
> That sounds like a trivial bug. Will IBM soon release a version of APR
with
> this bug fixed?

Damn, I should assume nothing. While IBM didn't explicitly tell us they
fixed this problem, I just rechecked and one of their recent V5R4 PTFs
(Program Temporary Fix) for OS400 fixed it. So this initialization is N/A
now and the patch has a bit less "yuck".
 
> > + /* OS400 requires a pool argument for apr_poll(). */
> > + return ((apr_poll(&pfd, 1, &n, 0, pool) == APR_SUCCESS) && n);
> > +#endif
>
> It would make sense for mainstream APR to revise this API, adding the
pool
> parameter. Do you know if IBM has proposed that to the APR
> developers (or are
> likely to)?

I think it's safe to say that IBM won't address it.

> > pollset.p = pool;
> > pollset.reqevents = APR_POLLIN;
> >
> > +#ifndef AS400
> > srv = apr_poll(&pollset, 1, &n, -1);
> > +#else
> > + /* IBM's apr_poll() implmentation behaves badly with some large
values
> > + * of n (apr_palloc fails) so we initialize it. */
> > + n = 0;
> > + /* OS400 requires a pool argument for apr_poll(). */
> > + srv = apr_poll(&pollset, 1, &n, -1, pool);
> > +#endif
> >
>
> Well, honestly, yuck, but as it's only twice, and doesn't touch any of
our
> APIs, I could accept this patch as it is.

Can I take this as a +1? :-)
 
[[[
OS400/EBCDIC Port: apr_poll() signature differences.

This is the third of several patches to allow Subversion to run on IBM's
OS400 V5R4.

IBM's implementation of apr_poll() requires a pool argument.

Approved by: Julian Foad <julianfoad@btopenworld.com>

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__input_waiting):
* subversion/libsvn_subr/prompt.c
  (wait_for_input):
   Supply pool argument for apr_poll() calls on OS400.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Feb 14 15:47:07 2006

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.