From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21750 invoked from network); 14 Dec 2007 13:05:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Dec 2007 13:05:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 66757 invoked from network); 14 Dec 2007 13:05:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Dec 2007 13:05:08 -0000 Received: (qmail 10314 invoked by alias); 14 Dec 2007 13:05:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24252 Received: (qmail 10283 invoked from network); 14 Dec 2007 13:04:59 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 14 Dec 2007 13:04:59 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id E99D18058F54 for ; Fri, 14 Dec 2007 14:02:10 +0100 (CET) Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [85.115.41.190]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Fri, 14 Dec 2007 14:02:10 +0100 (CET) Received: from rly17g.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly17g.srv.mailcontrol.com (MailControl) with ESMTP id lBED4ijn007758 for ; Fri, 14 Dec 2007 13:04:50 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly17g.srv.mailcontrol.com (MailControl) id lBED4LF2005500 for zsh-workers@sunsite.dk; Fri, 14 Dec 2007 13:04:21 GMT Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly17g-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id lBED40mr003986; Fri, 14 Dec 2007 13:04:19 +0000 (GMT) Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 14 Dec 2007 13:04:02 +0000 Date: Fri, 14 Dec 2007 13:04:02 +0000 From: Peter Stephenson To: Pea Cc: "Zsh Hackers' List" Subject: Re: 4.3.4-dev-4 and 4.2.6-dev-2 available Message-ID: <20071214130402.758beeb2@news01> In-Reply-To: <20071214133035.2cf97761@portable.raveland.priv> References: <22582.1197372038@csr.com> <20071213160915.4bcabae3@raveland.org> <20071213181050.55477e48@news01> <20071214104523.32bf017b@portable.raveland.priv> <200712141023.lBEANLI5001150@news01.csr.com> <20071214133035.2cf97761@portable.raveland.priv> Organization: CSR X-Mailer: Claws Mail 3.1.0 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Dec 2007 13:04:02.0831 (UTC) FILETIME=[CCBD99F0:01C83E51] X-Scanned-By: MailControl A-08-00-01 (www.mailcontrol.com) on 10.71.1.127 X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 14 Dec 2007 13:30:35 +0100 Pea wrote: > > Is there any indication of why the headers are allowing wchar_t to be > > defined twice? Is there are anything around lines 54/59 of stddef.h > > that would indicate what's going on? > > > > I think I found the problem. > In ncurses.h (line 94): > > #ifdef _XOPEN_SOURCE_EXTENDED > #include /* we want wchar_t */ > #endif /* _XOPEN_SOURCE_EXTENDED */ > > and in Src/Modules/src.c we have #define _XOPEN_SOURCE_EXTENDED 1 > If i remove this line, compilation doesn't fail. Thanks for investigating. OK, so that has to come out for openbsd. I hope the following patch does the trick: it's a bit complicated in order to ensure we get the definition before any system header files. Clint, can you remember why we needed _XOPEN_SOURCE_EXTENDED for curses.c? We should at least document it. This seems to have been there since the start. > I added --with-term-lib=curses to my configure and i have not applied > your patch. It should now be OK not to use --with-term-lib (and to ignore the previous patch): it looks like this is ultimately picking up the same files anyway, and I'd like to be sure it compiles without special options. > zmodload zsh/curses works. Let me play with this and i will say you if > i have some pbs. Thank you. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.86 diff -u -r1.86 configure.ac --- configure.ac 7 Dec 2007 11:34:48 -0000 1.86 +++ configure.ac 14 Dec 2007 12:53:37 -0000 @@ -669,6 +669,22 @@ 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, +[case "$host_os" in + *openbsd*) + zsh_cv_curses_needs_xopen=no + ;; + *) + zsh_cv_curses_needs_xopen=yes + ;; +esac]) +if test x$zsh_cv_curses_needs_xopen = xyes; then + AC_DEFINE(ZSH_CURSES_NEEDS_XOPEN) +fi + AH_TEMPLATE([HAVE_BOOLCODES], [Define if you have the termcap boolcodes symbol.]) AH_TEMPLATE([HAVE_NUMCODES], Index: Src/system.h =================================================================== RCS file: /cvsroot/zsh/zsh/Src/system.h,v retrieving revision 1.48 diff -u -r1.48 system.h --- Src/system.h 1 Nov 2007 17:57:57 -0000 1.48 +++ Src/system.h 14 Dec 2007 12:53:37 -0000 @@ -52,6 +52,10 @@ # undef HAVE_SYS_UTSNAME_H #endif +#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN) +#define _XOPEN_SOURCE_EXTENDED 1 +#endif + /* * Solaris by default zeroes all elements of the tm structure in * strptime(). Unfortunately that gives us no way of telling whether Index: Src/Modules/curses.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v retrieving revision 1.42 diff -u -r1.42 curses.c --- Src/Modules/curses.c 21 Nov 2007 09:53:49 -0000 1.42 +++ Src/Modules/curses.c 14 Dec 2007 12:53:38 -0000 @@ -27,7 +27,7 @@ * */ -#define _XOPEN_SOURCE_EXTENDED 1 +#define ZSH_CURSES_SOURCE 1 #include "curses.mdh" #include "curses.pro" -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070