Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Hide (for non-debugging builds) and remove DELETEONCLOSE files on OS/2, following the Windows example. Ticket #3328. (CVS 5592) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8aaa77000fb86fe512405a0ad40cb086 |
User & Date: | pweilbacher 2008-08-22 13:47:57.000 |
Context
2008-08-22
| ||
13:57 | fix some tests to take the right branch on OS/2 (hope I got the Tcl syntax right) (CVS 5593) (check-in: 10e62d4700 user: pweilbacher tags: trunk) | |
13:47 | Hide (for non-debugging builds) and remove DELETEONCLOSE files on OS/2, following the Windows example. Ticket #3328. (CVS 5592) (check-in: 8aaa77000f user: pweilbacher tags: trunk) | |
12:57 | Fix nuisance compiler warnings. Ticket #3309. (CVS 5591) (check-in: 2a365e2994 user: drh tags: trunk) | |
Changes
Changes to src/os_os2.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ****************************************************************************** ** ** This file contains code that is specific to OS/2. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ****************************************************************************** ** ** This file contains code that is specific to OS/2. ** ** $Id: os_os2.c,v 1.56 2008/08/22 13:47:57 pweilbacher Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_OS2 /* |
︙ | ︙ | |||
742 743 744 745 746 747 748 | sqlite3_vfs *pVfs, /* Not used */ const char *zName, /* Name of the file */ sqlite3_file *id, /* Write the SQLite file handle here */ int flags, /* Open mode flags */ int *pOutFlags /* Status return flags */ ){ HFILE h; | | | 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | sqlite3_vfs *pVfs, /* Not used */ const char *zName, /* Name of the file */ sqlite3_file *id, /* Write the SQLite file handle here */ int flags, /* Open mode flags */ int *pOutFlags /* Status return flags */ ){ HFILE h; ULONG ulFileAttribute = FILE_NORMAL; ULONG ulOpenFlags = 0; ULONG ulOpenMode = 0; os2File *pFile = (os2File*)id; APIRET rc = NO_ERROR; ULONG ulAction; char *zNameCp; char zTmpname[CCHMAXPATH+1]; /* Buffer to hold name of temp file */ |
︙ | ︙ | |||
767 768 769 770 771 772 773 | } memset( pFile, 0, sizeof(*pFile) ); OSTRACE2( "OPEN want %d\n", flags ); | < < < < | < < | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | } memset( pFile, 0, sizeof(*pFile) ); OSTRACE2( "OPEN want %d\n", flags ); if( flags & SQLITE_OPEN_READWRITE ){ ulOpenMode |= OPEN_ACCESS_READWRITE; OSTRACE1( "OPEN read/write\n" ); }else{ ulOpenMode |= OPEN_ACCESS_READONLY; OSTRACE1( "OPEN read only\n" ); } if( flags & SQLITE_OPEN_CREATE ){ ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW; OSTRACE1( "OPEN open new/create\n" ); }else{ ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW; OSTRACE1( "OPEN open existing\n" ); } if( flags & SQLITE_OPEN_MAIN_DB ){ ulOpenMode |= OPEN_SHARE_DENYNONE; OSTRACE1( "OPEN share read/write\n" ); }else{ ulOpenMode |= OPEN_SHARE_DENYWRITE; OSTRACE1( "OPEN share read only\n" ); } if( flags & SQLITE_OPEN_DELETEONCLOSE ){ char pathUtf8[CCHMAXPATH]; #ifdef NDEBUG /* when debugging we want to make sure it is deleted */ ulFileAttribute = FILE_HIDDEN; #endif os2FullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 ); pFile->pathToDel = convertUtf8PathToCp( pathUtf8 ); OSTRACE1( "OPEN hidden/delete on close file attributes\n" ); }else{ pFile->pathToDel = NULL; OSTRACE1( "OPEN normal file attribute\n" ); } /* always open in random access mode for possibly better speed */ ulOpenMode |= OPEN_FLAGS_RANDOM; ulOpenMode |= OPEN_FLAGS_FAIL_ON_ERROR; |
︙ | ︙ |