cvs: ZendEngine2 / zend_operators.h php-src configure.in
| From: | Antony Dovgal | Date: | Tue, 08 Aug 2006 09:40:50 +0000 |
| Subject: | cvs: ZendEngine2 / zend_operators.h php-src configure.in | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5178@lists.php.net to get a copy of this message | ||
tony2001 Tue Aug 8 09:40:50 2006 UTC
Modified files:
/php-src configure.in
/ZendEngine2 zend_operators.h
Log:
add zend_memrchr()
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.609&r2=1.610&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.609 php-src/configure.in:1.610
--- php-src/configure.in:1.609 Sun Aug 6 20:45:42 2006
+++ php-src/configure.in Tue Aug 8 09:40:50 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.609 2006/08/06 20:45:42 tony2001 Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.610 2006/08/08 09:40:50 tony2001 Exp $ -*- autoconf -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -489,6 +489,7 @@
lrand48 \
memcpy \
memmove \
+memrchr \
mkstemp \
mmap \
nl_langinfo \
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.h?r1=1.110&r2=1.111&diff_format=u
Index: ZendEngine2/zend_operators.h
diff -u ZendEngine2/zend_operators.h:1.110 ZendEngine2/zend_operators.h:1.111
--- ZendEngine2/zend_operators.h:1.110 Sun Feb 26 11:57:14 2006
+++ ZendEngine2/zend_operators.h Tue Aug 8 09:40:50 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.h,v 1.110 2006/02/26 11:57:14 dmitry Exp $ */
+/* $Id: zend_operators.h,v 1.111 2006/08/08 09:40:50 tony2001 Exp $ */
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
@@ -233,6 +233,29 @@
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;
+
+ for (e--; e >= (unsigned char *)s; e--) {
+ if (*e == (unsigned char)c) {
+ return (void *)e;
+ }
+ }
+
+ return NULL;
+}
+#endif
BEGIN_EXTERN_C()
ZEND_API int increment_function(zval *op1);