The HAS_CONSTRUCTOR check didn't do anything, since we tried to use __attribute__((constructor)) whether it was defined or not. That caused a build failure on MSVC.
Also, we shouldn't add the constructor attribute from a public header, since it's only relevant while building the library, and is conditioned on a config.h macro that isn't visible outside the library. Move constructor handling directly to the one call site that needs it.
While we're here, simplify the constructor support check in meson.build.
The
HAS_CONSTRUCTOR
check didn't do anything, since we tried to use__attribute__((constructor))
whether it was defined or not. That caused a build failure on MSVC.Also, we shouldn't add the constructor attribute from a public header, since it's only relevant while building the library, and is conditioned on a
config.h
macro that isn't visible outside the library. Move constructor handling directly to the one call site that needs it.While we're here, simplify the constructor support check in
meson.build
.