From 810d9104fca780e18bd08d2266efb91142fcb57f Mon Sep 17 00:00:00 2001 From: axel Date: Tue, 10 Jan 2006 01:10:47 +1000 Subject: [PATCH] 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 --- configure.ac | 2 +- reader.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0694e0df2..20134747c 100644 --- a/configure.ac +++ b/configure.ac @@ -131,7 +131,7 @@ else fi 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) ) diff --git a/reader.c b/reader.c index 4b45d9205..be7535fca 100644 --- a/reader.c +++ b/reader.c @@ -904,7 +904,7 @@ static void check_colors() 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 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 ) ) - { - wperror( L"futimes" ); - } + futimes( 1, &t ); + futimes( 2, &t ); #endif fstat( 1, &prev_buff_1 );