1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

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>
This commit is contained in:
H. Peter Anvin (Intel)
2025-06-11 18:35:32 -07:00
committed by Adhemerval Zanella
parent 1164979474
commit edf7328db2
6 changed files with 12 additions and 9 deletions

View File

@@ -83,7 +83,7 @@ getpass (const char *prompt)
s = t;
/* Tricky, tricky. */
t.c_lflag &= ~(ECHO|ISIG);
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
tty_changed = (__tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
}
else
tty_changed = 0;
@@ -110,7 +110,7 @@ getpass (const char *prompt)
/* Restore the original setting. */
if (tty_changed)
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
(void) __tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
funlockfile (out);