diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2025-06-11 18:35:32 -0700 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-17 09:11:38 -0300 |
commit | edf7328db204f243c1bfde90edb11f99c7a13e14 (patch) | |
tree | 1fa56a5f642787fa589dcc89e4b7aa395f02106e /sysdeps/unix | |
parent | 11649794748f96f6f71446062b4c45c0285591b3 (diff) | |
download | glibc-edf7328db204f243c1bfde90edb11f99c7a13e14.zip glibc-edf7328db204f243c1bfde90edb11f99c7a13e14.tar.gz glibc-edf7328db204f243c1bfde90edb11f99c7a13e14.tar.bz2 |
termios: make __tcsetattr() the internal interface
There is a prototype for an internal __tcsetattr() function in
include/termios.h, but tcsetattr without __ were still declared as the
actual functions.
Make this match the comment and make __tcsetattr() an internal
interface. This will be required to version struct termios for Linux on
MIPS and SPARC.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/bsd/tcsetattr.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/tcsetattr.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/bsd/tcsetattr.c b/sysdeps/unix/bsd/tcsetattr.c index 38b5f71..8693d94 100644 --- a/sysdeps/unix/bsd/tcsetattr.c +++ b/sysdeps/unix/bsd/tcsetattr.c @@ -32,7 +32,7 @@ /* Set the state of FD to *TERMIOS_P. */ int -tcsetattr (int fd, int optional_actions, const struct termios *termios_p) +__tcsetattr (int fd, int optional_actions, const struct termios *termios_p) { struct termios myt; @@ -56,4 +56,6 @@ tcsetattr (int fd, int optional_actions, const struct termios *termios_p) return __ioctl (fd, TIOCSETAF, termios_p); } } -libc_hidden_def (tcsetattr) + +libc_hidden_def (__tcsetattr) +weak_alias (__tcsetattr, tcsetattr) diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c index 5a13ad8..49d9d24 100644 --- a/sysdeps/unix/sysv/linux/tcsetattr.c +++ b/sysdeps/unix/sysv/linux/tcsetattr.c @@ -77,5 +77,5 @@ __tcsetattr (int fd, int optional_actions, const struct termios *termios_p) return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); } +libc_hidden_def (__tcsetattr) weak_alias (__tcsetattr, tcsetattr) -libc_hidden_def (tcsetattr) |