* vmime: avoid changing SEVEN_BIT when encoding::decideImpl sees U+007F
Do not switch to QP/B64 when encountering U+007F.
U+007F is part of ASCII just as much as U+0001 is.
---------
Co-authored-by: Vincent Richard <vincent@vincent-richard.net>
* build: replace class noncopyable by C++11 deleted function declaration
C++11 is mandatory since commit v0.9.2-48-g8564b2f8, therefore we can
exercise the =delete keyword in class declarations to prohibit
copying.
* build: resolve -Woverloaded-virtual warnings
context.hpp:109:26: warning: "virtual vmime::context&
vmime::context::operator=(const vmime::context&)’ was hidden
[-Woverloaded-virtual=]
109 | virtual context& operator=(const context& ctx);
| ^~~~~~~~
generationContext.hpp:153:28: note: by ‘vmime::generationContext&
vmime::generationContext::operator=(const vmime::generationContext&)’
153 | generationContext& operator=(const generationContext& ctx);
| ^~~~~~~~
AFAICS, there is no point in having "virtual" on an assignment operator.
Any derived classes' operator= has different signature anyway.
It is also the only class with a virtual operator=, so that's an indicator
for oddness as well.
* build: resolve -Wdeprecated-declarations warnings
encoding.cpp: In static member function "static const vmime::encoding
vmime::encoding::decideImpl(std::__cxx11::basic_string<char>::const_iterator,
std::__cxx11::basic_string<char>::const_iterator)":
encoding.cpp:161:29: warning: "std::binder2nd<_Operation>
std::bind2nd(const _Operation&, const _Tp&) [with _Operation =
less<unsigned char>; _Tp = int]" is deprecated: use "std::bind" instead
[-Wdeprecated-declarations]
161 | std::bind2nd(std::less<unsigned char>(), 127)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C++11 is mandatory, so just use a lambda already.
* Add parsing feedback via parsingContext
Changes the parsing context to be modifiable to be able to provide
feedback on the parsing. This allows the user to check if header
recovery was necessary, for example, while parsing the current message.
Signed-off-by: Ben Magistro <koncept1@gmail.com>
Co-authored-by: Vincent Richard <vincent@vincent-richard.net>
* Allow appending of local hostname to be configured via parsing context
Signed-off-by: Ben Magistro <koncept1@gmail.com>
Co-authored-by: Vincent Richard <vincent@vincent-richard.net>
When the ``sender`` function argument is the empty object, vmime
would still attempt to use it at ``sender.getEmail().generate()``,
but that produces just ``@``. As sendmail is called with ``-f @``,
this shows up in postfix's logs as ``<""@>``.
* build: add FreeBSD compilation support
* build: unbreak compilation with clang libc++
unary_function is obsolete with C++11 and removed in C++17.
gnu-gcc-libstdc++ still has the class, but llvm-clang-libc++ does
not, and there is a compile error.
vmime should have just stopped using unary_function with commit
v0.9.2-48-g8564b2f8.
$ cat x.cpp
$ clang++ -std=c++17 -stdlib=libc++ -c x.cpp
In file included from x.cpp:1:
In file included from /usr/local/include/vmime/net/transport.hpp:34:
In file included from /usr/local/include/vmime/net/service.hpp:36:
In file included from /usr/local/include/vmime/net/session.hpp:40:
In file included from /usr/local/include/vmime/utility/url.hpp:30:
/usr/local/include/vmime/propertySet.hpp:339:33: error: no template named
/'unary_function' in namespace 'std'; did you mean '__unary_function'?
class propFinder : public std::unary_function <shared_ptr <property>, bool> {
~~~~~^~~~~~~~~~~~~~
__unary_function
This restructures the cmake a little bit to only find components if they
are actually enabled. It also rearranges things to better group some
related items. This change also fixes include directories for the build
target allowing the library to be embedded making the install step
optional.
Signed-off-by: Ben Magistro <koncept1@gmail.com>