On Sun, Nov 23, 2025 at 05:35:02PM +0100, Sven Joachim wrote:
> On 2025-11-23 16:48 +0100, Chris Hofstaedtler wrote:
> 
> > Control: retitle -1 ncurses: API/ABI break for tigetflag return value on 
> > unsigned char archs
> > Control: severity -1 serious
> >
> > * Chris Hofstaedtler <[email protected]> [251123 16:45]:
> >>I see patch 20251101 changed the definition of ABSENT_BOOLEAN from
> >>  ((signed char)-1) to
> >>  ((NCURSES_SBOOL)-1)

...fixing a compiler warning :-(

> >> While configure.in detects the possibility of using `signed char`
> >> for `NCURSES_SBOOL`, I think by default it uses `char` (without
> >> --enable-signed-char).

as I recall it, the signed char type wasn't well standardized ~ 20 years
ago, but that Debian needed it.  So it was optional.

> > I think this is an unintentional ABI break on unsigned-char archs, and
> > also all binaries which were compiled using 20251101 or newer need to
> > be recompiled(!).
> 
> I do not think it is that bad, because ABSENT_BOOLEAN is defined in
> tic.h which nobody uses.  There will likely be more runtime problems
> because of the incorrect tigetflag() return value for missing
> capabilities, though.

Actually it's used in lib_ti.c, and promoted to an int.
So it may/may not be sign-extended, which I assume is the bug.

I have an arm64 machine, which may show me the issue.

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to