Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
8.0.0-rc4
- Release candidate for 8.0.0.
- Any changes will be logged under "8.0.0".
- Stop trying to use/support `std::filesystem`.
8.0.0
- C++20 is now the oldest C++ version that libpqxx supports.
- **Result/row iterators have changed.** Instead of `i[n]` do `(*i)[n]`.
Expand Down
7 changes: 4 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,11 @@ All shell scripts now have a `.sh` suffix. It takes some getting used to, but
it simplifies some things such as running lint checkers on all of them without
having to name each one of them individually.

The build no longer tries to figure out whether it needs to link a standard C++
The build no longer tries to figure out whether you need to link a standard C++
filesystems library. In most cases this seems to be part of the regular
standard library now. If you do need to add a link option to get
`std::filesystem` to work, you'll have to pass that option yourself.
standard library now, and at any rate libpqxx itself does not use it. If you
do need to add a link option to get `std::filesystem` to work, you'll have to
pass that option yourself.

In the lint script (now called `tools/lint.sh`), set `PQXX_LINT=skip` to skip
lint checks. This can speed up `make check` runs, and enable them to run
Expand Down
5 changes: 0 additions & 5 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ check_function_exists("poll" PQXX_HAVE_POLL)
# Incorporate feature checks based on C++ feature test mac
include(pqxx_cxx_feature_checks)

# This variable is set by one of the snippets in config-tests.
if(!no_need_fslib)
# TODO: This may work for gcc 8, but some clang versions may need -lc++fs.
link_libraries(stdc++fs)
endif()
set(AC_CONFIG_H_IN "${PROJECT_SOURCE_DIR}/include/pqxx/config.h.in")
set(CM_CONFIG_H_IN "${PROJECT_BINARY_DIR}/include/pqxx/config_cmake.h.in")
set(CM_CONFIG_PUB "${PROJECT_BINARY_DIR}/include/pqxx/config-public-compiler.h")
Expand Down
4 changes: 0 additions & 4 deletions cmake/pqxx_cxx_feature_checks.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions config-tests/no_need_fslib.cxx

This file was deleted.

44 changes: 0 additions & 44 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions include/pqxx/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,3 @@

/* Version number of package */
#undef VERSION

/* Define if this feature is available. */
#undef no_need_fslib
10 changes: 0 additions & 10 deletions include/pqxx/zview.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#define PQXX_H_ZVIEW

#include <cassert>
#include <filesystem>
#include <string>
#include <string_view>
#include <type_traits>
Expand Down Expand Up @@ -113,15 +112,6 @@ public:
zview(literal, size - 1)
{}

#if !defined(_WIN32)
/// Construct a `zview` from a `std::filesystem::path`.
/** @warn We don't currently support this on Windows, where encoding is a
* somewhat complicated question. Answers on the internet often seem
* contradictory.
*/
zview(std::filesystem::path const &p) : zview(p.c_str()) {}
#endif // _WIN32

/// Either a null pointer, or a zero-terminated text buffer.
[[nodiscard]] constexpr char const *c_str() const & noexcept
{
Expand Down
10 changes: 0 additions & 10 deletions pqxx_cxx_feature_checks.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,4 @@ AC_COMPILE_IFELSE(
[Define if this feature is available.]),
PQXX_HAVE_ZARGS=no)
AC_MSG_RESULT($PQXX_HAVE_ZARGS)
AC_MSG_CHECKING([no_need_fslib])
no_need_fslib=yes
AC_COMPILE_IFELSE(
[read_test(no_need_fslib.cxx)],
AC_DEFINE(
[no_need_fslib],
1,
[Define if this feature is available.]),
no_need_fslib=no)
AC_MSG_RESULT($no_need_fslib)
# End of config.
21 changes: 0 additions & 21 deletions test/test_blob.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <cstdio>
#include <filesystem>

#include <pqxx/blob>
#include <pqxx/transaction>
Expand Down Expand Up @@ -609,25 +608,6 @@ void test_blob_close_leaves_blob_unusable()
}


void test_blob_accepts_std_filesystem_path()
{
#if !defined(_WIN32)
char const temp_file[] = "blob-test-filesystem-path.tmp";
pqxx::bytes const data{std::byte{'4'}, std::byte{'2'}};

pqxx::connection cx;
pqxx::work tx{cx};
pqxx::bytes buf;

TempFile const f{std::data(temp_file), data};
std::filesystem::path const path{temp_file};
auto id{pqxx::blob::from_file(tx, path)};
pqxx::blob::to_buf(tx, id, buf, 10);
PQXX_CHECK_EQUAL(buf, data);
#endif // _WIN32
}


PQXX_REGISTER_TEST(test_blob_is_useless_by_default);
PQXX_REGISTER_TEST(test_blob_create_makes_empty_blob);
PQXX_REGISTER_TEST(test_blob_create_with_oid_requires_oid_be_free);
Expand Down Expand Up @@ -655,5 +635,4 @@ PQXX_REGISTER_TEST(test_blob_from_file_with_oid_writes_blob);
PQXX_REGISTER_TEST(test_blob_append_to_buf_appends);
PQXX_REGISTER_TEST(test_blob_to_file_writes_file);
PQXX_REGISTER_TEST(test_blob_close_leaves_blob_unusable);
PQXX_REGISTER_TEST(test_blob_accepts_std_filesystem_path);
} // namespace