From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/unistd/getpass.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'libc/unistd/getpass.c') diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c index 834fba9d9..5833bc317 100644 --- a/libc/unistd/getpass.c +++ b/libc/unistd/getpass.c @@ -16,21 +16,25 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define setvbuf __setvbuf -#define tcsetattr __tcsetattr -#define tcgetattr __tcgetattr -#define fileno __fileno -#define fflush __fflush -#define fgets __fgets -#define fputs __fputs - #include #include #include #include #include -extern int __putc(int c, FILE *stream) attribute_hidden; +libc_hidden_proto(strlen) +libc_hidden_proto(tcsetattr) +libc_hidden_proto(tcgetattr) +libc_hidden_proto(setvbuf) +libc_hidden_proto(fopen) +libc_hidden_proto(fclose) +libc_hidden_proto(fileno) +libc_hidden_proto(fflush) +libc_hidden_proto(fgets) +libc_hidden_proto(fputs) +libc_hidden_proto(fputc) +libc_hidden_proto(putc) +libc_hidden_proto(__fputc_unlocked) /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is @@ -90,7 +94,7 @@ getpass (prompt) fgets (buf, PWD_BUFFER_SIZE-1, in); if (buf != NULL) { - nread = __strlen(buf); + nread = strlen(buf); if (nread < 0) buf[0] = '\0'; else if (buf[nread - 1] == '\n') @@ -99,7 +103,7 @@ getpass (prompt) buf[nread - 1] = '\0'; if (tty_changed) /* Write the newline that was not echoed. */ - __putc('\n', out); + putc('\n', out); } } -- cgit v1.2.3