Bug 882173 - Build pixman with TLS support. r=jrmuizel

This commit is contained in:
Joe Drew 2013-06-12 16:05:39 -04:00
Родитель e9fa241008
Коммит 3e25d39d17
3 изменённых файлов: 37 добавлений и 2 удалений

Просмотреть файл

@ -17,7 +17,13 @@ ifeq ($(OS_TARGET),Android)
MODULE_OPTIMIZE_FLAGS = -O2
endif
DEFINES += -DPIXMAN_NO_TLS
ifdef MOZ_USE_PTHREADS
DEFINES += -DHAVE_PTHREAD_SETSPECIFIC
endif
ifdef _MSC_VER
DEFINES += -DPIXMAN_USE_XP_DLL_TLS_WORKAROUND
endif
# Build MMX code either with VC or with gcc-on-x86
ifdef _MSC_VER

Просмотреть файл

@ -119,10 +119,12 @@
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
#elif defined(__MINGW32__)
#elif defined(__MINGW32__) || defined(PIXMAN_USE_XP_DLL_TLS_WORKAROUND)
# define _NO_W32_PSEUDO_MODIFIERS
# include <windows.h>
#undef IN
#undef OUT
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
static volatile int tls_ ## name ## _initialized = 0; \

Просмотреть файл

@ -0,0 +1,27 @@
diff --git a/gfx/cairo/libpixman/src/pixman-compiler.h b/gfx/cairo/libpixman/src/pixman-compiler.h
--- a/gfx/cairo/libpixman/src/pixman-compiler.h
+++ b/gfx/cairo/libpixman/src/pixman-compiler.h
@@ -114,20 +114,22 @@
#elif defined(TLS)
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
static TLS type name
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
-#elif defined(__MINGW32__)
+#elif defined(__MINGW32__) || defined(PIXMAN_USE_XP_DLL_TLS_WORKAROUND)
# define _NO_W32_PSEUDO_MODIFIERS
# include <windows.h>
+#undef IN
+#undef OUT
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
static volatile int tls_ ## name ## _initialized = 0; \
static void *tls_ ## name ## _mutex = NULL; \
static unsigned tls_ ## name ## _index; \
\
static type * \
tls_ ## name ## _alloc (void) \