summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNiels Kristian Bech Jensen <nkbj1970@hotmail.com>2013-03-29 04:30:04 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-03-29 04:30:04 (GMT)
commite85061b94c5883041384512df66a8d08009a24a3 (patch)
treeec15e03f451352b31f255b40510e9d48af182d55 /src
parent0d92e2fe7edb7c37f862f2a34ee69e3c40cdd448 (diff)
downloadmxe-e85061b94c5883041384512df66a8d08009a24a3.zip
mxe-e85061b94c5883041384512df66a8d08009a24a3.tar.gz
mxe-e85061b94c5883041384512df66a8d08009a24a3.tar.bz2
package harfbuzz: define MemoryBarrier
Diffstat (limited to 'src')
-rw-r--r--src/harfbuzz-2-memory-barrier.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/harfbuzz-2-memory-barrier.patch b/src/harfbuzz-2-memory-barrier.patch
new file mode 100644
index 0000000..93f708a
--- /dev/null
+++ b/src/harfbuzz-2-memory-barrier.patch
@@ -0,0 +1,22 @@
+This file is part of MXE.
+See index.html for further information.
+
+Beware! This patch must be removed when winnt.h is updated to a version that
+includes the MemoryBarrier() macro.
+
+diff -ur harfbuzz-0.9.14.orig/src/hb-atomic-private.hh harfbuzz-0.9.14/src/hb-atomic-private.hh
+--- harfbuzz-0.9.14.orig/src/hb-atomic-private.hh 2013-03-19 12:04:53.000000000 +0100
++++ harfbuzz-0.9.14/src/hb-atomic-private.hh 2013-03-27 05:32:38.407335037 +0100
+@@ -44,6 +44,12 @@
+
+ #elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
+
++static inline void MemoryBarrier(void)
++{
++ long Barrier = 0;
++ __asm__ __volatile__ ("xchgl %%eax,%0 " : "=r" (Barrier));
++}
++
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+