zoitechat references kill, popen, pclose, gmtime_r, and localtime_r
which are POSIX-only functions that need #define _POSIX_SOURCE to
build with LLVM or musl C, one of the two.
notification_backend_init() created its org.freedesktop.Notifications
proxy synchronously with G_DBUS_PROXY_FLAGS_NONE, which makes GDBus call
Properties.GetAll and wait for the reply. Some notification daemons
(e.g. awesome's naughty) never answer that call, so the UI thread
blocked until the 25 second D-Bus default timeout expired, leaving the
main window mapped but unpainted.
The proxy is only used for GetCapabilities and Notify, so create it with
DO_NOT_LOAD_PROPERTIES and DO_NOT_CONNECT_SIGNALS.
meson.source_root() is deprecated since 0.56, and should be replaced
with either project_source_root or global_source_root depending on
whether it is supposed to refer to a different subproject if the current
project is a subproject. The default for source_root itself was the
latter, which is broken in subproject builds, and is also incorrect for
us since our usage is to construct the path to a file that is part of
the zoitechat source tree.
Make this work semantically correctly by specifically accessing the root
of the current (sub)project, and fix a deprecation warning in the
process.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
network.c defines _POSIX_C_SOURCE before pulling in the socket headers.
On FreeBSD that hides the non-standard PF_* aliases from <sys/socket.h>,
so PF_UNSPEC is undeclared and the build fails:
src/common/network.c:169:20: error: use of undeclared identifier 'PF_UNSPEC'
getaddrinfo() is specified in terms of the AF_* constants anyway, and the
rest of the file already uses AF_INET, so use AF_UNSPEC here too.
gen-public-suffix.py downloads public_suffix_list.dat at build time and
only falls back to a few hardcoded Linux paths when that fails. Package
builds usually run without network access, and on FreeBSD the list is
installed under /usr/local/share/public_suffix_list, so the build dies
with "unable to load public suffix list".
Add a public-suffix-list option that takes the path of a local copy.
When it is set the generator reads just that file and never goes
online, which also keeps the generated table reproducible.
This trivial diff gets rid of noisy warnings such as
```
./src/common/ignore.c:274:13: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
274 | ignore_load ()
| ^
| void
```
when building with modern clang. This is cosmetic since these functions
are actually prototyped in a header, so if the header is in scope it's
not possible to call them with an arbitrary number of arguments.
Using HMAC ()'s facility of returning the digest in a static array is
not thread safe (this can't be fixed) and it is not portable to the
OpenSSL forks: BoringSSL removed support for this a decade ago (so
aws-lc doesn't support it either) and LibreSSL followed a few years
back.
There is no downside to having a 32-byte array on the stack and it would
make zoitechat safe to use from other forks without the need of patching
it.
Add an error check for the HMAC () call and handle the error in the
caller.
When nick indentation is off, lines after the first wrap back to the
left edge, under the timestamp. Add a text_wrap_align preference
(start of line, prefix, message) so they can line up under the nick or
the message text instead. It is applied at wrap time, so existing
scrollback is re-wrapped when the setting changes, and the menu is
greyed out while nick indentation is on.
master's new xtext_tests target compiles xtext.c on its own with only
GTK linked, so hexcolor_parse cannot live in util.c. Keep it in a
dependency-free hexcolor.c that both test targets compile, and register
it in the Visual Studio project for the Windows build.
Claude-Session: https://claude.ai/code/session_01Jxd4AknGzdAENADWAGHCzx
Instead of retrieving the AlgorithmIdentifier and then reaching into it
to get the OID, the relevant OID can be obtained directly from the same
function.