Changeset 671
Legend:
- Unmodified
- Added
- Removed
-
trunk/utils.c
r669 r671 921 921 } 922 922 /* }}} */ 923 924 #ifndef ZEND_ENGINE_2_3 925 size_t zend_dirname(char *path, size_t len) /* {{{ */ 926 { 927 php_dirname(path, len); 928 return strlen(path); 929 } 930 /* }}} */ 931 932 long zend_atol(const char *str, int str_len) /* {{{ */ 933 { 934 long retval; 935 936 if (!str_len) { 937 str_len = strlen(str); 938 } 939 940 retval = strtol(str, NULL, 0); 941 if (str_len > 0) { 942 switch (str[str_len - 1]) { 943 case 'g': 944 case 'G': 945 retval *= 1024; 946 /* break intentionally missing */ 947 case 'm': 948 case 'M': 949 retval *= 1024; 950 /* break intentionally missing */ 951 case 'k': 952 case 'K': 953 retval *= 1024; 954 break; 955 } 956 } 957 958 return retval; 959 } 960 /* }}} */ 961 962 #endif -
trunk/utils.h
r669 r671 134 134 #endif 135 135 136 #ifndef ZEND_ENGINE_2_3 137 size_t zend_dirname(char *path, size_t len); 138 long zend_atol(const char *str, int len); 139 #endif 140 136 141 typedef struct { 137 142 zend_uint size; -
trunk/xcache.c
r670 r671 37 37 #include "opcode_spec.h" 38 38 #include "utils.h" 39 40 #ifndef ZEND_ENGINE_2_341 ZEND_DLEXPORT size_t zend_dirname(char *path, size_t len)42 {43 php_dirname(path, len);44 return strlen(path);45 }46 #endif47 39 48 40 #define VAR_ENTRY_EXPIRED(pentry) ((pentry)->ttl && XG(request_time) > pentry->ctime + (pentry)->ttl) -
trunk/xcache.h
r662 r671 62 62 #ifndef IS_CONSTANT_TYPE_MASK 63 63 # define IS_CONSTANT_TYPE_MASK (~IS_CONSTANT_INDEX) 64 #endif65 66 #ifndef ZEND_ENGINE_2_367 #define zend_dirname(path, len) xc_dirname(path, len)68 64 #endif 69 65

