SQLite

Check-in [fa1d7ecfcc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:The crash test works now, at least on unix. Untested on windows. But it never worked on windows before so if it still does not there is no big loss. I am still troubled by the current design of the OS overloading mechanism. Expect to see more changes. (CVS 2794)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fa1d7ecfcc648fbe9fc6d92e080cf937bdc9c439
User & Date: drh 2005-11-29 19:56:32.000
Context
2005-11-30
03:20
Restructure the OS interface yet again. This time make the OsFile object a virtual base class which is subclassed for unix, windows, and the crash test simulator. Add the new file "os.c" for common os layer code. Move all OS-specific routines into the sqlite3Os structure. (CVS 2795) (check-in: bd8740d1ae user: drh tags: trunk)
2005-11-29
19:56
The crash test works now, at least on unix. Untested on windows. But it never worked on windows before so if it still does not there is no big loss. I am still troubled by the current design of the OS overloading mechanism. Expect to see more changes. (CVS 2794) (check-in: fa1d7ecfcc user: drh tags: trunk)
19:50
Make the build work on windows again. Ticket #1544. (CVS 2793) (check-in: 59bdca2552 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_unix.c.
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
/*
** Close a file.
*/
static int unixClose(OsFile **pId){
  OsFile *id = *pId;
  if( !id ) return SQLITE_OK;
  if( CHECK_THREADID(id) ) return SQLITE_MISUSE;
  sqlite3Io.xUnlock(id, NO_LOCK);
  if( id->dirfd>=0 ) close(id->dirfd);
  id->dirfd = -1;
  sqlite3OsEnterMutex();
  if( id->pOpen->nLock ){
    /* If there are outstanding locks, do not actually close the file just
    ** yet because that would clear those locks.  Instead, add the file
    ** descriptor to pOpen->aPending.  It will be automatically closed when







|







1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
/*
** Close a file.
*/
static int unixClose(OsFile **pId){
  OsFile *id = *pId;
  if( !id ) return SQLITE_OK;
  if( CHECK_THREADID(id) ) return SQLITE_MISUSE;
  unixUnlock(id, NO_LOCK);
  if( id->dirfd>=0 ) close(id->dirfd);
  id->dirfd = -1;
  sqlite3OsEnterMutex();
  if( id->pOpen->nLock ){
    /* If there are outstanding locks, do not actually close the file just
    ** yet because that would clear those locks.  Instead, add the file
    ** descriptor to pOpen->aPending.  It will be automatically closed when