From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2238 invoked by alias); 10 Jun 2014 17:08:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32765 Received: (qmail 12603 invoked from network); 10 Jun 2014 17:08:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: From: "Jun T." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [PATCH] building with --disable-multibyte Message-Id: Date: Wed, 11 Jun 2014 01:27:17 +0900 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-Mailer: Apple Mail (2.1878.2) X-Biglobe-Spnum: 63385 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 =3D pnext; MB_METACHARINIT(); pnext +=3D MB_METACHARLENCONV(pconv, &cstart); - if (cstart =3D=3D WEOF || pnext[0] !=3D '.' || pnext[1] !=3D '.') + if ( +#ifdef MULTIBYTE_SUPPORT + cstart =3D=3D WEOF || +#else + !cstart || +#endif + pnext[0] !=3D '.' || pnext[1] !=3D '.') return 0; pnext +=3D 2; if (itok(*pnext)) { @@ -2140,7 +2146,13 @@ bracechardots(char *str, convchar_t *c1p, = convchar_t *c2p) pconv =3D pnext; MB_METACHARINIT(); pnext +=3D MB_METACHARLENCONV(pconv, &cend); - if (cend =3D=3D WEOF || *pnext !=3D Outbrace) + if ( +#ifdef MULTIBYTE_SUPPORT + cend =3D=3D WEOF || +#else + !cend || +#endif + *pnext !=3D Outbrace) return 0; if (c1p) *c1p =3D cstart;