Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2018-12-20 16:04:13 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2018-12-22 16:31:51 +0300
commitbb32e6f3a0e93b1de9235de2db496fb1bfc400d0 (patch)
tree32bea8aa6ba652927b18d810d8c0a08b86070498 /common.h
parent3e7e1c833d08aac4e0eeb4e37dcc44768c8b117c (diff)
Implement consistent hashing algorithm for RedisArray
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.h b/common.h
index adbe3035..122c9627 100644
--- a/common.h
+++ b/common.h
@@ -644,6 +644,17 @@ typedef enum _PUBSUB_TYPE {
#define REDIS_ENABLE_MODE(redis_sock, m) (redis_sock->mode |= m)
#define REDIS_DISABLE_MODE(redis_sock, m) (redis_sock->mode &= ~m)
+/* HOST_NAME_MAX doesn't exist everywhere */
+#ifndef HOST_NAME_MAX
+ #if defined(_POSIX_HOST_NAME_MAX)
+ #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+ #elif defined(MAXHOSTNAMELEN)
+ #define HOST_NAME_MAX MAXHOSTNAMELEN
+ #else
+ #define HOST_NAME_MAX 255
+ #endif
+#endif
+
typedef struct fold_item {
zval * (*fun)(INTERNAL_FUNCTION_PARAMETERS, void *, ...);
void *ctx;