gfx/cairo/win32-ffs-gcc.patch

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 diff --git a/gfx/cairo/cairo/src/cairo-compiler-private.h b/gfx/cairo/cairo/src/cairo-compiler-private.h
michael@0 2 index ffac9ce..9a05831 100644
michael@0 3 --- a/gfx/cairo/cairo/src/cairo-compiler-private.h
michael@0 4 +++ b/gfx/cairo/cairo/src/cairo-compiler-private.h
michael@0 5 @@ -229,16 +229,20 @@ ffs (int x)
michael@0 6
michael@0 7 if (_BitScanForward(&i, x) != 0)
michael@0 8 return i + 1;
michael@0 9
michael@0 10 return 0;
michael@0 11 }
michael@0 12 #endif
michael@0 13
michael@0 14 +#elif defined(__WIN32__) && defined(__GNUC__)
michael@0 15 +
michael@0 16 +#define ffs(x) __builtin_ffs(x)
michael@0 17 +
michael@0 18 #endif
michael@0 19
michael@0 20 #if defined(_MSC_VER) && defined(_M_IX86)
michael@0 21 /* When compiling with /Gy and /OPT:ICF identical functions will be folded in together.
michael@0 22 The CAIRO_ENSURE_UNIQUE macro ensures that a function is always unique and
michael@0 23 will never be folded into another one. Something like this might eventually
michael@0 24 be needed for GCC but it seems fine for now. */
michael@0 25 #define CAIRO_ENSURE_UNIQUE \

mercurial