[ATTN: Yaakov Selkowitz / PHP maintainer] Re: Composer segfault on multiple configurations

Richard H Lee ricardohenrylee@gmail.com
Tue May 30 18:59:00 GMT 2017


Yaakov,

I probably should have copied you in on the last message to get your 
attention.

It's just a simple patch to fix this page size issue with php on Cygwin. 
Would be grateful if you could review and possibly accept this patch, as 
it has been confirmed and does affect several people.

Richard
-------------- next part --------------
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 <unistd.h>
 #  if defined(_SC_PAGESIZE)
+#   ifdef __CYGWIN__
+#    define REAL_PAGE_SIZE 4096
+#   else
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE);
+#   endif
 #  elif defined(_SC_PAGE_SIZE)
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE);
 #  endif
diff --git a/main/main.c b/main/main.c
index 01ed3a6..0909309 100644
--- a/main/main.c
+++ b/main/main.c
@@ -96,7 +96,11 @@
 # if HAVE_UNISTD_H
 #  include <unistd.h>
 #  if defined(_SC_PAGESIZE)
+#   ifdef __CYGWIN__
+#    define REAL_PAGE_SIZE 4096
+#   else
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE);
+#   endif
 #  elif defined(_SC_PAGE_SIZE)
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE);
 #  endif
-------------- next part --------------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list