From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22421 invoked from network); 6 May 2008 11:52:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 May 2008 11:52:14 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 97855 invoked from network); 6 May 2008 11:52:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 May 2008 11:52:07 -0000 Received: (qmail 22826 invoked by alias); 6 May 2008 11:52:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24940 Received: (qmail 22810 invoked from network); 6 May 2008 11:52:03 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 6 May 2008 11:52:03 -0000 Received: from tim.des.no (tim.des.no [194.63.250.121]) by bifrost.dotsrc.org (Postfix) with ESMTP id 8C94D80ED172 for ; Tue, 6 May 2008 13:51:59 +0200 (CEST) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 631BF209C; Tue, 6 May 2008 13:51:56 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Stephenson Cc: "Zsh Hackers' List" Subject: Re: zsh 4.3.6 FreeBSD bug References: <20080503073947.GA22661@redoubt.spodhuis.org> <864p9enuek.fsf@ds4.des.no> <86wsmamf2w.fsf@ds4.des.no> <20080505220236.GA81569@redoubt.spodhuis.org> <86lk2nn6fp.fsf@ds4.des.no> <86hcdbn6b3.fsf@ds4.des.no> <20080506102418.0bbc6b74@news01> <86skwvloha.fsf@ds4.des.no> <86od7jlo6r.fsf@ds4.des.no> <200805061042.m46Agort018779@news01.csr.com> Date: Tue, 06 May 2008 13:51:55 +0200 In-Reply-To: <200805061042.m46Agort018779@news01.csr.com> (Peter Stephenson's message of "Tue\, 06 May 2008 11\:42\:50 +0100") Message-ID: <86d4nzlkf8.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Virus-Scanned: ClamAV 0.91.2/7040/Tue May 6 03:52:15 2008 on bifrost X-Virus-Status: Clean --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Peter Stephenson writes: > Dag-Erling Sm=C3=B8rgrav writes: > > I should add that the patched glob in configure.ac is incorrect, but it > > works because of the way the port selectively applies the patch. The > > correct glob would be something like: > >=20 > > *openbsd*|*freebsd5*|*freebsd6[012]*) > > Thanks, that's what I was after... I've committed that. two problems I just discovered: 1) there should be a . after the 6. 2) m4 will gobble the square brackets, so the entire case statement needs to be quoted. New patch (relative to 4.3.6) attached. I've tested it on 6.2, 6.3, 7.0 and CURRENT. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=patch-ncurses --- configure.ac.orig 2008-03-28 12:49:32.000000000 +0100 +++ configure.ac 2008-05-05 09:47:30.860369561 +0200 @@ -669,20 +669,20 @@ termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; esac])dnl -AH_TEMPLATE([ZSH_CURSES_NEEDS_XOPEN], -[Define if the curses libraries need _XOPEN_SOURCE_EXTENDED defined]) -AC_CACHE_CHECK(if the curses library needs _XOPEN_SOURCE_EXTENDED, -zsh_cv_curses_needs_xopen, +AH_TEMPLATE([ZSH_NO_XOPEN], +[Define if _XOPEN_SOURCE_EXTENDED should not be defined to avoid clashes]) +AC_CACHE_CHECK(if _XOPEN_SOURCE_EXTENDED should not be defined, +zsh_cv_no_xopen, -[case "$host_os" in - *openbsd*) - zsh_cv_curses_needs_xopen=no +[[case "$host_os" in + *openbsd*|*freebsd5*|*freebsd6.[012]*) + zsh_cv_no_xopen=yes ;; *) - zsh_cv_curses_needs_xopen=yes + zsh_cv_no_xopen=no ;; -esac]) +esac]]) -if test x$zsh_cv_curses_needs_xopen = xyes; then - AC_DEFINE(ZSH_CURSES_NEEDS_XOPEN) +if test x$zsh_cv_no_xopen = xyes; then + AC_DEFINE(ZSH_NO_XOPEN) fi dnl Check for tigetflag (terminfo) before tgetent (termcap). --- Src/system.h.orig 2007-12-14 13:43:33.000000000 +0100 +++ Src/system.h 2008-05-05 09:50:17.333164563 +0200 @@ -52,9 +52,20 @@ # undef HAVE_SYS_UTSNAME_H #endif -#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN) -#define _XOPEN_SOURCE_EXTENDED 1 -#endif +#ifndef ZSH_NO_XOPEN +# ifdef ZSH_CURSES_SOURCE +# define _XOPEN_SOURCE_EXTENDED 1 +# else +# ifdef MULTIBYTE_SUPPORT +/* + * Needed for wcwidth() which is part of XSI. + * Various other uses of the interface mean we can't get away with just + * _XOPEN_SOURCE. + */ +# define _XOPEN_SOURCE_EXTENDED 1 +# endif /* MULTIBYTE_SUPPORT */ +# endif /* ZSH_CURSES_SOURCE */ +#endif /* ZSH_NO_XOPEN */ /* * Solaris by default zeroes all elements of the tm structure in --=-=-=--