From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14379 invoked by alias); 28 Jan 2003 05:03:25 -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 14371 invoked from network); 28 Jan 2003 05:03:24 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (80.14.53.12) by 172.16.49.205 with SMTP; 28 Jan 2003 05:03:24 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 6192FD34AE; Tue, 28 Jan 2003 09:03:17 +0400 (RET) Date: Tue, 28 Jan 2003 05:03:00 -0000 From: Joel Brobecker To: bash-maintainers@gnu.org Cc: gdb-patches@sources.redhat.com Subject: Missing check for mbsrtowc causes compilation failure on HP/UX 11.11 Message-ID: <20030128050317.GH6437@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-01/txt/msg00753.txt.bz2 Dear readline maintainers, I noticed a compilation failure in the readline module of the current sources of GDB (extracted from CVS). This is occuring on HP/UX 11.11, using GCC 3.2.1. I think that the readline version number used in GDB is 4.3. The compilation fails inside _rl_vi_change_mbchar_case (vi_mode.c) because the compiler could not find mbrtowc. I searched this function, and found that it is not provided by this system, but I could find mbrtowcs. I then saw that _rl_vi_change_mbchar_case is compiled only if HANDLE_MULTIBYTE is set. In turn, HANDLE_MULTIBYTE is set only if (see rlmbutil.h): #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) # include # include # if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif It seems that configure is only checking for mbsrtowcs, but not mbsrtowc. This works on HP/UX 11.00 where neither of these functions are provided, but not on HP/UX 11.11 where mbsrtowcs is defined. I therefore made the following change, where I added a check for mbsrtowc. config.h.in has been updated accordingly. I also updated the condition in rlmbutil.h to make sure both mbsrtowcs and mbsrtowc are available before enabling multibyte. The patch is attached. Concerning copyright assignments, I am not sure what will be needed. The company I work for has an assignment on file with the FSF for GDB work. I hope this will be sufficient. Changelog: aclocal.m4 - add check for mbsrtowc. config.h.in - regenerate. rlmbutil.h - make sure mbsrtowc is available before enabling multibyte support. -- Joel Brobecker, Ada Core Technologies, Inc.