From 14c717f449934f1fd611451c20a95344635fc83b Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sun, 19 Apr 2009 13:46:47 +0000 Subject: Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams) --- main/php_streams.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main/php_streams.h') 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. -- cgit v1.2.1