Hello All,
This is the third in a series of patch submissions that will allow
subversion to run on the IBM iSeries under OS400 V5R4.
See: http://svn.haxx.se/dev/archive-2006-02/0519.shtml
Appreciate it if anyone has some time to review this.
Thanks,
Paul B.
[[[
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. We have also
experienced unpredictable failures with apr_poll() when the nsds parameter
is uninitialized.
* subversion/libsvn_ra_svn/marshal.c
(svn_ra_svn__input_waiting):
* subversion/libsvn_subr/prompt.c
(wait_for_input):
Initialize nsds parameter and supply pool argument for
apr_poll() calls.
]]]
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
+ * of n (apr_palloc fails) so we initialize it. */
+ n = 0;
+ /* OS400 requires a pool argument for apr_poll(). */
+ return ((apr_poll(&pfd, 1, &n, 0, pool) == APR_SUCCESS) && n);
+#endif
}
/* --- WRITE BUFFER MANAGEMENT --- */
Index: subversion/libsvn_subr/prompt.c
===================================================================
--- subversion/libsvn_subr/prompt.c (revision 18448)
+++ subversion/libsvn_subr/prompt.c (working copy)
@@ -59,7 +59,15 @@
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
if (n == 1 && pollset.rtnevents & APR_POLLIN)
return APR_SUCCESS;
_____________________________________________________________________________
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 Mon Feb 13 22:11:23 2006