From: drh Date: Wed, 26 Mar 2008 17:18:48 +0000 (+0000) Subject: Work around problems with compilers that do not allow C preprocessor X-Git-Tag: version-3.5.8~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e2e6dc9505b9dec7fd809020ede9db4bfd9a694;p=thirdparty%2Fsqlite.git Work around problems with compilers that do not allow C preprocessor macros with empty arguments. (CVS 4921) FossilOrigin-Name: afe1963ec5588d2195f027fa438cf63d49c89cd9 --- diff --git a/manifest b/manifest index 2835458c75..644953086a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Change\scomment\sin\ssqliteLimit.h\sto\scorrectly\sdescribe\sthe\nSQLITE_MAX_ATTACHED\s#define.\s\sTicket\s#3016.\s(CVS\s4920) -D 2008-03-26T15:56:22 +C Work\saround\sproblems\swith\scompilers\sthat\sdo\snot\sallow\sC\spreprocessor\nmacros\swith\sempty\sarguments.\s(CVS\s4921) +D 2008-03-26T17:18:48 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in cf434ce8ca902e69126ae0f94fc9f7dc7428a5fa F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -117,8 +117,8 @@ F src/mutex.h 079fa6fe9da18ceb89e79012c010594c6672addb F src/mutex_os2.c 19ab15764736f13b94b4f70e53f77547cbddd47a F src/mutex_unix.c a6e111947a3cdaa2cda394ed060d7f496fcb4af8 F src/mutex_w32.c 6e197765f283815496193e78e9548b5d0e53b68e -F src/os.c 2f2753b8d33f79d169c43d6bb0b25b3c58fd33de -F src/os.h d04706d54a072c7a30ab9e346ad916ef28c842d5 +F src/os.c 9b943f71aaa1519f26cd45693a91b429b63aa042 +F src/os.h 497bf5f0f2648461ef65940cfb59ba427430f3fc F src/os_common.h e8b748b2f2ecc8a498e50bfe5d8721f189c19d2a F src/os_os2.c 85c443333761d5b58f041489a7b21ae918993e4f F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b @@ -618,7 +618,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 3fafa562593b51d38f58e7a691c193d34a812a05 -R 8a089ad8bbd59da1e6d02cd27ce05b46 +P d016d0784097e6657de26ccc6bece34913093fb0 +R 6a30be694ce8b9a07ddf6aceb1a9f0a1 U drh -Z a607ac3a03415d8747bf70bcad45eb82 +Z e985441f36301e76052987bf9e15f80e diff --git a/manifest.uuid b/manifest.uuid index 863182b7d6..1037dfbc2d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d016d0784097e6657de26ccc6bece34913093fb0 \ No newline at end of file +afe1963ec5588d2195f027fa438cf63d49c89cd9 \ No newline at end of file diff --git a/src/os.c b/src/os.c index f5397641d0..6671d0ae38 100644 --- a/src/os.c +++ b/src/os.c @@ -115,7 +115,9 @@ int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){ return pVfs->xDelete(pVfs, zPath, dirSync); } int sqlite3OsAccess(sqlite3_vfs *pVfs, const char *zPath, int flags){ - return pVfs->xAccess(pVfs, zPath, flags); + int rc = pVfs->xAccess(pVfs, zPath, flags); + assert( rc==0 || rc==1 ); + return rc; } int sqlite3OsGetTempname(sqlite3_vfs *pVfs, int nBufOut, char *zBufOut){ return pVfs->xGetTempname(pVfs, nBufOut, zBufOut); @@ -265,3 +267,11 @@ int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ sqlite3_mutex_leave(mutex); return SQLITE_OK; } + +/* +** Provide a default sqlite3OsDefaultVfs() implementation in the +** cases where none of the standard backends are used. +*/ +#if !OS_UNIX && !OS_WIN && !OS_OS2 +sqlite3_vfs *sqlite3OsDefaultVfs(void){ return 0; } +#endif diff --git a/src/os.h b/src/os.h index 026e2c430d..77934b840d 100644 --- a/src/os.h +++ b/src/os.h @@ -266,10 +266,6 @@ int sqlite3OsCloseFree(sqlite3_file *); ** register one or more VFS structures using sqlite3_vfs_register() ** before attempting to use SQLite. */ -#if OS_UNIX || OS_WIN || OS_OS2 sqlite3_vfs *sqlite3OsDefaultVfs(void); -#else -# define sqlite3OsDefaultVfs(X) 0 -#endif #endif /* _SQLITE_OS_H_ */