Created attachment 91377 [details] Patch to set disabled feature macros to 0 instead of undefined I'm trying to clean out gcc warnings in WebKitGTK, and running into this one: In file included from ../../Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp:42:0: /usr/include/cairo/cairo-gl.h:113:5: error: "CAIRO_HAS_WGL_FUNCTIONS" is not defined [-Werror=undef] #if CAIRO_HAS_WGL_FUNCTIONS Theoretically, gcc shouldn't be complaining about this because Cairo is a system library, but it does, and I can't figure out why (the -I lines are from pkg-config so I can't easily fix them). The easiest solution seems to be to fix this in Cairo. The attached patch defines all undefined feature flags to 0. I tried to keep the semantics exactly the same, and as similar as possible to the original output, so if that's not necessarily I could simply if it more: * The current version has lines like this: /*#undef CAIRO_HAS_WGL_FUNCTIONS */ I assume this so users can `#define CAIRO_HAS_WGL_FUNCTIONS 1` and override the default. To have the same semantics, I wrapped by definitions in `#ifndef` checks. * There's a fairly complex `for` loop to keep the disabled features list sorted (since sorting the entire output would put the #defines first, then the #endifs, then the #ifndefs..).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/103.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.