early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,14 @@
/* System supports poll(). */
#cmakedefine HAVE_POLL 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1

View File

@@ -0,0 +1,8 @@
/* Define if compiler supports [[deprecated]] attribute */
#cmakedefine PQXX_HAVE_DEPRECATED 1
/* Define if the compiler supports std::experimental::optional. */
#cmakedefine PQXX_HAVE_EXP_OPTIONAL 1
/* Define if the compiler supports std::optional. */
#cmakedefine PQXX_HAVE_OPTIONAL 1

View File

@@ -0,0 +1,104 @@
diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx
index abc1a39..cba0242 100644
--- a/include/pqxx/internal/header-pre.hxx
+++ b/include/pqxx/internal/header-pre.hxx
@@ -90,6 +90,12 @@
// Workarounds for Microsoft Visual C++
# ifdef _MSC_VER
+
+// Workarounds for deprecated attribute syntax error in Visual Studio 2017.
+# if _MSC_VER < 1920
+# define PQXX_DEPRECATED(MESSAGE) __declspec(deprecated( #MESSAGE ))
+# endif
+
// Suppress vtables on abstract classes.
# define PQXX_NOVTABLE __declspec(novtable)
@@ -159,6 +165,10 @@
# define PQXX_NOVTABLE /* novtable */
#endif
+#ifndef PQXX_DEPRECATED
+# define PQXX_DEPRECATED(MESSAGE) [[deprecated( #MESSAGE )]]
+#endif
+
// C++20: Assume support.
#if defined(PQXX_HAVE_LIKELY)
# define PQXX_LIKELY [[likely]]
diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx
index ff4a93d..5b300d6 100644
--- a/include/pqxx/stream_from.hxx
+++ b/include/pqxx/stream_from.hxx
@@ -153,7 +153,7 @@ public:
/** @deprecated Use factories @ref table or @ref raw_table instead.
*/
template<typename Iter>
- [[deprecated("Use table() or raw_table() factory instead.")]] stream_from(
+ PQXX_DEPRECATED("Use table() or raw_table() factory instead.") stream_from(
transaction_base &, from_table_t, std::string_view table,
Iter columns_begin, Iter columns_end);
@@ -161,13 +161,13 @@ public:
/** @deprecated Use factory function @ref query instead.
*/
template<typename Columns>
- [[deprecated("Use table() or raw_table() factory instead.")]] stream_from(
+ PQXX_DEPRECATED("Use table() or raw_table() factory instead.") stream_from(
transaction_base &tx, from_table_t, std::string_view table,
Columns const &columns);
#include "pqxx/internal/ignore-deprecated-pre.hxx"
/// @deprecated Use factories @ref table or @ref raw_table instead.
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
+ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from(
transaction_base &tx, std::string_view table) :
stream_from{tx, from_table, table}
{}
@@ -175,14 +175,14 @@ public:
/// @deprecated Use factories @ref table or @ref raw_table instead.
template<typename Columns>
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
+ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from(
transaction_base &tx, std::string_view table, Columns const &columns) :
stream_from{tx, from_table, table, columns}
{}
/// @deprecated Use factories @ref table or @ref raw_table instead.
template<typename Iter>
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
+ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from(
transaction_base &, std::string_view table, Iter columns_begin,
Iter columns_end);
diff --git a/include/pqxx/stream_to.hxx b/include/pqxx/stream_to.hxx
index 2a49d8f..06e602e 100644
--- a/include/pqxx/stream_to.hxx
+++ b/include/pqxx/stream_to.hxx
@@ -169,7 +169,7 @@ public:
* your data fields and the table is explicit in your code, and not hidden
* in an "implicit contract" between your code and your schema.
*/
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
transaction_base &tx, std::string_view table_name) :
stream_to{tx, table_name, ""sv}
{}
@@ -178,14 +178,14 @@ public:
/** @deprecated Use @ref table or @ref raw_table as a factory.
*/
template<typename Columns>
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
transaction_base &, std::string_view table_name, Columns const &columns);
/// Create a stream, specifying column names as a sequence of strings.
/** @deprecated Use @ref table or @ref raw_table as a factory.
*/
template<typename Iter>
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
transaction_base &, std::string_view table_name, Iter columns_begin,
Iter columns_end);

28
externals/vcpkg/ports/libpqxx/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,28 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jtv/libpqxx
REF 90768b07f7feb55a9bd70cfaacb5543bfd074022 # 7.7.3
SHA512 cbb21b148135d9426acd8006bfab872997bae65cfaa7af414083a8d219f099edcc83de7bde5e36016c1f8333f1e4d03fc401a4e741dfd0881afda3e1a20009ff
HEAD_REF master
PATCHES
fix_build_with_vs2017.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-internal-compiler.h.in" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSKIP_BUILD_TEST=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libpqxx)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_fixup_pkgconfig()

18
externals/vcpkg/ports/libpqxx/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,18 @@
{
"name": "libpqxx",
"version": "7.7.3",
"description": "The official C++ client API for PostgreSQL",
"homepage": "https://www.postgresql.org/",
"license": "BSD-3-Clause",
"dependencies": [
"libpq",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}