[ATTN: PHP maintainer] Re: Fix for REAL_PAGE_SIZE in PHP

2017-05-04 Thread Richard H Lee
Here is my proposed patch for this bug: diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 3fd7fa0..f5b9bea 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -30,7 +30,11 @@ # if HAVE_UNISTD_H # include # if defined(_SC_PAGESIZE) +# ifdef __CYGWIN__ +#define REAL_PAG

Fix for REAL_PAGE_SIZE in PHP

2017-05-02 Thread Richard H Lee
There is a bug with PHP on Cygwin where it segfaults if the php file size is a multiple of 4K. https://bugs.php.net/bug.php?id=65312 PHP mmap()s source files as it it faster than using normal I/O. The problem is with the page size in Cygwin. When a file is mmap()ed to memory, any remaining byte