summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2025-06-11 18:35:33 -0700
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-06-17 09:11:38 -0300
commitc4929eecf7104f266f546ec742ca38ceee0e99c5 (patch)
tree8146dcc60b34449c7d95a4ca7b9c35c2b6e3d1ba /include
parentedf7328db204f243c1bfde90edb11f99c7a13e14 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
index e241603b81..376ab5a936 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -152,6 +152,7 @@ libc_hidden_proto (__ttyname_r)
extern __pid_t _Fork (void);
libc_hidden_proto (_Fork);
extern int __isatty (int __fd) attribute_hidden;
+extern int __isatty_nostatus (int __fd) attribute_hidden;
extern int __link (const char *__from, const char *__to);
extern int __symlink (const char *__from, const char *__to);
extern int __symlinkat (const char *__from, int __fd, const char *__to);