From: Dmitry Stogov Date: Wed, 13 Feb 2008 16:22:12 +0000 (+0000) Subject: Use memrchr() instead of zend_memrchr() if available. (Nuno) X-Git-Tag: RELEASE_2_0_0a1~489 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0df9f4852f3e4199b436716b81d78de165b7ee98;p=php Use memrchr() instead of zend_memrchr() if available. (Nuno) --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 2e7c437de7..e9b7adafe3 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -24,6 +24,7 @@ #include #include +#include #ifdef HAVE_IEEEFP_H #include @@ -250,6 +251,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; @@ -266,6 +270,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 64d6f66196..01e41be1a3 100644 --- a/configure.in +++ b/configure.in @@ -514,6 +514,7 @@ lchown \ lrand48 \ memcpy \ memmove \ +memrchr \ mkstemp \ mmap \ nl_langinfo \