From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] building with --disable-multibyte
Date: Wed, 11 Jun 2014 01:27:17 +0900 [thread overview]
Message-ID: <D5E12842-A674-476B-A0D8-8968912199CD@kba.biglobe.ne.jp> (raw)
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;
reply other threads:[~2014-06-10 17:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D5E12842-A674-476B-A0D8-8968912199CD@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).