diff options
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 8e31d02bc5..4b83aa7189 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -223,9 +223,9 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha } #elif defined(PHP_WIN32) { - long handle = _get_osfhandle(self->fd); + zend_uintptr_t handle = _get_osfhandle(self->fd); - if (handle != 0xFFFFFFFF) { + if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) { self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; } } @@ -261,9 +261,9 @@ PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STRE } #elif defined(PHP_WIN32) { - long handle = _get_osfhandle(self->fd); + zend_uintptr_t handle = _get_osfhandle(self->fd); - if (handle != 0xFFFFFFFF) { + if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) { self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; } } @@ -601,7 +601,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void return -1; } - if ((long) ptrparam == PHP_STREAM_LOCK_SUPPORTED) { + if ((zend_uintptr_t) ptrparam == PHP_STREAM_LOCK_SUPPORTED) { return 0; } |