On 5/10/06, Bilco Schaddi <[EMAIL PROTECTED]> wrote:
I haven't installed any ncurses so I should have BSD curses. If you could
let me know when you've fixed these problems (one way or another) that'd be
great.
Ok, I've tried to write a BSD curses detector, this is what I came up with:
# Check if we are using basic BSD curses - in that case we redefine
# del_curterm as a no-op, to avoid a double-free
AC_MSG_CHECKING([If we are using BSD curses])
case $target_os in
*bsd*)
AC_MSG_RESULT(yes)
AC_CHECK_LIB( ncurses, del_curterm, true,
[AC_DEFINE([HAVE_BROKEN_DEL_CURTERM],[1],[We are using basic BSD
curses, redefine del_curterm to a no-op to avoid a double-free bug])])
;;
*)
AC_MSG_RESULT(no)
;;
esac
Could anyone who likes Autoconf better than me comment on whether this
should work?
And yes, it would be _nice_ if we could drop del_curterm only if the
double-free bug actually is there, but since I can't come up with a
reasonable test to see if a double-free occurs, this is the best I
could do. (The bug results in warnings, not in crashes)
--
Axel
2006/5/10, Axel Liljencrantz <[EMAIL PROTECTED]>:
> On 5/10/06, Bilco Schaddi <[EMAIL PROTECTED]> wrote:
> > Very nice indeed. Seems to work very good. Btw, bakfupai and me = same
> > person =) Just used the wrong mail ^^ Anyway, if you could incorporate
these
> > changes in the next version I'd be glad to make an OpenBSD package out
of
> > fish.
>
> Ha. I though it was strange, but since there where two different
> emails involved, and since you used the term 'Hej då' on irc, but
> Bilco doesn't sound very swedish, I assumed I was dealing with two
> people.
>
> Removing del_curterm would mean introducing a theoretical memory leak,
> so it's not something I want to do over the board. But if this indeed
> does fix things, I'll add an autoconf test that redefines del_curterm
> as a noop on BSD when not using ncurses.
>
> Just to make sure: You are using BSD curses and not ncurses, right?
>
> --
> Axel
>
> >
> > 2006/5/10, Axel Liljencrantz <[EMAIL PROTECTED]>:
> > > On 5/8/06, Bilco Schaddi <[EMAIL PROTECTED] > wrote:
> > > > I tried to compile the fish shell under OpenBSD and got the
following
> > error:
> > > >
> > > > gcc -g -O2 -std=c99 -fno-optimize-sibling-calls -Wall -c common.c
> > > > common.c: In function `unescape':
> > > > common.c:849: error: `WCHAR_MAX' undeclared (first use in this
> > function)
> > > > common.c:849: error: (Each undeclared identifier is reported only
once
> > > > common.c:849: error: for each function it appears in.)
> > > > *** Error code 1
> > > >
> > > > Stop in /home/thrall/fish-1.21.6.
> > > >
> > > > This is under OpenBSD 3.9 and Fish 1.21.6. The same version
compiled
> > under
> > > > linux without problems. Anyway, if someone could come up with a
solution
> > > > that'd be great. Let me know if you need more info.
> > > >
> > >
> > > That's funny, the exact same thing was reported yesterday. Do OpenBSD
> > > users always come in pairs? ;-)
> > >
> > > Add
> > >
> > > #ifndef WCHAR_MAX
> > > #define WCHAR_MAX 0x7fffffffu
> > > #endif
> > >
> > > to fallback.h, and things should compile. Also remember to use Gnu
> > > make, and not BSD make.
> > >
> > > Lastly, when this is done, it seems you may get warnings like:
> > >
> > > set_color in free(): error: page is already free
> > >
> > > If you encounter this, try removing all calls to the del_curterm
> > > functions (Should be three of them, I belive) and see if this fixes
> > > things. I seem to remember this being the case in some FreeBSD
> > > versions. Should be reported as a bug in OpenBSD if this is the case.
> > >
> > > Another option if you encounter this and haven't installed ncurses is
> > > to do so. (Remember to rerun ./configure before recompiling, though,
> > > or fish won't detect the change)
> > >
> > > Good luck
> > >
> > > --
> > > Axel
> > >
> >
> >
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users