This prevents the weird failures I saw on macOS in #17856; instead, it
should fail on *all* platforms with
Unhandled exception ("epan/proto.c:8800: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"", group=1, code=6)
(which it does on macOS 11.6/Xcode 12.5.1 and Windows 10/VS 2019
16.11.8; according to
https://en.wikipedia.org/w/index.php?title=Thread-local_storage&oldid=1064900318#C_and_C++
the major UN*X C compilers support __thread and the major Windows C
compilers support __declspec(thread).).
@jvalverde: on branches that require C11/C++11 support, we could perhaps
just use _Thread_local for C and thread_local for C++. Note that
<thread.h> is optional in C11, and macOS 11.6/Xcode 12.5.1 does not
appear to include it.)
This does not *fix* the aforementioned issue; to do *that* we need to do
TRY in the register-dissectors thread code. I'm committing this
separately because it fixes a bug in our exception package that could
cause all sorts of randomness now and in the future - what we're doing
now is Just Wrong.
(Yes, there's code to support per-thread exception handler stacks *on
platforms with pthreads*, but this is simpler *and* also works on
Windows.)
Add a LOG_LEVEL_ECHO that is always active and always non-fatal.
Use that to implement a WS_DEBUG_HERE() macro for quick print outs
during debugging sessions.
Currently used to define ssize_t on platforms that lack it.
Fix some Windows build errors caused by moving the definition into a
separate header.
Fix some narrowing warnings on Windows x64 from changing the definition
of ssize_t from long int to int64_t.
The casts in dumpcap are ugly but necessary. The whole code needs
to be rewritten for portability, or the warnings disabled.
Wmem is an alternative to GLib data structures so it should
have the same scope and be equally as convenient to use.
Wmem does not and cannot depend on anything else other than
GLib.
Blind attempt to fix Debian package brokenness managing
headers separately from install rules.
Global public headers that don't fit any of the Wireshark
libraries should be placed in include/.
Eventually the C files in the root dir should be placed somewhere
else as well (like src/) but this is not a priority.
Fixes#17726.