Improve detection of futimes function, and make it fail without giving an error message, since it is not critical anyways

darcs-hash:20060109151047-ac50b-ebbda6a65853dc03aa12c1e28cd293d7e5557bb1.gz
This commit is contained in:
axel
2006-01-10 01:10:47 +10:00
parent 54c502c3cf
commit 810d9104fc
2 changed files with 4 additions and 6 deletions

View File

@@ -131,7 +131,7 @@ else
fi fi
AC_CHECK_LIB(socket, connect, rt, nanosleep) AC_CHECK_LIB(socket, connect, rt, nanosleep)
AC_CHECK_FUNCS(wcsdup wcsndup wcslen wcscasecmp wcsncasecmp gettext) AC_CHECK_FUNCS(wcsdup wcsndup wcslen wcscasecmp wcsncasecmp gettext futimes)
AC_CHECK_FUNC(gettext, AC_SUBST(HAVE_GETTEXT,1), AC_SUBST(HAVE_GETTEXT,0) ) AC_CHECK_FUNC(gettext, AC_SUBST(HAVE_GETTEXT,1), AC_SUBST(HAVE_GETTEXT,0) )

View File

@@ -904,7 +904,7 @@ static void check_colors()
static void reader_save_status() static void reader_save_status()
{ {
#if (defined(__FreeBSD__) || defined(__NetBSD__)) #ifdef HAVE_FUTIMES
/* /*
This futimes call tries to trick the system into using st_mtime This futimes call tries to trick the system into using st_mtime
as a tampering flag. This of course only works on systems where as a tampering flag. This of course only works on systems where
@@ -918,10 +918,8 @@ static void reader_save_status()
} }
; ;
if( futimes( 1, &t ) || futimes( 2, &t ) ) futimes( 1, &t );
{ futimes( 2, &t );
wperror( L"futimes" );
}
#endif #endif
fstat( 1, &prev_buff_1 ); fstat( 1, &prev_buff_1 );