From efcea3a80da7c4479d5fe168435ecc9fd06bdc72 Mon Sep 17 00:00:00 2001 From: John Turner Date: Sun, 14 Sep 2025 00:16:10 -0400 Subject: Squashed 'subprojects/boost-sqlite/' content from commit 3378e35 git-subtree-dir: subprojects/boost-sqlite git-subtree-split: 3378e353705271e569cf4ba15c467b840a39798c --- include/boost/sqlite/detail/config.hpp | 83 ++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 include/boost/sqlite/detail/config.hpp (limited to 'include/boost/sqlite/detail/config.hpp') diff --git a/include/boost/sqlite/detail/config.hpp b/include/boost/sqlite/detail/config.hpp new file mode 100644 index 0000000..2126f60 --- /dev/null +++ b/include/boost/sqlite/detail/config.hpp @@ -0,0 +1,83 @@ +// +// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef BOOST_SQLITE_DETAIL_CONFIG_HPP +#define BOOST_SQLITE_DETAIL_CONFIG_HPP + +#include +#include + +#if defined(BOOST_SQLITE_COMPILE_EXTENSION) +#include +#define BOOST_SQLITE_COMPILING_EXTENSION 1 +#define BOOST_SQLITE_BEGIN_NAMESPACE namespace boost { namespace sqlite { inline namespace ext { +#define BOOST_SQLITE_END_NAMESPACE } } } +#else +#include +#define BOOST_SQLITE_BEGIN_NAMESPACE namespace boost { namespace sqlite { +#define BOOST_SQLITE_END_NAMESPACE } } +#endif + +// copied from boost.json +#if defined(BOOST_SQLITE_DOCS) +# define BOOST_SQLITE_DECL +#else +# if (defined(BOOST_SQLITE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_SQLITE_STATIC_LINK) +# if defined(BOOST_SQLITE_SOURCE) +# define BOOST_SQLITE_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_SQLITE_DECL BOOST_SYMBOL_IMPORT +# endif +# endif // static lib +# ifndef BOOST_SQLITE_DECL +# define BOOST_SQLITE_DECL +# endif +# if !defined(BOOST_SQLITE_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SQLITE_NO_LIB) +# define BOOST_LIB_NAME boost_sqlite +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SQLITE_DYN_LINK) +# define BOOST_DYN_LINK +# endif +# include +# endif +#endif + +BOOST_SQLITE_BEGIN_NAMESPACE + + +#if defined(BOOST_SQLITE_COMPILE_EXTENSION) +extern const sqlite3_api_routines *sqlite3_api; +#endif + +using string_view = boost::core::string_view; + +BOOST_SQLITE_END_NAMESPACE + +#define BOOST_SQLITE_RETURN_EC(ev) \ +do \ +{ \ + static constexpr auto loc##__LINE__((BOOST_CURRENT_LOCATION)); \ + return ::boost::system::error_code(ev, boost::sqlite::sqlite_category(), &loc##__LINE__); \ +} \ +while (false) + +#define BOOST_SQLITE_ASSIGN_EC(ec, ev) \ +do \ +{ \ + static constexpr auto loc##__LINE__((BOOST_CURRENT_LOCATION)); \ + ec.assign(ev, boost::sqlite::sqlite_category(), &loc##__LINE__); \ +} \ +while (false) + +#if defined(BOOST_SQLITE_NO_VIRTUAL) +#define BOOST_SQLITE_VIRTUAL +#define BOOST_SQLITE_PURE +#else +#define BOOST_SQLITE_VIRTUAL virtual +#define BOOST_SQLITE_PURE = 0 +#endif + +#endif // BOOST_SQLITE_DETAIL_HPP \ No newline at end of file -- cgit v1.2.3