diff options
author | David Turner <david@freetype.org> | 2021-07-16 11:12:13 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-07-17 08:31:20 +0200 |
commit | 357b353c2a90a64df20f2531f6e4aacef9fb3e28 (patch) | |
tree | 761aae0baadb51ecde16ff95e4bf7e0c031a6331 | |
parent | 7bc0f48c274e2d1c7525ce5025351149b0803a91 (diff) | |
download | freetype2-357b353c2a90a64df20f2531f6e4aacef9fb3e28.tar.gz |
* src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined.
The code assumed that if `__SSE2__` is defined, then 64-bit integer
types are available. This is not the case apparently for certain
multilib compiler targets like 'x86_32.x86' used by Gentoo.
This patch fixes the issue by disabling the special code path when
64-bit integer types are not available.
Fixes #1071.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/smooth/ftgrays.c | 10 |
2 files changed, 24 insertions, 1 deletions
@@ -1,3 +1,16 @@ +2021-07-17 David Turner <david@freetype.org> + + * src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined. + + The code assumed that if `__SSE2__` is defined, then 64-bit integer + types are available. This is not the case apparently for certain + multilib compiler targets like 'x86_32.x86' used by Gentoo. + + This patch fixes the issue by disabling the special code path when + 64-bit integer types are not available. + + Fixes #1071. + 2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> [tests] Allow arbitrary build directories. @@ -10,7 +23,7 @@ * tests/meson.build: Updated. -2021-07-15 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> +2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> * tests/issue-1063/main.c (main): Fix uninitialized variable. diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index e5f36a054..86118fb36 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1018,6 +1018,16 @@ typedef ptrdiff_t FT_PtrDist; # define BEZIER_USE_DDA 0 #endif + /* + * For now, the code that depends on `BEZIER_USE_DDA` requires `FT_Int64` + * to be defined. If `FT_LONG64` is not defined, meaning there is no + * 64-bit type available, disable it to avoid compilation errors. See for + * example https://gitlab.freedesktop.org/freetype/freetype/-/issues/1071. + */ +#if !defined( FT_LONG64 ) +# undef BEZIER_USE_DDA +# define BEZIER_USE_DDA 0 +#endif #if BEZIER_USE_DDA |