From dfe1d9de952ce9d03d287eaee5c66d3576d09114 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Thu, 17 Sep 2015 02:16:12 +0200 Subject: [PATCH 1/3] Remove second redis_session.c, fix 'too many rules' --- config.w32 | 1 - 1 file changed, 1 deletion(-) diff --git a/config.w32 b/config.w32 index 628f87ed03..11953b1a48 100644 --- a/config.w32 +++ b/config.w32 @@ -7,7 +7,6 @@ ARG_ENABLE("redis-igbinary", "whether to enable igbinary serializer support", "n if (PHP_REDIS != "no") { var sources = "redis.c redis_commands.c library.c redis_session.c redis_array.c redis_array_impl.c redis_cluster.c cluster_library.c"; if (PHP_REDIS_SESSION != "no") { - ADD_SOURCES(configure_module_dirname, "redis_session.c", "redis"); ADD_EXTENSION_DEP("redis", "session"); ADD_FLAG("CFLAGS_REDIS", ' /D PHP_SESSION=1 '); AC_DEFINE("HAVE_REDIS_SESSION", 1); From c45231601f47d0630d5129e900c0609800563a93 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Thu, 17 Sep 2015 02:18:28 +0200 Subject: [PATCH 2/3] Better fix usleep --- library.c | 3 +++ redis_commands.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.c b/library.c index 43ea015b56..b58870e6ab 100644 --- a/library.c +++ b/library.c @@ -34,6 +34,9 @@ /* This proto is available from 5.5 on only */ PHP_REDIS_API int usleep(unsigned int useconds); # endif + # if PHP_MAJOR_VERSION >= 7 + PHP_REDIS_API int usleep(unsigned int useconds); + # endif #endif extern zend_class_entry *redis_ce; diff --git a/redis_commands.h b/redis_commands.h index a65244a7a1..c507bedcb8 100644 --- a/redis_commands.h +++ b/redis_commands.h @@ -11,9 +11,6 @@ }; int gettimeofday(struct timeval *tv, struct timezone *tz); # endif -# if defined(HAVE_USLEEP) - int usleep(unsigned int useconds); -# endif #endif #include "common.h" From c5fd1cfa906ebb5d2fd6d909b0824b11ad950c9c Mon Sep 17 00:00:00 2001 From: Jan-E Date: Thu, 17 Sep 2015 02:21:11 +0200 Subject: [PATCH 3/3] testZAddFirstArg should del('100') as a starter --- tests/RedisTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/RedisTest.php b/tests/RedisTest.php index 23539ca303..7fa5ea8068 100644 --- a/tests/RedisTest.php +++ b/tests/RedisTest.php @@ -1920,7 +1920,7 @@ public function testBRpopLpush() { public function testZAddFirstArg() { - $this->redis->del('key'); + $this->redis->del('100'); $zsetName = 100; // not a string! $this->assertTrue(1 === $this->redis->zAdd($zsetName, 0, 'val0'));