]> granicus.if.org Git - php/commitdiff
there is no realiable way to detect memrchr() presence because of a mess in glibc
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 10:53:06 +0000 (10:53 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 10:53:06 +0000 (10:53 +0000)
so let's use our own implementation

Zend/zend_operators.h
configure.in

index 090a8057edd13b7bc973c73256dda82567c4c258..3afd3c95d57e923f53f5e1436aae0da9628cd3ce 100644 (file)
@@ -233,16 +233,6 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
        return NULL;
 }
 
-#ifdef HAVE_MEMRCHR
-# ifndef __USE_GNU
-#  define __USE_GNU
-# endif
-
-#include <string.h>
-#define zend_memrchr memrchr
-
-#else
-
 static inline void *zend_memrchr(const void *s, int c, size_t n)
 {
        register unsigned char *e = (unsigned char *)s + n;
@@ -255,7 +245,6 @@ 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);
index 6444ba6e41e0f2f40d57e55e3639fefa623c33da..c5270bbedbc75dfdbfb0926146344892f0c45025 100644 (file)
@@ -489,7 +489,6 @@ lchown \
 lrand48 \
 memcpy \
 memmove \
-memrchr \
 mkstemp \
 mmap \
 nl_langinfo \