You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/09/11 11:10:12 UTC
svn commit: r1702410 - /subversion/trunk/subversion/libsvn_subr/stream.c
Author: stefan2
Date: Fri Sep 11 09:10:12 2015
New Revision: 1702410
URL: http://svn.apache.org/r1702410
Log:
Revert r1702305 due to issues with pipes in APR.
Modified:
subversion/trunk/subversion/libsvn_subr/stream.c
Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1702410&r1=1702409&r2=1702410&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Fri Sep 11 09:10:12 2015
@@ -1063,13 +1063,10 @@ static svn_stream_t *
make_stream_from_apr_file(apr_file_t *file,
svn_boolean_t disown,
svn_boolean_t supports_seek,
- svn_boolean_t supports_read,
- svn_boolean_t supports_write,
apr_pool_t *pool)
{
struct baton_apr *baton;
svn_stream_t *stream;
- apr_int32_t flags;
if (file == NULL)
return svn_stream_empty(pool);
@@ -1078,11 +1075,8 @@ make_stream_from_apr_file(apr_file_t *fi
baton->file = file;
baton->pool = pool;
stream = svn_stream_create(baton, pool);
-
- if (supports_read)
- svn_stream_set_read2(stream, read_handler_apr, read_full_handler_apr);
- if (supports_write)
- svn_stream_set_write(stream, write_handler_apr);
+ svn_stream_set_read2(stream, read_handler_apr, read_full_handler_apr);
+ svn_stream_set_write(stream, write_handler_apr);
if (supports_seek)
{
@@ -1106,18 +1100,7 @@ svn_stream_from_aprfile2(apr_file_t *fil
svn_boolean_t disown,
apr_pool_t *pool)
{
- /* Enable read and write only if the underlying file actually supports it.
- *
- * Special files like STDIN will have no flags set at all. In that case,
- * we can't filter and must allow any operation - which may then fail at
- * the APR level further down the stack.
- */
- apr_uint32_t flags = apr_file_flags_get(file);
- svn_boolean_t supports_read = (flags == 0) || (flags & APR_READ);
- svn_boolean_t supports_write = (flags == 0) || (flags & APR_WRITE);
-
- return make_stream_from_apr_file(file, disown, TRUE, supports_read,
- supports_write, pool);
+ return make_stream_from_apr_file(file, disown, TRUE, pool);
}
apr_file_t *
@@ -1868,8 +1851,7 @@ svn_stream_for_stdin(svn_stream_t **in,
it does not, or the behavior is implementation-specific. Hence,
we cannot safely advertise mark(), seek() and non-default skip()
support. */
- *in = make_stream_from_apr_file(stdin_file, TRUE, FALSE, TRUE, FALSE,
- pool);
+ *in = make_stream_from_apr_file(stdin_file, TRUE, FALSE, pool);
return SVN_NO_ERROR;
}
@@ -1889,8 +1871,7 @@ svn_stream_for_stdout(svn_stream_t **out
it does not, or the behavior is implementation-specific. Hence,
we cannot safely advertise mark(), seek() and non-default skip()
support. */
- *out = make_stream_from_apr_file(stdout_file, TRUE, FALSE, FALSE, TRUE,
- pool);
+ *out = make_stream_from_apr_file(stdout_file, TRUE, FALSE, pool);
return SVN_NO_ERROR;
}
@@ -1910,8 +1891,7 @@ svn_stream_for_stderr(svn_stream_t **err
it does not, or the behavior is implementation-specific. Hence,
we cannot safely advertise mark(), seek() and non-default skip()
support. */
- *err = make_stream_from_apr_file(stderr_file, TRUE, FALSE, FALSE, TRUE,
- pool);
+ *err = make_stream_from_apr_file(stderr_file, TRUE, FALSE, pool);
return SVN_NO_ERROR;
}