Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] building with --disable-multibyte
- X-seq: zsh-workers 32765
- From: "Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] building with --disable-multibyte
- Date: Wed, 11 Jun 2014 01:27:17 +0900
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
If I try to build zsh without multibyte support by
$ ./configure --disable-multibyte
$ make
then I get compile error 'undeclared identifier WEOF' at lines
2132 and 2143 of glob.c.
The following patch will fix this.
All the tests (including D09brace.ztst) pass either with or
without --disable-multiby.
But there is another problem in brace expansion, which I will
discuss in the next post.
diff --git a/Src/glob.c b/Src/glob.c
index 15a5f70..6403e46 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2129,7 +2129,13 @@ bracechardots(char *str, convchar_t *c1p, convchar_t *c2p)
pconv = pnext;
MB_METACHARINIT();
pnext += MB_METACHARLENCONV(pconv, &cstart);
- if (cstart == WEOF || pnext[0] != '.' || pnext[1] != '.')
+ if (
+#ifdef MULTIBYTE_SUPPORT
+ cstart == WEOF ||
+#else
+ !cstart ||
+#endif
+ pnext[0] != '.' || pnext[1] != '.')
return 0;
pnext += 2;
if (itok(*pnext)) {
@@ -2140,7 +2146,13 @@ bracechardots(char *str, convchar_t *c1p, convchar_t *c2p)
pconv = pnext;
MB_METACHARINIT();
pnext += MB_METACHARLENCONV(pconv, &cend);
- if (cend == WEOF || *pnext != Outbrace)
+ if (
+#ifdef MULTIBYTE_SUPPORT
+ cend == WEOF ||
+#else
+ !cend ||
+#endif
+ *pnext != Outbrace)
return 0;
if (c1p)
*c1p = cstart;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author