[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: ncurses and mpfr don't play well together]

From: Thomas Dickey
Subject: Re: address@hidden: Re: ncurses and mpfr don't play well together]
Date: Tue, 4 Jan 2005 06:10:08 -0500 (EST)

On Tue, 4 Jan 2005, Mike Castle wrote:

Consider yourself notified.

it's not an FAQ, but something that many developers are aware of

Is this really an ncurses issues or part of all curses implementations?

"All". AIX curses is more of a problem since its curses.h includes term.h; the problem is because term.h #define's symbols that match the names used for terminfo capabilities. Most of those are not troublesome, but some that come to mind include: lines, columns, newline and of course tab. I've also had to work around max_pairs and other less common symbols.

Programs that include term.h rely upon this; programmers that include term.h without being aware of this should read the header file and consider its implications.

----- Forwarded message from Patrick Pelissier <address@hidden> -----

X-Amavix: Anti-virus check done by ClamAV
X-Amavix: Scanned by Amavix
Date: Tue, 4 Jan 2005 09:44:36 +0100
From: Patrick Pelissier <address@hidden>
To: Mike Castle <address@hidden>
Cc: address@hidden
Subject: Re: ncurses and mpfr don't play well together
In-Reply-To: <address@hidden>

On Fri, Dec 31, 2004 at 12:46:14 -0800, Mike Castle wrote:

With a recent vintage of ncurses and mpfr-2.1.0 (also happens with a fairly
recently version of mpfr-2.2.0 pulled from cvs as shipped with
genius-0.7.2), the following causes problems:

address@hidden:43pm]~(510) cat t.c
#include <term.h>
#include <mpfr.h>
address@hidden:43pm]~(511) gcc -c t.c
In file included from t.c:2:
/usr/include/mpfr.h:438: error: parse error before '->' token

Turns out that term.h has the following lines of interest:

#define CUR cur_term->type.
#define tab                            CUR Strings[134]

And mpfr.h has:

int mpfr_sum _MPFR_PROTO ((mpfr_ptr, mpfr_ptr __gmp_const tab[], unsigned

Which causes:

address@hidden:44pm]~(514) gcc -c -save-temps t.c
In file included from t.c:2:
/usr/include/mpfr.h:438: error: parse error before '->' token
address@hidden:44pm]~(515) grep mpfr_sum t.i
int mpfr_sum (mpfr_ptr, mpfr_ptr const cur_term->type. Strings[134][], unsigned 
long, mpfr_rnd_t);

My local solution was to replace tab with t_ab as a work around.

Just remove tab should work too.

But it is a bug of ncurses, which is not namespace clean.
You better report it to the developpers of ncurses.

 Patrick Pelissier

----- End forwarded message -----

    Mike Castle      address@hidden      www.netcom.com/~dalgoda/
   We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

Bug-ncurses mailing list

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]