Summary: | Cairo won't build on Win32 because there is no ffs function | ||
---|---|---|---|
Product: | cairo | Reporter: | Neil Roberts <nroberts> |
Component: | win32 backend | Assignee: | cairo-bugs mailing list <cairo-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | 11285613 |
Version: | 1.10.1 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | win32: Add a workaround for missing ffs on MinGW |
Description
Neil Roberts
2010-10-18 10:30:59 UTC
Created attachment 39510 [details] [review] win32: Add a workaround for missing ffs on MinGW On Windows it seems that msvcrt does not define an ffs function. There is already a workaround for MSVC in cairo-compiler-private.h but this does not help when compiling with MinGW. This patch adds an extra check for when targetting Windows with GCC and makes it use __builtin_ffs. I'm not too familiar with Cygwin, but not sure if the condition should be only for GCC and Win32: #if defined(__GNUC__) && defined(__WIN32__) Might be better to check for MinGW specifically, and also do a check that we do not have a ffs() implementation: #if defined(__MINGW32__) && !defined(HAVE_FFS) |
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.