php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65312
Patch cygwin-mmap-pagesize-patch revision 2017-05-05 16:56 UTC by ricardohenrylee at gmail dot com

Patch cygwin-mmap-pagesize-patch for *General Issues Bug #65312

Patch version 2017-05-05 16:56 UTC

Return to Bug #65312 | Download this patch
Patch Revisions:

Developer: ricardohenrylee@gmail.com

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
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Oct 22 20:03:44 2021 UTC