diff options
| author | Anatol Belski <ab@php.net> | 2014-10-05 13:20:27 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-10-05 13:20:27 +0200 |
| commit | d58b70622a7e99ceee074e420d9271c2d8de116c (patch) | |
| tree | ad1e58504e4e54810fd2b2a3a18484a55a0d654c /ext/phar/phar.c | |
| parent | 7c7b9184b1fdf7add1715079f22241bc1185fcb0 (diff) | |
| download | php-git-d58b70622a7e99ceee074e420d9271c2d8de116c.tar.gz | |
properly export tsrm_strtok_r()
for this particular case fixing phar shared build, but for the
general usage anyway
Diffstat (limited to 'ext/phar/phar.c')
| -rw-r--r-- | ext/phar/phar.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 8f17c771d1..cdc61fee88 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2072,54 +2072,6 @@ static int php_check_dots(const char *element, int n) /* {{{ */ #define IS_BACKSLASH(c) ((c) == '/') -#ifdef COMPILE_DL_PHAR -/* stupid-ass non-extern declaration in tsrm_strtok.h breaks dumbass MS compiler */ -static inline int in_character_class(char ch, const char *delim) /* {{{ */ -{ - while (*delim) { - if (*delim == ch) { - return 1; - } - ++delim; - } - return 0; -} -/* }}} */ - -char *tsrm_strtok_r(char *s, const char *delim, char **last) /* {{{ */ -{ - char *token; - - if (s == NULL) { - s = *last; - } - - while (*s && in_character_class(*s, delim)) { - ++s; - } - - if (!*s) { - return NULL; - } - - token = s; - - while (*s && !in_character_class(*s, delim)) { - ++s; - } - - if (!*s) { - *last = s; - } else { - *s = '\0'; - *last = s + 1; - } - - return token; -} -/* }}} */ -#endif - /** * Remove .. and . references within a phar filename */ |
