libpqxx:out-of-tree-lint

Last commit made on 2023-05-19
Get this branch:
git clone -b out-of-tree-lint https://git.launchpad.net/libpqxx

Branch merges

Branch information

Name:
out-of-tree-lint
Repository:
lp:libpqxx

Recent commits

6d4c327... by Jeroen T. Vermeulen

Fix shellcheck run for out-of-tree runs.

eddcf21... by Jeroen Vermeulen <email address hidden>

Run shellcheck if available. (#690)

Also had to address some lint that shellcheck found.

38f1c5f... by Jeroen Vermeulen <email address hidden>

Update `config.guess`. (#689)

Really grateful for #688, but there's one problem: it's a lot of work to
review that entire script! There's some clear improvements, but also a
lot of more or less arbitrary changes.

Yes, yes, I know — the script comes from the GNU site, which we trust
all the time anyway. But how do I _know_ that it came from the GNU
site?

So here's a lazy shortcut: I download an update of known GNU provenance,
I merge that into the repo, and then hopefully the PR will resolve to a
tiny remaining diff. Or if we're lucky, none at all.

4fefd5f... by Jeroen Vermeulen <email address hidden>

Stop including `<ciso646>`. (#685)

Fixes #680.

C++17 compilers should not need this header. (Visual Studio complains
if we include this anyway, even if it's only in the case where the
file actually exists. It suggests a way to disable that warning, but
it does not seem to work.)

613f068... by Jeroen Vermeulen <email address hidden>

Fix "double free" crash when building as shared. (#683)

Fixes #681.

When building libpqxx as a shared library with gcc 12, any program that included libpqxx headers (with a few exceptions) would crash after `main()` returned.

There was an error message:

_free(): double free detected in tcache 2_

The problem turned out to be triggered by the inlining of any specialisation of `pqxx::type_name`, as we did in the macro `PQXX_DECLARE_ENUM_CONVERSION`. There's a header that uses that macro, thus triggering the problem.

I had to make enum `type_name` a `std::string_view`. This pains me. It changes the type of the variable. But gcc 12 (in a
shared-library build) won't let me get away with an `inline std::string` and clang won't let me get away with a none-`inline` `std::string`.

A `std::string_view` is easier — trivial destructor, no allocations.

7e22c80... by Jeroen Vermeulen <email address hidden>

Trailing spaces. (#679)

5b71ced... by Jeroen Vermeulen <email address hidden>

Fix `std::functional` problems. (#677)

Thanks @KayEss for pointing out that I shouldn't be using a `std::function` as a deleter for a `std::shared_ptr` or `std::unique_ptr`. Using ordinary function pointers instead.

I also worked around a bunch of gcc compile errors when I combined...
* The address sanitizer or "asan" (`-fsanitize=address`).
* Warnings as errors (`-Werror`).
* Uninitialized analyzer (`-Wanalyzer-use-of-uninitialized-value`).

The combination of audit mode (`--enable-audit` in the `configure` script) and maintainer mode (`--enable-maintainer-mode`
in the `configure` script) got us into exactly that combination.

It would seem that there's a problem with gcc. It doesn't happen in clang. I worked around it by replacing the one regex in the code with a manual parsing loop like I used to have.

e864d95... by Jeroen Vermeulen <email address hidden>

Ditch an unused variable. (#676)

41aa1e4... by Jeroen Vermeulen <email address hidden>

String conversion API: specify conversions. (#652)

A `string_traits` can now set `converts_to_string` and `converts_from_string` to say which conversions are available. Future versions of libpqxx can define concepts based on these, and give clearer and more helpful compile errors for attempts to call unavailable conversions.

0e9e183... by Blue Santa <email address hidden>

Blue santa (#662)

* update configure install process to account for correct prerequisite libraries

* additional updates and clarifications for ./configure install process

* attempt at performing requested changes to pull request #662

* adding links to main README.md file

* test correct relative link typo

* link correction

* update relative links in README.md

* remove par about needing headers as well as binaries

* update to add 'building and installing'