зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514683 - Enable SQLITE_DBCONFIG_DEFENSIVE. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D14854 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
21cf41ae2b
Коммит
017a925896
|
@ -36,7 +36,7 @@ SOURCES += [
|
|||
# Note: Be sure to update the configure.in checks when these change!
|
||||
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
|
||||
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||
'SQLITE_ENABLE_DBSTAT_VTAB'):
|
||||
'SQLITE_ENABLE_DBSTAT_VTAB', 'SQLITE_DBCONFIG_DEFENSIVE'):
|
||||
DEFINES[var] = 1
|
||||
|
||||
DEFINES['SQLITE_DEFAULT_PAGE_SIZE'] = 32768
|
||||
|
|
|
@ -3134,6 +3134,35 @@ then
|
|||
if test "x$ac_cv_sqlite_dbstat_vtab" = "xno"; then
|
||||
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB.])
|
||||
fi
|
||||
|
||||
dnl =========================================
|
||||
dnl === SQLITE_DBCONFIG_DEFENSIVE check ===
|
||||
dnl =========================================
|
||||
dnl check to see if the system SQLite package is compiled with
|
||||
dnl SQLITE_DBCONFIG_DEFENSIVE.
|
||||
AC_MSG_CHECKING(for SQLITE_DBCONFIG_DEFENSIVE support in system SQLite)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
|
||||
_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS $SQLITE_LIBS"
|
||||
AC_CACHE_VAL(ac_cv_sqlite_dbconfig_defensive,[
|
||||
AC_TRY_RUN([
|
||||
#include "sqlite3.h"
|
||||
|
||||
int main(int argc, char **argv){
|
||||
return !sqlite3_compileoption_used("SQLITE_DBCONFIG_DEFENSIVE");
|
||||
}],
|
||||
ac_cv_sqlite_dbconfig_defensive=yes,
|
||||
ac_cv_sqlite_dbconfig_defensive=no,
|
||||
ac_cv_sqlite_dbconfig_defensive=no
|
||||
)
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_sqlite_dbconfig_defensive)
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
LIBS="$_SAVE_LIBS"
|
||||
if test "x$ac_cv_sqlite_dbconfig_defensive" = "xno"; then
|
||||
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_DBCONFIG_DEFENSIVE.])
|
||||
fi
|
||||
else
|
||||
dnl ==============================
|
||||
dnl === SQLite fdatasync check ===
|
||||
|
|
Загрузка…
Ссылка в новой задаче