From: Dmitry Stogov Date: Wed, 13 Feb 2008 16:22:01 +0000 (+0000) Subject: Use memrchr() instead of zend_memrchr() if available. (Nuno) X-Git-Tag: RELEASE_1_3_1~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fdaddc56d555faee3c4685b8280b7510f0ab8e7;p=php Use memrchr() instead of zend_memrchr() if available. (Nuno) --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 1bf25ee93e..7be7b77596 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef HAVE_IEEEFP_H #include @@ -239,6 +240,9 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end) return NULL; } +#ifdef HAVE_MEMRCHR +# define zend_memrchr(s,c,n) memrchr(s,c,n) +#else static inline void *zend_memrchr(const void *s, int c, size_t n) { register unsigned char *e; @@ -255,6 +259,7 @@ static inline void *zend_memrchr(const void *s, int c, size_t n) return NULL; } +#endif BEGIN_EXTERN_C() ZEND_API int increment_function(zval *op1); diff --git a/configure.in b/configure.in index e5dff11c71..2c74e09935 100644 --- a/configure.in +++ b/configure.in @@ -515,6 +515,7 @@ lchown \ lrand48 \ memcpy \ memmove \ +memrchr \ mkstemp \ mmap \ nl_langinfo \