--- /dev/null
+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 */