Remove del_curterm workaround on *BSD.

FreeBSD PR was https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=108117
OpenBSD PR was 5447.

Both have been fixed for years.

This reverts commit c55cbd3f2f, among
others.
This commit is contained in:
David Adam 2014-12-08 07:54:33 +08:00
parent 9a34df604d
commit 68029095b5
3 changed files with 1 additions and 29 deletions

View file

@ -748,25 +748,6 @@ else
AC_MSG_RESULT(no)
fi
# Check if del_curterm is broken - in that case we redefine
# del_curterm as a no-op, to avoid a double-free
AC_MSG_CHECKING([If del_curterm is broken])
case $target_os in
*bsd*)
AC_MSG_RESULT(yes)
AC_DEFINE(
[HAVE_BROKEN_DEL_CURTERM],
[1],
[del_curterm is broken, redefine it to a no-op to avoid a double-free bug]
)
;;
*)
AC_MSG_RESULT(no)
;;
esac
# Tell the world what we know
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -348,15 +348,6 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz);
#endif
/**
BSD del_curterm seems to do a double-free. We redefine it as a no-op
*/
#ifdef HAVE_BROKEN_DEL_CURTERM
#define fish_del_curterm(X) OK
#else
#define fish_del_curterm(X) del_curterm(X)
#endif
#ifndef HAVE_LRAND48_R
/**

View file

@ -528,7 +528,7 @@ void input_destroy()
input_common_destroy();
if (fish_del_curterm(cur_term) == ERR)
if (del_curterm(cur_term) == ERR)
{
debug(0, _(L"Error while closing terminfo"));
}