Rename IS_CALLABLE to MEMCACHE_IS_CALLABLE Fixes: warning: 'IS_CALLABLE' macro redefined [-Wmacro-redefined] https://github.com/websupport-sk/pecl-memcache/commit/fc76c47f621d819328b62d62ac756b7502aef595 --- memcache.c.orig +++ memcache.c @@ -1006,7 +1006,7 @@ static void php_mmc_failure_callback(mmc_pool_t *pool, mmc_t *mmc, void *param T /* check for userspace callback */ if (param != NULL && zend_hash_find(Z_OBJPROP_P((zval *)param), "_failureCallback", sizeof("_failureCallback"), (void **)&callback) == SUCCESS && Z_TYPE_PP(callback) != IS_NULL) { - if (IS_CALLABLE(*callback, 0, NULL)) { + if (MEMCACHE_IS_CALLABLE(*callback, 0, NULL)) { zval *retval = NULL; zval *host, *tcp_port, *udp_port, *error, *errnum; zval **params[5]; @@ -1233,7 +1233,7 @@ PHP_FUNCTION(memcache_add_server) } if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) { - if (!IS_CALLABLE(failure_callback, 0, NULL)) { + if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback"); RETURN_FALSE; } @@ -1295,7 +1295,7 @@ PHP_FUNCTION(memcache_set_server_params) } if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) { - if (!IS_CALLABLE(failure_callback, 0, NULL)) { + if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback"); RETURN_FALSE; } @@ -1360,7 +1360,7 @@ PHP_FUNCTION(memcache_set_failure_callback) } if (Z_TYPE_P(failure_callback) != IS_NULL) { - if (!IS_CALLABLE(failure_callback, 0, NULL)) { + if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback"); RETURN_FALSE; } --- php_memcache.h.orig +++ php_memcache.h @@ -72,9 +72,9 @@ PHP_FUNCTION(memcache_flush); #define MMC_DEFAULT_CACHEDUMP_LIMIT 100 /* number of entries */ #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3) -# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC) +# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC) #else -# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp)) +# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp)) #endif /* internal functions */