[cairo-bugs] [Bug 30277] New: Compilation failure due to ffs() when compiling for MinGW

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 20 04:49:08 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30277

           Summary: Compilation failure due to ffs() when compiling for
                    MinGW
           Product: cairo
           Version: 1.10.0
          Platform: Other
        OS/Version: Windows (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: cazfi74 at gmail.com
         QAContact: cairo-bugs at cairographics.org


When compiling cairo for MinGW target, compilation fails with following error:
cairo.c:248: error: implicit declaration of function 'ffs'

This is because MinGW has no ffs().
Googling proved that other projects have resolved this by using gcc builtin
ffs(), with code like:

#ifdef __MINGW32__
#define ffs __builtin_ffs
#endif

Adding that code to cairo.c indeed fixed compilation for me.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list