Changes to os_win.c to have it return same error code as os_unix.c.

FossilOrigin-Name: 33b6f069d8059903312282962181839ff983e5c4
This commit is contained in:
shaneh
2010-07-02 19:49:38 +00:00
parent cac29a67e9
commit fd28639f12
4 changed files with 13 additions and 20 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
** sqlite3OsLock()
**
*/
#if defined(SQLITE_TEST) && (SQLITE_OS_WIN==0)
#if defined(SQLITE_TEST)
int sqlite3_memdebug_vfs_oom_test = 1;
#define DO_OS_MALLOC_TEST(x) \
if (sqlite3_memdebug_vfs_oom_test && (!x || !sqlite3IsMemJournal(x))) { \
+3
View File
@@ -1431,6 +1431,9 @@ static int winShmOpen(
*/
if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
if( rc!=SQLITE_OK ){
rc = SQLITE_IOERR_SHMOPEN;
}
}
if( rc==SQLITE_OK ){
winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);