From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9676 invoked by alias); 26 Feb 2003 20:52:12 -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 9667 invoked from network); 26 Feb 2003 20:52:11 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by 172.16.49.205 with SMTP; 26 Feb 2003 20:52:11 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id PAA04998; Wed, 26 Feb 2003 15:39:54 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id PAA09064; Wed, 26 Feb 2003 15:52:10 -0500 Message-ID: <008201c2ddd8$f1d09b90$0202040a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: References: <00d101c2ddbd$6d3bfac0$0202040a@catdog> <20030226173758.GA14836@nevyn.them.org> <00e901c2ddbe$b23815e0$0202040a@catdog> <20030226175141.GA15347@nevyn.them.org> <00fd01c2ddc0$28ab75e0$0202040a@catdog> <20030226175915.GA15700@nevyn.them.org> <013401c2ddc7$000abf90$0202040a@catdog> <20030226201452.GA6815@nevyn.them.org> <004d01c2ddd7$4ef150a0$0202040a@catdog> <20030226204949.GA29144@nevyn.them.org> Subject: Re: [Patch] correctly configure wcwidth in readline Date: Wed, 26 Feb 2003 20:52:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_007F_01C2DDAF.08F2F270" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-02/txt/msg00746.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_007F_01C2DDAF.08F2F270 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 408 > > > [Kris: changelog!] > > > > The changelog is unchanged from the original post. > > Please always include it with the patch, even if it hasn't changed. Okay. Here is is with the patch: * 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. cheers, Kris ------=_NextPart_000_007F_01C2DDAF.08F2F270 Content-Type: text/plain; name="readline_diff.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="readline_diff.txt" Content-length: 4795 Index: Makefile.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/readline/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- Makefile.in 8 Dec 2002 22:31:37 -0000 1.4 +++ Makefile.in 26 Feb 2003 18:41:35 -0000 @@ -86,6 +86,8 @@ LIBRARY_NAME =3D libreadline.a STATIC_LIBS =3D libreadline.a libhistory.a =20 +WCWIDTH_OBJ =3D @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES =3D $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ @@ -98,7 +100,7 @@ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ - $(srcdir)/mbutil.c + $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c =20 # The header files for this library. HSOURCES =3D readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -111,7 +113,8 @@ OBJECTS =3D readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ - text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) + text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ + $(WCWIDTH_OBJ) =20 # The texinfo files which document this library. DOCSOURCE =3D doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo @@ -146,6 +149,10 @@ $(RM) $@ $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o -test -n "$(RANLIB)" && $(RANLIB) $@ + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c =20 # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline Index: aclocal.m4 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/readline/aclocal.m4,v retrieving revision 1.4 diff -u -r1.4 aclocal.m4 --- aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4 +++ aclocal.m4 26 Feb 2003 18:41:35 -0000 @@ -1653,7 +1653,13 @@ AC_CHECK_HEADERS(langinfo.h) =20 AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) +AC_CHECK_FUNC(wcwidth, have_wcwidth=3Dyes) +if test "$have_wcwidth" =3D yes; then + AC_DEFINE(HAVE_WCWIDTH) + AC_SUBST(WCWIDTH_OBJ,) +else + AC_SUBST(WCWIDTH_OBJ,wcwidth.o) +fi =20 AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, [AC_TRY_RUN([ Index: shlib/Makefile.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/readline/shlib/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4 +++ shlib/Makefile.in 26 Feb 2003 18:41:36 -0000 @@ -103,6 +103,8 @@ SHARED_HISTORY =3D libhistory.$(SHLIB_LIBVERSION) SHARED_LIBS =3D $(SHARED_READLINE) $(SHARED_HISTORY) =20 +WCWIDTH_OBJ =3D @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES =3D $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ @@ -115,7 +117,7 @@ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ - $(topdir)/mbutil.c + $(topdir)/mbutil.c $(WCWIDTH_SRC) =20 # The header files for this library. HSOURCES =3D readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -129,7 +131,7 @@ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ - compat.so + compat.so $(WCWIDTH_OBJ) =20 ########################################################################## =20 @@ -152,6 +154,10 @@ $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so $(RM) $@ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xm= alloc.so $(SHLIB_LIBS) + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) $(srcdir)/support/wcwidth.c =20 # Since tilde.c is shared between readline and bash, make sure we compile= =20 # it with the right flags when it's built as part of readline ------=_NextPart_000_007F_01C2DDAF.08F2F270--