sql: Make //sql/vfs_wrapper.cc compatible with SQLITE_OMIT_DEPRECATED.
Our SQLite VFS [1] wrapper implementation unconditionally wraps xCurrentTime(). However, when SQLite is compiled with the SQLITE_OMIT_DEPRECATED option [2], xCurrentTime() is null for the VFS implementations that ship with SQLite, because xCurrentTime() was deprecated in favor of xCurrentTimeInt64(). This CL replaces the unconditional wrapper with a conditional wrapper. This ensures that our VFS wrapper exposes an xCurrentTimeInt64() implementation when used with a modern SQLite library (like the one bundled with Chromium), and an xCurrentTime() implementation when using an older SQLite version (which might be the case when using the library bundled with the operating system). [1] https://www.sqlite.org/c3ref/vfs.html [2] https://www.sqlite.org/compile.html#omit_deprecated Bug: 807093 Change-Id: Id26cc4517a1a23692e7860ed620348c027db990f Reviewed-on: https://chromium-review.googlesource.com/892484Reviewed-by:Chris Mumford <cmumford@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#532969}
Showing
Please register or sign in to comment