From 4a7384a25f9b747c13488fb9864983ae3258e499 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 21 Mar 2009 14:56:52 +0000 Subject: [PATCH] Rig the unix backend to use fdatasync() by default, without having to set the HAVE_FDATASYNC macro. Systems that do not support fdatasync() can be compiled using -Dfdatasync=fsync. (CVS 6368) FossilOrigin-Name: a331562727be465874a66c2c1d15ee070f96f7e0 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/os_unix.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index 5e6e4735b3..6639868479 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C On\sunix,\salways\suse\sfdatasync()\sinstead\sof\sfsync()\swhen\savailable,\seven\sif\nthe\sfile\ssize\schanges,\ssince\s(we\sare\stold)\sfdatasync()\swill\sautomatically\nflush\sthe\sinode\swhen\sthe\sfile\ssize\schanges.\s(CVS\s6367) -D 2009-03-21T14:41:04 +C Rig\sthe\sunix\sbackend\sto\suse\sfdatasync()\sby\sdefault,\swithout\shaving\sto\sset\sthe\nHAVE_FDATASYNC\smacro.\s\sSystems\sthat\sdo\snot\ssupport\sfdatasync()\scan\sbe\scompiled\nusing\s-Dfdatasync=fsync.\s(CVS\s6368) +D 2009-03-21T14:56:52 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -141,7 +141,7 @@ F src/os.c ed93a6b46132a602c4fd7a58142e2981c829c79d F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 -F src/os_unix.c 8f6ffa95c8dc79b94565b517bc37abb426f09a23 +F src/os_unix.c a20fe61c025117452c003ae4cafd05c3e610b616 F src/os_win.c 40636702058ed4dcd35d68151bfab56d4997cdc1 F src/pager.c 01e3facb2f7c5f307e36a0f4ed9343cf3761711a F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f @@ -709,7 +709,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 4310411f5027dba18e017023e21cb09982e26752 -R da4300d409cda801b0b75c2eee2c6174 +P 0d6b11bcf67f86e5554806869d32338e5831833e +R 0bec67d81685c3152a1b50fee4db509f U drh -Z 669efac6174bfcb881ee9f0e80879f8c +Z 7a8c6e147dafb29b1784fb5910b3e5cf diff --git a/manifest.uuid b/manifest.uuid index d343d63b42..375120d36c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0d6b11bcf67f86e5554806869d32338e5831833e \ No newline at end of file +a331562727be465874a66c2c1d15ee070f96f7e0 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index ec781a5568..01ca657b75 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -43,7 +43,7 @@ ** * Definitions of sqlite3_vfs objects for all locking methods ** plus implementations of sqlite3_os_init() and sqlite3_os_end(). ** -** $Id: os_unix.c,v 1.243 2009/03/21 14:41:04 drh Exp $ +** $Id: os_unix.c,v 1.244 2009/03/21 14:56:52 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -2824,10 +2824,10 @@ int sqlite3_fullsync_count = 0; #endif /* -** Use the fdatasync() API only if the HAVE_FDATASYNC macro is defined. -** Otherwise use fsync() in its place. +** We assume that most systems these days support fdatasync(). Those +** machines that do not can define -Dfdatasync=fsync. */ -#ifndef HAVE_FDATASYNC +#if 0 # define fdatasync fsync #endif -- 2.47.2