1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00

Compilation fix.

This commit is contained in:
Witold Filipczyk 2010-03-21 17:18:32 +01:00 committed by Witold Filipczyk
parent 2648123e8f
commit b456fba69f
2 changed files with 10 additions and 2 deletions

View File

@ -302,6 +302,8 @@ AC_CHECK_FUNCS(setpgid getpgid setpgrp getpgrp)
AC_CHECK_FUNCS(raise, HAVE_RAISE=yes) AC_CHECK_FUNCS(raise, HAVE_RAISE=yes)
AC_CHECK_FUNCS(kill, HAVE_KILL=yes) AC_CHECK_FUNCS(kill, HAVE_KILL=yes)
AC_CHECK_FUNCS(fpathconf, HAVE_FPATHCONF=yes)
if test x"$HAVE_RAISE" = x; then if test x"$HAVE_RAISE" = x; then
if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then
AC_MSG_ERROR([Unable to emulate raise()]) AC_MSG_ERROR([Unable to emulate raise()])

View File

@ -234,7 +234,7 @@ static int
setraw(struct itrm *itrm, int save_orig) setraw(struct itrm *itrm, int save_orig)
{ {
struct termios t; struct termios t;
long vdisable; long vdisable = -1;
memset(&t, 0, sizeof(t)); memset(&t, 0, sizeof(t));
if (tcgetattr(itrm->in.ctl, &t)) return -1; if (tcgetattr(itrm->in.ctl, &t)) return -1;
@ -243,13 +243,19 @@ setraw(struct itrm *itrm, int save_orig)
#ifdef _POSIX_VDISABLE #ifdef _POSIX_VDISABLE
vdisable = _POSIX_VDISABLE; vdisable = _POSIX_VDISABLE;
#else #elif defined(HAVE_FPATHCONF)
vdisable = fpathconf(itrm->in.ctl, _PC_VDISABLE); vdisable = fpathconf(itrm->in.ctl, _PC_VDISABLE);
#endif #endif
#ifdef VERASE
/* Is VERASE defined on Windows? */
if (vdisable != -1 && t.c_cc[VERASE] == vdisable) if (vdisable != -1 && t.c_cc[VERASE] == vdisable)
itrm->verase = -1; itrm->verase = -1;
else else
itrm->verase = (unsigned char) t.c_cc[VERASE]; itrm->verase = (unsigned char) t.c_cc[VERASE];
#else
itrm->verase = -1;
#endif
elinks_cfmakeraw(&t); elinks_cfmakeraw(&t);
t.c_lflag |= ISIG; t.c_lflag |= ISIG;