php8 windows build
Hi @tomassrnka!
Thanks for release 8.0 👍
Here is my current changes on commit 36d7181 for building on windows
diff --git a/src/memcache_binary_protocol.c b/src/memcache_binary_protocol.c
index 707b351..60d828f 100644
--- a/src/memcache_binary_protocol.c
+++ b/src/memcache_binary_protocol.c
@@ -26,7 +26,7 @@
#define MMC_DEBUG 0
#ifdef PHP_WIN32
-#include <win32/php_stdint.h>
+#include <main/php_stdint.h>
#include <winsock2.h>
#else
#include <stdint.h>
diff --git a/src/memcache_pool.h b/src/memcache_pool.h
index cb3d086..402372f 100644
--- a/src/memcache_pool.h
+++ b/src/memcache_pool.h
@@ -35,7 +35,7 @@
#endif
#ifdef PHP_WIN32
-#include <win32/php_stdint.h>
+#include <main/php_stdint.h>
#else
#include <stdint.h>
#endif
diff --git a/src/php_memcache.h b/src/php_memcache.h
index 4181849..4d1a89d 100644
Version 4.0.5.2 is still present in php_memcache.h
--- a/src/php_memcache.h
+++ b/src/php_memcache.h
@@ -67,7 +67,7 @@ PHP_FUNCTION(memcache_close);
PHP_FUNCTION(memcache_flush);
PHP_FUNCTION(memcache_set_sasl_auth_data);
-#define PHP_MEMCACHE_VERSION "4.0.5.2"
+#define PHP_MEMCACHE_VERSION "8.0"
#define MMC_DEFAULT_TIMEOUT 1 /* seconds */
#define MMC_DEFAULT_RETRY 15 /* retry failed server after x seconds */
Note, I also generate $Revision$ string on my windows releases at build time like this:
diff --git "a/src/memcache.c" "b/src/memcache.c"
index f994c1b..7f71313 100644
--- "a/src/memcache.c"
+++ "b/src/memcache.c"
@@ -780,7 +780,7 @@ PHP_MINFO_FUNCTION(memcache)
php_info_print_table_start();
php_info_print_table_header(2, "memcache support", "enabled");
php_info_print_table_row(2, "Version", PHP_MEMCACHE_VERSION);
- php_info_print_table_row(2, "Revision", "$Revision$");
+ php_info_print_table_row(2, "Revision", "b:NON_BLOCKING_IO_php8 v:8.0 c:36d7181 d:2020-12-06");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
Could you also move tag 8.0 on latest commit? (36d7181 not 1ae74d7)
Thanks in advance!
Yes, hopefully resolved now, sorry about that and thank you!
@nono303 could you please create pull request once you can create builds for Win? Much appreciated !
Hi @tomassrnka & Thanks for #81!
Concerning the include change for php_stdint.h on Windows between php7 win32/ and php8 main/ I just let you know what was my 'dirty patch' and did not submit a PR as far as i don't know how you want to manage it cleanly.
In my understanding cf. https://github.com/websupport-sk/pecl-memcache/pull/76#issuecomment-719842372: fixes and changes are not back-ported on NON_BLOCKING_IO_php7 and NON_BLOCKING_IO_php8 may now be also used for php7 release (what I do for >=7.2)
In this case, it may be quite confusing to stick NON_BLOCKING_IO_php8 for php8 only without properly conditioning the php_stdint.h include path, according to php major version.
So just give us a clear status of branch usage and life-cycle and I'll work on a clean PR, according to it ;)
This version mismatch also prevents using mlocati's script for installing memcache on a PHP 8 docker, could you look into that:
https://github.com/mlocati/docker-php-extension-installer/issues/244