tdf#161412 - UI: fix warning in PDF password dialog didn't disappear
[LibreOffice.git] / external / cairo / pixman / pixman-wasm.patch
bloba04aa7ccca1beb6fdf1051bda698abaf28cc3008
1 --- a/pixman/pixman/pixman-x86.c
2 +++ b/pixman/pixman/pixman-x86.c
3 @@ -77,13 +77,20 @@
5 #else
7 -#define _PIXMAN_X86_64 \
8 - (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64))
9 +#if (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64))
10 +#define _PIXMAN_X86_64 1
11 +#else
12 +#define _PIXMAN_X86_64 0
13 +#endif
15 static pixman_bool_t
16 have_cpuid (void)
18 -#if _PIXMAN_X86_64 || defined (_MSC_VER)
19 +#if defined(__EMSCRIPTEN__)
21 + return FALSE;
23 +#elif _PIXMAN_X86_64 || defined (_MSC_VER)
25 return TRUE;
27 @@ -109,6 +109,8 @@
28 #endif
31 +#if !defined(__EMSCRIPTEN__)
33 static void
34 pixman_cpuid (uint32_t feature,
35 uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
36 @@ -156,10 +156,17 @@
37 #error Unknown compiler
38 #endif
41 +#endif // !__EMSCRIPTEN__
43 static cpu_features_t
44 detect_cpu_features (void)
46 +#if defined(__EMSCRIPTEN__)
48 + return X86_MMX | X86_MMX_EXTENSIONS | X86_SSE | X86_SSE2 | X86_SSSE3;
50 +#else
51 uint32_t a, b, c, d;
52 cpu_features_t features = 0;
54 @@ -202,6 +202,8 @@
57 return features;
59 +#endif // !__EMSCRIPTEN__
62 #endif
63 --- a/pixman/pixman/pixman-ssse3.c
64 +++ b/pixman/pixman/pixman-ssse3.c
65 @@ -28,7 +28,9 @@
66 #endif
68 #include <stdlib.h>
69 +#if !defined(__EMSCRIPTEN__)
70 #include <mmintrin.h>
71 +#endif
72 #include <xmmintrin.h>
73 #include <emmintrin.h>
74 #include <tmmintrin.h>
75 --- a/pixman/configure
76 +++ b/pixman/configure
77 @@ -14207,7 +14207,11 @@
78 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
79 #error "Need GCC >= 3.4 for MMX intrinsics"
80 #endif
81 +#if !defined(__EMSCRIPTEN__)
82 #include <mmintrin.h>
83 +#else
84 +#include <xmmintrin.h>
85 +#endif
86 #include <stdint.h>
88 /* Check support for block expressions */
89 @@ -14308,7 +14308,9 @@
90 # error "Need GCC >= 4.2 for SSE2 intrinsics on x86"
91 # endif
92 #endif
93 +#if !defined(__EMSCRIPTEN__)
94 #include <mmintrin.h>
95 +#endif
96 #include <xmmintrin.h>
97 #include <emmintrin.h>
98 int param;
99 @@ -14380,7 +14380,9 @@
100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
101 /* end confdefs.h. */
103 +#if !defined(__EMSCRIPTEN__)
104 #include <mmintrin.h>
105 +#endif
106 #include <xmmintrin.h>
107 #include <emmintrin.h>
108 #include <tmmintrin.h>