zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] building with --disable-multibyte
@ 2014-06-10 16:27 Jun T.
  0 siblings, 0 replies; only message in thread
From: Jun T. @ 2014-06-10 16:27 UTC (permalink / raw)
  To: zsh-workers

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;




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-10 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 16:27 [PATCH] building with --disable-multibyte Jun T.

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).