diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-01-18 16:29:43 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2024-01-18 16:46:54 +0800 |
commit | 2e88f8d572dc5ae1d50819613a45c59a1c0fc405 (patch) | |
tree | c47fb588baa54d000f78fe962d6da7a6795e083a /chapter08/bison.xml | |
parent | 3626aa30487772be32d2b6ca591137ce88e9d616 (diff) |
ncurses: Don't create library aliases in an unsafe mannerxry111/ncurses-disallow-abi-mismatch
TL;DR DO NOT REVERT THIS COMMIT BECAUSE IT MAKES A BLFS PACKAGE FTBFS!
The ABI of libncurses and libncursesw (et al) are different so it's
unsafe to use libncursesw as a drop-in of libncurses. If an application
is built with -D_XOPEN_SOURCES={a number >= 500} or
-D_XOPEN_SOURCES_EXTENDED, it should use libncursesw; otherwise it
should use libncurses. Otherwise there will be an ABI mismatch and it
may cause segfault etc.
An exception: the terminfo (terminal capability database) support in
libncursesw and libncurses are the same. Thus the distros providing
both libncursesw and libncurses configure Ncurses --with-termlib so the
terminfo support will be a standalone libtinfo library, instead of being
duplicated in two ncurses libraries. Create a symlink so the packages
only using terminfo support from ncurses can find the libncursesw
library and use it.
If a BLFS package using libncurses FTBFS after this change, we need to
define -D_XOPEN_SOURCES=600 (as pkg-config --cflags ncursesw outputs),
before hacking it to use libncursesw instead.
Diffstat (limited to 'chapter08/bison.xml')
0 files changed, 0 insertions, 0 deletions