memcache 2.0.2 does not compile on PHP 5.1.4
| From: | BUSTARRET, Jean-Francois | Date: | Mon, 15 May 2006 09:26:53 +0000 |
| Subject: | memcache 2.0.2 does not compile on PHP 5.1.4 | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-3775@lists.php.net to get a copy of this message | ||
Because of OnUpdateInt...
Here is a patch for Zend2 compatibility :
--- memcache-2.0.2.orig/memcache.c 2006-05-14 13:36:19.000000000 +0200
+++ memcache-2.0.2/memcache.c 2006-05-15 11:21:01.000000000 +0200
@@ -43,6 +43,10 @@
#include "php_network.h"
#include "php_memcache.h"
+#ifndef ZEND_ENGINE_2
+#define OnUpdateLong OnUpdateInt
+#endif
+
/* True global resources - no need for thread safety here */
static int le_memcache_pool, le_pmemcache;
static zend_class_entry *memcache_class_entry_ptr;
@@ -129,14 +133,14 @@ static PHP_INI_MH(OnUpdateChunkSize) /*
return FAILURE;
}
- return OnUpdateInt(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage
TSRMLS_CC);
+ return OnUpdateLong(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage
TSRMLS_CC);
}
/* }}} */
/* {{{ PHP_INI */
PHP_INI_BEGIN()
- STD_PHP_INI_ENTRY("memcache.allow_failover", "1", PHP_INI_ALL, OnUpdateInt,
allow_failover, zend_memcache_globals, memcache_globals)
- STD_PHP_INI_ENTRY("memcache.default_port", "11211", PHP_INI_ALL,
OnUpdateInt, default_port, zend_memcache_globals, memcache_globals)
+ STD_PHP_INI_ENTRY("memcache.allow_failover", "1", PHP_INI_ALL,
OnUpdateLong, allow_failover, zend_memcache_globals, memcache_globals)
+ STD_PHP_INI_ENTRY("memcache.default_port", "11211", PHP_INI_ALL,
OnUpdateLong, default_port, zend_memcache_globals, memcache_globals)
STD_PHP_INI_ENTRY("memcache.chunk_size", "8192", PHP_INI_ALL,
OnUpdateChunkSize, chunk_size, zend_memcache_globals, memcache_globals)
PHP_INI_END()
/* }}} */
Jean-François Bustarret
eTF1 - Responsable infrastructure et système
http://www.tf1.fr <http://www.tf1.fr/>