From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23618 invoked from network); 4 May 2008 18:38:49 -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=AWL,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; 4 May 2008 18:38:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 29657 invoked from network); 4 May 2008 18:38:43 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 May 2008 18:38:43 -0000 Received: (qmail 29660 invoked by alias); 4 May 2008 18:38:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24916 Received: (qmail 29639 invoked from network); 4 May 2008 18:38:39 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 May 2008 18:38:39 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id CE3F080ED172 for ; Sun, 4 May 2008 20:38:35 +0200 (CEST) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080504184159.LCJF27050.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Sun, 4 May 2008 19:41:59 +0100 Received: from pws-pc ([81.107.40.67]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20080504184104.NMGR17393.aamtaout02-winn.ispmail.ntl.com@pws-pc>; Sun, 4 May 2008 19:41:04 +0100 Date: Sun, 4 May 2008 19:37:46 +0100 From: Peter Stephenson To: Peter Stephenson Cc: Phil Pennock , des@FreeBSD.org, "Zsh Hackers' List" Subject: Re: zsh 4.3.6 FreeBSD bug Message-ID: <20080504193746.1f663c4f@pws-pc> In-Reply-To: <20080504131913.5b0b0ca5@pws-pc> References: <20080503073947.GA22661@redoubt.spodhuis.org> <20080504131913.5b0b0ca5@pws-pc> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/7023/Sun May 4 19:35:05 2008 on bifrost X-Virus-Status: Clean On Sun, 4 May 2008 13:19:13 +0100 Peter Stephenson wrote: > I've now defined _XOPEN_SOURCE_EXTENDED to get wcwidth() even if curses > doesn't need it, because that's an XSI function; presumably that doesn't > want to happen on BSD either (it'll appear in the scope of the curses > files)? If so we'll need to revise the scope of the definition you > changed to mean never define _XOPEN_SOURCE_EXTENDED. I think we probably want something like this. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.99 diff -u -r1.99 configure.ac --- configure.ac 26 Apr 2008 17:46:46 -0000 1.99 +++ configure.ac 4 May 2008 18:37:06 -0000 @@ -682,20 +682,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 + *openbsd*|*freebsd*) + zsh_cv_no_xopen=yes ;; *) - zsh_cv_curses_needs_xopen=yes + zsh_cv_no_xopen=no ;; 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). Index: Src/system.h =================================================================== RCS file: /cvsroot/zsh/zsh/Src/system.h,v retrieving revision 1.51 diff -u -r1.51 system.h --- Src/system.h 23 Apr 2008 10:35:29 -0000 1.51 +++ Src/system.h 4 May 2008 18:37:10 -0000 @@ -52,19 +52,20 @@ # undef HAVE_SYS_UTSNAME_H #endif -#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN) -# define _XOPEN_SOURCE_EXTENDED 1 -#else -# ifdef MULTIBYTE_SUPPORT +#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 1*/ -# define _XOPEN_SOURCE_EXTENDED 1 -# endif -#endif +# 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 -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/