gfx/cairo/win32-ffs-gcc.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/cairo/win32-ffs-gcc.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +diff --git a/gfx/cairo/cairo/src/cairo-compiler-private.h b/gfx/cairo/cairo/src/cairo-compiler-private.h
     1.5 +index ffac9ce..9a05831 100644
     1.6 +--- a/gfx/cairo/cairo/src/cairo-compiler-private.h
     1.7 ++++ b/gfx/cairo/cairo/src/cairo-compiler-private.h
     1.8 +@@ -229,16 +229,20 @@ ffs (int x)
     1.9 + 
    1.10 +     if (_BitScanForward(&i, x) != 0)
    1.11 + 	return i + 1;
    1.12 + 
    1.13 +     return 0;
    1.14 + }
    1.15 + #endif
    1.16 + 
    1.17 ++#elif defined(__WIN32__) && defined(__GNUC__)
    1.18 ++
    1.19 ++#define ffs(x) __builtin_ffs(x)
    1.20 ++
    1.21 + #endif
    1.22 + 
    1.23 + #if defined(_MSC_VER) && defined(_M_IX86)
    1.24 + /* When compiling with /Gy and /OPT:ICF identical functions will be folded in together.
    1.25 +    The CAIRO_ENSURE_UNIQUE macro ensures that a function is always unique and
    1.26 +    will never be folded into another one. Something like this might eventually
    1.27 +    be needed for GCC but it seems fine for now. */
    1.28 + #define CAIRO_ENSURE_UNIQUE                       \

mercurial