Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: PATCH to get bc 1.06-1 to build with readline support under Cygwin Date: Fri, 13 Feb 2004 16:36:47 -0500 From: Francis Litterio X-Random-Quote: Reality is merely an illusion, albeit a very persistent one. -- Albert Einstein Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes I installed the bc source package (bc-1.06-1-src.tar.bz2) and configured it to build with readline support as follows: cd /usr/src/bc-1.06-1 ./configure --with-readline --prefix=/usr/local The build fails with a syntax error related to the readline support: $ make ... gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I./../h -g -O2 -Wall -funsigned-char -c scan.c scan.l:146: error: conflicting types for `readline' /usr/include/readline/readline.h:277: error: previous declaration of `readline' I made the following small change to the source code in scan.l and bc builds just fine: --- scan.l.orig 2004-02-13 16:22:26.847595200 -0500 +++ scan.l 2004-02-13 16:21:55.702811200 -0500 @@ -143,7 +143,7 @@ /* Definitions for readline access. */ extern FILE *rl_instream; -_PROTOTYPE(char *readline, (char *)); +/* _PROTOTYPE(char *readline, (char *)); */ /* rl_input puts upto MAX characters into BUF with the number put in BUF placed in *RESULT. If the yy input file is the same as I hope the Cygwin bc maintainer can integrate this change. bc is much nicer to use when it has readline support. -- Francis Litterio franl AT world DOT std DOT com http://world.std.com/~franl/ GPG and PGP public keys available on keyservers. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/