Avoid using ENOTSUP on systems that do not define that symbol.

Ticket #3512. (CVS 6182)

FossilOrigin-Name: fcb6c677124102558f7a7a22bc3569b664424a4c
This commit is contained in:
drh 2009-01-15 04:30:02 +00:00
parent a81c64a2da
commit c7288ee0b8
3 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Make\ssome\schanges\srequested\sby\sFedora.\s(CVS\s6181) C Avoid\susing\sENOTSUP\son\ssystems\sthat\sdo\snot\sdefine\sthat\ssymbol.\nTicket\s#3512.\s(CVS\s6182)
D 2009-01-14T23:38:03 D 2009-01-15T04:30:03
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 8a00230c566c1a1cfc7ae53eedd458b32034da30 F Makefile.in 8a00230c566c1a1cfc7ae53eedd458b32034da30
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -140,7 +140,7 @@ F src/os.c ed93a6b46132a602c4fd7a58142e2981c829c79d
F src/os.h f996ab57d2035a20e63173419055608548a834c6 F src/os.h f996ab57d2035a20e63173419055608548a834c6
F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c 5d176993d0f41373d7bc7a6b75f2a536e4efe245 F src/os_unix.c c0ebce13fac2db7900367e83a3ebbd112ea4e90e
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709 F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
F src/pager.c 46ab8721a9fda550a25b1afafa87c66492cf2226 F src/pager.c 46ab8721a9fda550a25b1afafa87c66492cf2226
F src/pager.h 9870acb2d653848d90d765d7cbf163496d6c8111 F src/pager.h 9870acb2d653848d90d765d7cbf163496d6c8111
@ -697,7 +697,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 6f6b638e44a8cfc741594f02b0178fa98ed7e2c1 P 7bc08bc719c2e9ca6d92d4709c0478e15fdfb131
R 66f3fd321b6c94be13d77a73488a675e R 9393fef805e43ab0cdee2b93b6884dc8
U drh U drh
Z 90f7c18bd79bf17f58ab154f3e677059 Z 26d16e6a805d735e57f9a625aa8f7be4

View File

@ -1 +1 @@
7bc08bc719c2e9ca6d92d4709c0478e15fdfb131 fcb6c677124102558f7a7a22bc3569b664424a4c

View File

@ -43,7 +43,7 @@
** * Definitions of sqlite3_vfs objects for all locking methods ** * Definitions of sqlite3_vfs objects for all locking methods
** plus implementations of sqlite3_os_init() and sqlite3_os_end(). ** plus implementations of sqlite3_os_init() and sqlite3_os_end().
** **
** $Id: os_unix.c,v 1.236 2009/01/14 23:03:41 drh Exp $ ** $Id: os_unix.c,v 1.237 2009/01/15 04:30:03 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */ #if SQLITE_OS_UNIX /* This file is used on unix only */
@ -2878,9 +2878,11 @@ static int full_fsync(int fd, int fullSync, int dataOnly){
#else #else
if( dataOnly ){ if( dataOnly ){
rc = fdatasync(fd); rc = fdatasync(fd);
if( OS_VXWORKS && rc==-1 && errno==ENOTSUP ){ #if OS_VXWORKS
if( rc==-1 && errno==ENOTSUP ){
rc = fsync(fd); rc = fsync(fd);
} }
#endif
}else{ }else{
rc = fsync(fd); rc = fsync(fd);
} }