SQLite

Check-in [afe1963ec5]
Login

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

Overview
Comment:Work around problems with compilers that do not allow C preprocessor macros with empty arguments. (CVS 4921)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: afe1963ec5588d2195f027fa438cf63d49c89cd9
User & Date: drh 2008-03-26 17:18:48.000
Context
2008-03-26
18:34
Changes to delay freeing buffers associated with vdbe memory cells until either sqlite3_finalize() or sqlite3_release_memory() is called. (CVS 4922) (check-in: 8c2f69521f user: danielk1977 tags: trunk)
17:18
Work around problems with compilers that do not allow C preprocessor macros with empty arguments. (CVS 4921) (check-in: afe1963ec5 user: drh tags: trunk)
15:56
Change comment in sqliteLimit.h to correctly describe the SQLITE_MAX_ATTACHED #define. Ticket #3016. (CVS 4920) (check-in: d016d07840 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os.c.
111
112
113
114
115
116
117
118


119
120
121
122
123
124
125
  DO_OS_MALLOC_TEST;
  return pVfs->xOpen(pVfs, zPath, pFile, flags, pFlagsOut);
}
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 sqlite3OsGetTempname(sqlite3_vfs *pVfs, int nBufOut, char *zBufOut){
  return pVfs->xGetTempname(pVfs, nBufOut, zBufOut);
}
int sqlite3OsFullPathname(
  sqlite3_vfs *pVfs, 
  const char *zPath, 







|
>
>







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  DO_OS_MALLOC_TEST;
  return pVfs->xOpen(pVfs, zPath, pFile, flags, pFlagsOut);
}
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){
  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);
}
int sqlite3OsFullPathname(
  sqlite3_vfs *pVfs, 
  const char *zPath, 
261
262
263
264
265
266
267








  sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
  sqlite3_mutex_enter(mutex);
  vfsUnlink(pVfs);
  sqlite3_mutex_leave(mutex);
  return SQLITE_OK;
}















>
>
>
>
>
>
>
>
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
  sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
  sqlite3_mutex_enter(mutex);
  vfsUnlink(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
Changes to src/os.h.
262
263
264
265
266
267
268
269
270
271
272
273
274
275
** Each OS-specific backend defines an instance of the following
** structure for returning a pointer to its sqlite3_vfs.  If OS_OTHER
** is defined (meaning that the application-defined OS interface layer
** is used) then there is no default VFS.   The application must
** 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_ */







<

<
<
<


262
263
264
265
266
267
268

269



270
271
** Each OS-specific backend defines an instance of the following
** structure for returning a pointer to its sqlite3_vfs.  If OS_OTHER
** is defined (meaning that the application-defined OS interface layer
** is used) then there is no default VFS.   The application must
** register one or more VFS structures using sqlite3_vfs_register()
** before attempting to use SQLite.
*/

sqlite3_vfs *sqlite3OsDefaultVfs(void);




#endif /* _SQLITE_OS_H_ */