You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/15 08:21:58 UTC

svn commit: r1532206 - /subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp

Author: brane
Date: Tue Oct 15 06:21:57 2013
New Revision: 1532206

URL: http://svn.apache.org/r1532206
Log:
We're stuck with the ancient pipe API in apr < 1.3.

* subversion/bindings/javahl/native/OperationContext.cpp:
   Include svn_dep_compat.h.
  (TunnelContext::TunnelContext): If we're compiling with an old enough APR,
   use apr_file_pipe_create instead of apr_file_pipe_create_ex.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp

Modified: subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp?rev=1532206&r1=1532205&r2=1532206&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp Tue Oct 15 06:21:57 2013
@@ -28,6 +28,7 @@
 
 #include "svn_client.h"
 #include "private/svn_wc_private.h"
+#include "private/svn_dep_compat.h"
 #include "svn_private_config.h"
 
 #include "GlobalConfig.h"
@@ -476,11 +477,21 @@ public:
       response_in(NULL),
       response_out(NULL)
     {
+#if APR_VERSION_AT_LEAST(1, 3, 0)
       status = apr_file_pipe_create_ex(&request_in, &request_out,
                                        APR_FULL_BLOCK, pool);
       if (!status)
         status = apr_file_pipe_create_ex(&response_in, &response_out,
                                          APR_FULL_BLOCK, pool);
+#else
+      // XXX APR compatibility note:
+      // Versions of APR before 1.3 do not have the extended pipe
+      // API. Just create a default pipe and just hope that it returns
+      // a blocking handle.
+      status = apr_file_pipe_create(&request_in, &request_out, pool);
+      if (!status)
+        status = apr_file_pipe_create(&response_in, &response_out, pool);
+#endif
     }
 
   apr_file_t *request_in;