From da98dde899a482bc5e589d59890f3e3f0b2c932b Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Sun, 18 Sep 2011 21:57:24 +0000 Subject: [PATCH] Expedite: Do not call sync() if unavailable on the system (replaces #ifdef WIN32) SVN revision: 63464 --- configure.ac | 3 +++ src/bin/ui.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e5dc838..fb2d74a 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,7 @@ AC_PROG_CC LT_PROG_RC + ### Checks for libraries # Evil library for compilation on Windows @@ -230,6 +231,8 @@ AC_SUBST(lt_enable_auto_import) ### Checks for library functions +AC_CHECK_FUNCS([sync]) + AC_OUTPUT([ Makefile diff --git a/src/bin/ui.c b/src/bin/ui.c index 9d912ad..3dd05a5 100644 --- a/src/bin/ui.c +++ b/src/bin/ui.c @@ -611,7 +611,7 @@ _ui_setup(void) #undef UI _ui_menu_item_add("exit.png", "Exit", _ui_exit); -#ifndef _WIN32 +#ifdef HAVE_SYNC /* make sure disk io isn't going to turn up unexpectedly */ sync(); sync();