From dabf1053cdbd1bf8cd9020d16b41eb6b7ca2013f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 21 Oct 2002 22:54:37 +0000 Subject: Refine stream_select() to work with streams that have data in their read buffers. When selecting for read, the streams are examined; if any of them have pending read data, no actual select(2) call is performed; instead the streams with buffered data are returned; just like a regular select call. Prevent erroneous warning in stream_select when obtaining the fd. --- main/php_streams.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/php_streams.h') diff --git a/main/php_streams.h b/main/php_streams.h index 6861671360..e3b07f785a 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -455,7 +455,8 @@ PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char /* try really, really hard to make sure the cast happens (socketpair) */ #define PHP_STREAM_CAST_TRY_HARD 0x80000000 #define PHP_STREAM_CAST_RELEASE 0x40000000 /* stream becomes invalid on success */ -#define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE) +#define PHP_STREAM_CAST_INTERNAL 0x20000000 /* stream cast for internal use */ +#define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE | PHP_STREAM_CAST_INTERNAL) PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err TSRMLS_DC); /* use this to check if a stream can be cast into another form */ #define php_stream_can_cast(stream, as) _php_stream_cast((stream), (as), NULL, 0 TSRMLS_CC) -- cgit v1.2.1