|
38 | 38 | #include <sys/socket.h> /* SO_KEEPALIVE */ |
39 | 39 | #else |
40 | 40 | #include <winsock.h> |
41 | | - |
42 | | - # if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION <= 4 |
43 | | - /* This proto is available from 5.5 on only */ |
44 | | - PHP_REDIS_API int usleep(unsigned int useconds); |
45 | | - # endif |
46 | | -#endif |
47 | | - |
48 | | -#if (PHP_MAJOR_VERSION < 7) |
49 | | - int (*_add_next_index_string)(zval *, const char *, int) = &add_next_index_string; |
50 | | - int (*_add_next_index_stringl)(zval *, const char *, uint, int) = &add_next_index_stringl; |
51 | | - int (*_add_assoc_bool_ex)(zval *, const char *, uint, int) = &add_assoc_bool_ex; |
52 | | - int (*_add_assoc_long_ex)(zval *, const char *, uint, long) = &add_assoc_long_ex; |
53 | | - int (*_add_assoc_double_ex)(zval *, const char *, uint, double) = &add_assoc_double_ex; |
54 | | - int (*_add_assoc_string_ex)(zval *, const char *, uint, char *, int) = &add_assoc_string_ex; |
55 | | - int (*_add_assoc_stringl_ex)(zval *, const char *, uint, char *, uint, int) = &add_assoc_stringl_ex; |
56 | | - int (*_add_assoc_zval_ex)(zval *, const char *, uint, zval *) = &add_assoc_zval_ex; |
57 | | - void (*_php_var_serialize)(smart_str *, zval **, php_serialize_data_t * TSRMLS_DC) = &php_var_serialize; |
58 | | - int (*_php_var_unserialize)(zval **, const unsigned char **, const unsigned char *, php_unserialize_data_t * TSRMLS_DC) = &php_var_unserialize; |
59 | | - |
60 | | -#define strpprintf zend_strpprintf |
61 | | - |
62 | | -static zend_string * |
63 | | -zend_strpprintf(size_t max_len, const char *format, ...) |
64 | | -{ |
65 | | - va_list ap; |
66 | | - zend_string *zstr; |
67 | | - |
68 | | - va_start(ap, format); |
69 | | - zstr = ecalloc(1, sizeof(*zstr)); |
70 | | - ZSTR_LEN(zstr) = vspprintf(&ZSTR_VAL(zstr), max_len, format, ap); |
71 | | - zstr->gc = 0x11; |
72 | | - va_end(ap); |
73 | | - return zstr; |
74 | | -} |
75 | | - |
76 | 41 | #endif |
77 | 42 |
|
78 | 43 | extern zend_class_entry *redis_ce; |
|
0 commit comments