From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6693 invoked from network); 23 Apr 2008 10:33:46 -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.4 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; 23 Apr 2008 10:33:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 35137 invoked from network); 23 Apr 2008 10:33:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Apr 2008 10:33:40 -0000 Received: (qmail 27653 invoked by alias); 23 Apr 2008 10:33:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24867 Received: (qmail 27638 invoked from network); 23 Apr 2008 10:33:36 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 Apr 2008 10:33:36 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 17251808A38B for ; Wed, 23 Apr 2008 12:33:27 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly50d.srv.mailcontrol.com (MailControl) with ESMTP id m3NAXMAc003354 for ; Wed, 23 Apr 2008 11:33:24 +0100 Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Apr 2008 11:33:22 +0100 Date: Wed, 23 Apr 2008 11:33:22 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: alternative wcwidth() implementation Message-ID: <20080423113322.18e43f6e@news01> In-Reply-To: <20080422171543.5bc9f519@news01> References: <31339.1208861418@csr.com> <20080422171543.5bc9f519@news01> Organization: CSR X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Apr 2008 10:33:22.0290 (UTC) FILETIME=[7445C520:01C8A52D] X-Scanned-By: MailControl A-08-00-04 (www.mailcontrol.com) on 10.68.0.160 X-Virus-Scanned: ClamAV 0.91.2/6902/Wed Apr 23 11:30:49 2008 on bifrost X-Virus-Status: Clean On Tue, 22 Apr 2008 17:15:43 +0100 Peter Stephenson wrote: > On Tue, 22 Apr 2008 11:50:18 +0100 > Peter Stephenson wrote: > > I note we should supposedly be defining _XOPEN_SOURCE to get wcwidth(), > > at least with glibc, but apparently generally don't (though I did for the > > configure test). I'm a bit frightened of changing this, but POSIX does > > suggest it's part of the XSI extension, so probably we ought to. > > Indeed, we do define _XOPEN_SOURCE_EXTENDED if needed for curses.h; > > probably the right thing to do is in the #else case, #define > > _XOPEN_SOURCE if MULTIBYTE_SUPPORT is present. > > Let's try it. On Solaris 8 this isn't good enough: we need the _EXTENDED version or we don't get the full interface from sys/time.h. That's already in use in some cases, maybe this isn't too big a deal... Index: Src/system.h =================================================================== RCS file: /cvsroot/zsh/zsh/Src/system.h,v retrieving revision 1.50 diff -u -r1.50 system.h --- Src/system.h 22 Apr 2008 16:18:55 -0000 1.50 +++ Src/system.h 23 Apr 2008 10:30:05 -0000 @@ -56,8 +56,13 @@ # define _XOPEN_SOURCE_EXTENDED 1 #else # ifdef MULTIBYTE_SUPPORT -/* Needed for wcwidth() which is part of XSI */ -# define _XOPEN_SOURCE 1 +/* + * 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 -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070