summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2009-04-19 13:46:47 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2009-04-19 13:46:47 +0000
commit14c717f449934f1fd611451c20a95344635fc83b (patch)
treeb26ac7e9e868e09527519aa20b58b66a7cbcd0e8 /main/php_streams.h
parent0c6cf02985c4d4b847a0228344ad1358b3676cbe (diff)
downloadphp-git-14c717f449934f1fd611451c20a95344635fc83b.tar.gz
Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams)
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 5c699f2e97..fab62c19af 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -420,9 +420,14 @@ END_EXTERN_C()
* Uses mmap if the src is a plain file and at offset 0 */
#define PHP_STREAM_COPY_ALL ((size_t)-1)
+#define PHP_STREAM_FAILURE ((size_t)-1)
+
BEGIN_EXTERN_C()
+ZEND_ATTRIBUTE_DEPRECATED
PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC);
#define php_stream_copy_to_stream(src, dest, maxlen) _php_stream_copy_to_stream((src), (dest), (maxlen) STREAMS_CC TSRMLS_CC)
+PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC);
+#define php_stream_copy_to_stream_ex(src, dest, maxlen) _php_stream_copy_to_stream_ex((src), (dest), (maxlen) STREAMS_CC TSRMLS_CC)
/* read all data from stream and put into a buffer. Caller must free buffer when done.