gfx/cairo/win32-ffs-gcc.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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