SOURCES: php-bugs-33720.patch (NEW) - mbstring bugfix

arekm arekm at pld-linux.org
Wed Nov 16 12:05:42 CET 2005


Author: arekm                        Date: Wed Nov 16 11:05:42 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- mbstring bugfix

---- Files affected:
SOURCES:
   php-bugs-33720.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/php-bugs-33720.patch
diff -u /dev/null SOURCES/php-bugs-33720.patch:1.1
--- /dev/null	Wed Nov 16 12:05:42 2005
+++ SOURCES/php-bugs-33720.patch	Wed Nov 16 12:05:37 2005
@@ -0,0 +1,53 @@
+diff -urbBN php-5.0.5.org/ext/mbstring/config.m4 php-5.0.5/ext/mbstring/config.m4
+--- php-5.0.5.org/ext/mbstring/config.m4	2005-02-21 00:02:48.000000000 +0100
++++ php-5.0.5/ext/mbstring/config.m4	2005-10-28 08:39:45.000000000 +0200
+@@ -1,5 +1,5 @@
+ dnl
+-dnl $Id$
++dnl $Id$
+ dnl
+ 
+ AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [
+@@ -55,7 +55,8 @@
+ AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
+   if test "$PHP_MBREGEX" = "yes"; then
+     AC_CACHE_CHECK(for variable length prototypes and stdarg.h, cv_php_mbstring_stdarg, [
+-      AC_TRY_COMPILE([#include <stdarg.h>], [
++      AC_TRY_RUN([
++#include <stdarg.h>
+ int foo(int x, ...) {
+ 	va_list va;
+ 	va_start(va, x);
+@@ -65,7 +66,19 @@
+ 	return 0;
+ }
+ int main() { return foo(10, "", 3.14); }
+-      ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no])
++      ], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], 
++ [
++  dnl cross-compile needs something here
++case $host_alias in
++*netware*)
++cv_php_mbstring_stdarg=yes
++;;
++*)
++cv_php_mbstring_stdarg=no
++;;
++esac
++]
++)
+     ])
+ 
+     AC_CHECK_HEADERS([stdlib.h string.h strings.h unistd.h sys/time.h sys/times.h])
+diff -urbBN php-5.0.5.org/ext/mbstring/libmbfl/mbfl/mbfilter.c php-5.0.5/ext/mbstring/libmbfl/mbfl/mbfilter.c
+--- php-5.0.5.org/ext/mbstring/libmbfl/mbfl/mbfilter.c	2005-04-22 07:03:25.000000000 +0200
++++ php-5.0.5/ext/mbstring/libmbfl/mbfl/mbfilter.c	2005-11-05 06:46:40.000000000 +0100
+@@ -1990,7 +1990,7 @@
+ 		break;
+ 
+ 	default:	/* ASCII */
+-		if (!qp_table[(c & 0xff)]) { /* ordinary characters */
++		if (c <= 0x00ff && !qp_table[(c & 0xff)]) { /* ordinary characters */
+ 			mbfl_memory_device_output(c, &pe->tmpdev);
+ 			pe->status1 = 1;
+ 		} else if (pe->status1 == 0 && c == 0x20) {	/* repeat SPACE */
================================================================



More information about the pld-cvs-commit mailing list