summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/pattern.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e0f7db06..daf8d19bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-04-09  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 22409: Src/pattern.c: fix compilation with --disable-multibyte.
+
 	* 22408: Doc/Zsh/expn.yo, Doc/Zsh/options.yo, Src/options.c,
 	Src/pattern.c, Src/utils.c, Src/zsh.h, Src/Zle/zle.h: add
 	MULTIBYTE option, (#u) and (#U) globbing flags, and support
diff --git a/Src/pattern.c b/Src/pattern.c
index c26ee9573..8f8b25610 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1043,11 +1043,7 @@ patcomppiece(int *flagp)
     union upat up;
     char *nptr, *str0, *ptr, *patprev;
     zrange_t from, to;
-#ifdef MULTIBYTE_SUPPORT
     char *charstart;
-#else
-    char cbuf[2];
-#endif
 
     flags = 0;
     str0 = patprev = patparse;
@@ -2133,7 +2129,7 @@ patmatchlen(void)
 #else
 #define ISUPPER(x)	isupper(x)
 #define ISLOWER(x)	islower(x)
-#define TOUPPER(x)	toupperr(x)
+#define TOUPPER(x)	toupper(x)
 #define TOLOWER(x)	tolower(x)
 #define ISDIGIT(x)	idigit(x)
 #endif
@@ -2722,7 +2718,10 @@ patmatch(Upat prog)
 		if (P_OP(next) == P_EXACTLY && P_LS_LEN(next) &&
 		    !(patglobflags & 0xff)) {
 		    char *nextop = P_LS_STR(next);
+#ifdef MULTIBYTE_SUPPORT
+		    /* else second argument of CHARREF isn't used */
 		    int nextlen = P_LS_LEN(next);
+#endif
 		    /*
 		     * If that P_EXACTLY is last (common in simple patterns,
 		     * such as *.c), then it can be only be matched at one