mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
autoconf-2.73 has started to automagically add C23 to AC_PROG_CC, which broke a previous workaround for the build system passing CFLAGS to the C++ compiler. Undo that fix and inject -std=gnu17/gnu++17 into econf and explicitly also into emake. This fixes both the problem of autoconf rewriting CC and the CFLAGS/C++ confusion. While here move to EAPI-9, add a fix for a reported pillow test failure due to slight image distortion, a fix for gcc-14 also affected by autoconf-2.73, and additional stdint.h sprinkles which for some reason are now necessary. There is a remaining issue that autoconf-2.73 helpfully adds -std=c++17 despite the fact that we pass in -std=gnu++17, but this seems benign. Closes: https://bugs.gentoo.org/964040 Closes: https://bugs.gentoo.org/971915 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/495 Merges: https://codeberg.org/gentoo/gentoo/pulls/495 Signed-off-by: Sam James <sam@gentoo.org>
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=795c4a6db646
|
|
Bug: https://bugs.gentoo.org/964040
|
|
|
|
From: Chris Liddell <chris.liddell@artifex.com>
|
|
Date: Wed, 26 Nov 2025 15:31:57 +0000
|
|
Subject: Bug 708608: Fix confusion caused by modern C having a boolean type
|
|
|
|
Because C99 and later have a proper, built-in boolean type, rather than a
|
|
typedef of an underlying integer type, the check for whether we're rendering
|
|
an image into a pattern accumulator was yielding an unexpected result.
|
|
|
|
The default dev_spec_op method returns an "undefined" error when queried with the
|
|
gxdso_in_pattern_accumulator op, that is, a negative integer. When "bool" was
|
|
simply a typdefed integer value, that was fine, and the following lines
|
|
checked for and handled that.
|
|
|
|
With an actual boolean type, false == 0, and true == !false, so any value other
|
|
than 0 became true.
|
|
|
|
That then changed the decision on whether to gridfit images, meaning the user
|
|
space to device space rounding was handled differently. That then caused a
|
|
scanline of the image to be repeated.
|
|
|
|
The value is now assigned based on a conditional, so it correctly assigns a
|
|
true/false value.
|
|
---
|
|
base/gxipixel.c | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
diff --git a/base/gxipixel.c b/base/gxipixel.c
|
|
index 768a93114..cb3ff36a6 100644
|
|
--- a/base/gxipixel.c
|
|
+++ b/base/gxipixel.c
|
|
@@ -319,9 +319,7 @@ gx_image_enum_begin(gx_device * dev, const gs_gstate * pgs,
|
|
*/
|
|
|
|
/* Ask the device if we are in a pattern accumulator */
|
|
- in_pattern_accumulator = (dev_proc(dev, dev_spec_op)(dev, gxdso_in_pattern_accumulator, NULL, 0));
|
|
- if (in_pattern_accumulator < 0)
|
|
- in_pattern_accumulator = 0;
|
|
+ in_pattern_accumulator = ((dev_proc(dev, dev_spec_op)(dev, gxdso_in_pattern_accumulator, NULL, 0)) > 0);
|
|
|
|
/* Figure out if we are orthogonal */
|
|
if (mat.xy == 0 && mat.yx == 0)
|