gnupic: Using readline 4.2 with c++


Previous by date: 5 Sep 2001 15:52:28 -0000 Using readline 4.2 with c++, John Sutton
Next by date: 5 Sep 2001 15:52:28 -0000 Re: gpsim: TMR0 has 3 nibbles?, John Sutton
Previous in thread: 5 Sep 2001 15:52:28 -0000 Using readline 4.2 with c++, John Sutton
Next in thread: 5 Sep 2001 15:52:28 -0000 Re: Using readline 4.2 with c++, John Sutton

Subject: Re: Using readline 4.2 with c++
From: Chet Ramey ####@####.####
Date: 5 Sep 2001 15:52:28 -0000
Message-Id: <010905154922.AA36306.SM@nike.ins.cwru.edu>

> I'm having trouble building a package written in c++ (gpsim, a PIC emulat=
> or)
> which uses readline.  The problem can be demonstrated by just handing c++=
>  a
> 1 line file containing the #include:
> 
> #include <readline/readline.h>
> 
> The result is:
> 
> In file included from /usr/include/readline/keymaps.h:37,
>                  from /usr/include/readline/readline.h:36,
>                  from try.c:1:
> /usr/include/readline/rltypedefs.h:48: invalid exception specifications
> /usr/include/readline/rltypedefs.h:51: invalid exception specifications
> /usr/include/readline/rltypedefs.h:52: invalid exception specifications
> etc
> 
> This is exactly the same error as I get when trying to compile gpsim.

The problem is with readline's use of the __P macro to write prototyped
function definitions and typedefs.  The GNU C library uses that macro,
too, and in such a way that it breaks readline's typedef declarations.

The next release of readline will no longer use __P.

In the meantime, you should be able to work around the problem by adding
the following lines to rlstdc.h, just after the `#define _RL_STDC_H':

#ifdef __P
#  undef __P
#endif

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    ####@####.####    http://cnswww.cns.cwru.edu/~chet/

Previous by date: 5 Sep 2001 15:52:28 -0000 Using readline 4.2 with c++, John Sutton
Next by date: 5 Sep 2001 15:52:28 -0000 Re: gpsim: TMR0 has 3 nibbles?, John Sutton
Previous in thread: 5 Sep 2001 15:52:28 -0000 Using readline 4.2 with c++, John Sutton
Next in thread: 5 Sep 2001 15:52:28 -0000 Re: Using readline 4.2 with c++, John Sutton


Powered by ezmlm-browse 0.20.