From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19283 invoked by alias); 26 May 2003 15:33:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16983 invoked from network); 26 May 2003 15:32:35 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 26 May 2003 15:32:35 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4QFWZH11381 for ; Mon, 26 May 2003 11:32:35 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4QFWZI24808 for ; Mon, 26 May 2003 11:32:35 -0400 Received: from localhost.redhat.com (IDENT:PTxP0Mvd5adqyd0JZraGPhFZDY/Be22b@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4QFWWo19648; Mon, 26 May 2003 11:32:33 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 57FCF2C43D; Mon, 26 May 2003 11:38:03 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16082.13530.758121.662876@localhost.redhat.com> Date: Mon, 26 May 2003 15:33:00 -0000 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com, ezannoni@redhat.com, chet@po.cwru.edu Subject: Re: Fix readline for platforms without In-Reply-To: <200305251129.h4PBTfrV010272@elgar.kettenis.dyndns.org> References: <200305251129.h4PBTfrV010272@elgar.kettenis.dyndns.org> X-SW-Source: 2003-05/txt/msg00483.txt.bz2 Mark Kettenis writes: > [ Chet, I don't now if you ever received the change that was > origionally made to the copy of readline in the GDB tree. Just in > case you intend to incorporate such a change in the next release of > readline, this patch solves a problem with it. ] > > There is a problem with one of our local GDB fixes for readline: > > 2003-03-03 Kris Warkentin > > * aclocal.m4: Cause wcwidth check to substitute > HAVE_WCWIDTH for building. > * Makefile.in: Add wcwidth object to lib if required. > * shlib/Makefile.in: Likewise. > * configure: Regenerate. > > The problem is that this patch is that support/wcwidth.c > unconditionally includes . Compilation of support/wcwidth.c > will therefore fail on platforms that don't have , such as > OpenBSD 3.0. > > The attached patch fixes this. I chose to fix this in aclocal.m4 > instead of using HAVE_WCHAR_H in support/wcwidth.c since it keeps that > file unchanged from the upstream sources. > > OK to check this in Elena? Ok with me. thanks elena > > Mark > > Index: ChangeLog.gdb > from Mark Kettenis > > * aclocal.m4: Don't add wcwidth.o if we don't have wchar.h. > * configure: Regenerate. > > Index: aclocal.m4 > =================================================================== > RCS file: /cvs/src/src/readline/aclocal.m4,v > retrieving revision 1.6 > diff -u -p -r1.6 aclocal.m4 > --- aclocal.m4 3 Mar 2003 18:52:27 -0000 1.6 > +++ aclocal.m4 25 May 2003 11:26:57 -0000 > @@ -1654,13 +1654,13 @@ AC_CHECK_HEADERS(langinfo.h) > > AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC)) > AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) > -AC_CHECK_FUNC(wcwidth, have_wcwidth=yes) > -if test "$have_wcwidth" = yes; then > - AC_DEFINE(HAVE_WCWIDTH) > - AC_SUBST(WCWIDTH_OBJ,) > +AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) > +if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then > + WCWIDTH_OBJ=wcwidth.o > else > - AC_SUBST(WCWIDTH_OBJ,wcwidth.o) > + WCWIDTH_OBJ= > fi > +AC_SUBST(WCWIDTH_OBJ) > > AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, > [AC_TRY_RUN([