8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:03:02 +01:00

Check for presence of sync functions

This commit is contained in:
alexpeshkoff 2010-11-25 15:50:13 +00:00
parent a1ccc9dbad
commit ea3bcabcc2
2 changed files with 5 additions and 0 deletions

View File

@ -785,6 +785,7 @@ AC_CHECK_FUNCS(fchmod)
AC_CHECK_FUNCS(semtimedop)
AC_CHECK_FUNCS(fegetenv)
AC_CHECK_FUNCS(strerror_r)
AC_CHECK_FUNCS(fdatasync fsync)
dnl AC_CHECK_FUNCS(AO_compare_and_swap_full)
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <atomic_ops.h>]], [[AO_T x; AO_compare_and_swap_full(&x, 0, 0); return 0;]])],

View File

@ -724,7 +724,11 @@ inline static void unlink_platf(const TEXT* file_name)
inline static void flush_platf(DESC file)
{
#if defined(HAVE_FDATASYNC)
fdatasync(file);
#elif defined(HAVE_FSYNC)
fsync(file);
#endif
}
#endif // WIN_NT