[Top][All Lists]

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

Re: ncurses: tgetent leaks nearly 10 KB of memory every time it is calle

From: Matt
Subject: Re: ncurses: tgetent leaks nearly 10 KB of memory every time it is called
Date: Sat, 17 Jun 2006 15:27:42 -0700
User-agent: Mutt/

[adding the devel/ncurses port maintainer to the conversation]

On Thu, Jun 15, 2006 at 07:43:22PM -0400, Thomas Dickey wrote:
> On Thu, 15 Jun 2006, Matt wrote:
> >So, since it's such a pain to upgrade ncurses on FreeBSD (they have
> >FreeBSD-specific hacks that I don't want to dig into), I'm hacking
> >a simple tgetent cache into my copy of GNU screen, since those
> >tgetent calls are just getting the same answer every time. I suspect
> >it will be at least a year before the FreeBSD folks make a new
> >release that incorporates ncurses 5.5; until then this hack will
> >get me by.
> >
> >I tried installing the FreeBSD port of ncurses 5.5 and linking GNU
> >screen with that, but it doesn't work right -- it needs the
> >FreeBSD-specific hacks that have been made to the ncurses build
> >that the base system uses. It sure would be nice if those hacks
> I pointed out to someone working on the ncurses port recently that most 
> (if not all) of it can be done simply by using ncurses' configure script
> options
>          --enable-termcap \
>          --disable-database \
>          --enable-getcap
> That was enough for the port, which I see here is the same as the base 
> system:
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libncurses/termcap.c?rev=

Ah, cool, thanks Thomas. That helped. Starting with this hint, I
carefully compared the ncurses_cfg.h created by the devel/ncurses
port's configure script with the one in the FreeBSD base system:


and I found a few more configure options that I believe bring it
very close to the FreeBSD base. I think the key ones are:


So I ended up with:

CONFIGURE_ARGS= --datadir=${PREFIX}/share/misc --disable-overwrite \
                --enable-termcap --includedir=${PREFIX}/include/ncurses \
                --with-profile --with-shared --without-debug \
                --without-curses-h --with-termlib --program-prefix= \
                --enable-safe-sprintf --disable-root-environ \
                --with-manpage-format=gzip --srcdir=../ \
                --disable-database --enable-getcap --enable-colorfgbg \
                --enable-bsdpad --disable-home-terminfo

Would it make sense to change the port defaults to be more BSD-like?
Actually, I'm more interested in updating the FreeBSD base ncurses...


reply via email to

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