From 16189376373c0390abb7e6d792aa5af87659f7c1 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Fri, 9 Apr 2021 18:53:48 +0200 Subject: Sqlite: Use config.h instead of setting everything in the build files Change-Id: Ia70a5e78475a8b8078276df03330060c8785bf90 Reviewed-by: Thomas Hartmann --- src/libs/3rdparty/sqlite/config.h | 84 +++++++++++++++++++++++++++++++++++++ src/libs/3rdparty/sqlite/sqlite.h | 29 +++++++++++++ src/libs/3rdparty/sqlite/sqlite.pri | 6 +++ 3 files changed, 119 insertions(+) create mode 100644 src/libs/3rdparty/sqlite/config.h create mode 100644 src/libs/3rdparty/sqlite/sqlite.h (limited to 'src/libs/3rdparty') diff --git a/src/libs/3rdparty/sqlite/config.h b/src/libs/3rdparty/sqlite/config.h new file mode 100644 index 00000000000..19757d3f8e8 --- /dev/null +++ b/src/libs/3rdparty/sqlite/config.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include + +#if __has_include() +#include +#endif + +#if __has_include() +#define HAVE_UTIME 1 +#endif + +#if (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200809L) || _DEFAULT_SOURCE || _BSD_SOURCE +#define HAVE_USLEEP 1 +#endif + +#ifdef _GNU_SOURCE +#define HAVE_STRCHRNUL 1 +#endif + +#if _POSIX_C_SOURCE >= 199309L || _XOPEN_SOURCE >= 500 +#define HAVE_FDATASYNC 1 +#endif + +#if _POSIX_C_SOURCE >= 1 || _BSD_SOURCE +#define HAVE_LOCALTIME_R 1 +#else +#define HAVE_LOCALTIME_S 1 +#endif + +#define HAVE_MALLOC_USABLE_SIZE 1 +#define HAVE_ISNAN 1 + +#define SQLITE_THREADSAFE 2 +#define SQLITE_ENABLE_FTS5 1 +#define SQLITE_ENABLE_UNLOCK_NOTIFY 1 +#define SQLITE_ENABLE_JSON1 1 +#define SQLITE_DEFAULT_FOREIGN_KEYS 1 +#define SQLITE_TEMP_STORE 2 +#define SQLITE_DEFAULT_WAL_SYNCHRONOUS 1 +#define SQLITE_MAX_WORKER_THREADS 1 +#define SQLITE_DEFAULT_MEMSTATUS 0 +#define SQLITE_OMIT_DEPRECATED 1 +#define SQLITE_OMIT_DECLTYPE 1 +#define SQLITE_MAX_EXPR_DEPTH 0 +#define SQLITE_OMIT_SHARED_CACHE 1 +#define SQLITE_USE_ALLOCA 1 +#define SQLITE_ENABLE_MEMORY_MANAGEMENT 1 +#define SQLITE_ENABLE_NULL_TRIM 1 +#define SQLITE_OMIT_EXPLAIN 1 +#define SQLITE_OMIT_LOAD_EXTENSION 1 +#define SQLITE_OMIT_UTF16 1 +#define SQLITE_DQS 0 +#define SQLITE_ENABLE_STAT4 1 +#define SQLITE_DEFAULT_MMAP_SIZE 268435456 +#define SQLITE_ENABLE_SESSION 1 +#define SQLITE_ENABLE_PREUPDATE_HOOK 1 +#define SQLITE_LIKE_DOESNT_MATCH_BLOBS 1 +#define SQLITE_OMIT_AUTOINIT 1 diff --git a/src/libs/3rdparty/sqlite/sqlite.h b/src/libs/3rdparty/sqlite/sqlite.h new file mode 100644 index 00000000000..ba06815b4d9 --- /dev/null +++ b/src/libs/3rdparty/sqlite/sqlite.h @@ -0,0 +1,29 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include "config.h" +#include "sqlite3ext.h" diff --git a/src/libs/3rdparty/sqlite/sqlite.pri b/src/libs/3rdparty/sqlite/sqlite.pri index ffc3a706e65..e869f4fc56e 100644 --- a/src/libs/3rdparty/sqlite/sqlite.pri +++ b/src/libs/3rdparty/sqlite/sqlite.pri @@ -1,6 +1,12 @@ INCLUDEPATH *= $$PWD +linux:DEFINES += _POSIX_C_SOURCE=200809L _GNU_SOURCE +osx:DEFINES += _BSD_SOURCE + + HEADERS += $$PWD/sqlite3.h \ + $$PWD/config.h \ + $$PWD/sqlite.h \ $$PWD/sqlite3ext.h SOURCES += $$PWD/sqlite3.c \ -- cgit v1.2.3