]> git.ipfire.org Git - thirdparty/glibc.git/commit
io: replace local_isatty() with a proper function __isatty_nostatus()
authorH. Peter Anvin (Intel) <hpa@zytor.com>
Thu, 12 Jun 2025 01:35:33 +0000 (18:35 -0700)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 17 Jun 2025 12:11:38 +0000 (09:11 -0300)
commitc4929eecf7104f266f546ec742ca38ceee0e99c5
tree8146dcc60b34449c7d95a4ca7b9c35c2b6e3d1ba
parentedf7328db204f243c1bfde90edb11f99c7a13e14
io: replace local_isatty() with a proper function __isatty_nostatus()

Replace local_isatty() inlined in libio with a proper function
__isatty_nostatus(). This allows simpler system-specific
implementations that don't need to touch errno at all.

Note: I left the prototype in include/unistd.h (the internal header
file.) It didn't much make sense to me to put it in a different header
(not-cancel.h), but perhaps someone can elucidate the need.

Add such an implementation for Linux, with a generic fallback.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/unistd.h
io/Makefile
io/isatty_nostatus.c [new file with mode: 0644]
libio/filedoalloc.c
sysdeps/unix/sysv/linux/isatty_nostatus.c [new file with mode: 0644]