mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
Cairo 1.18 broke using cairo_public redefinition hack used before to
avoid declaring Cairo functions as being dll-imported. Use the new way
to prevent this from happening but still define cairo_public when using
older versions.
Note that, unfortunately, we can't do it unconditionally because this
results in a macro redefinition warning with newer versions which is
impossible to disable using gcc.
As the new hack is even worse than the existing one, move it into its
own header to avoid duplicating it in both between src/common/cairo.cpp
and src/generic/graphicc.cpp.
See #26224.
(cherry picked from commit 3193ce30af)