summaryrefslogtreecommitdiffstats
path: root/libc/unistd/getpass.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 20:10:56 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 20:10:56 +0000
commitbd26ecdcebac54521f8e0e9fd0074db25d97ccfd (patch)
tree9435aaad0512b4512493246455a446692e44c1c2 /libc/unistd/getpass.c
parentbfcbb4284e479504186ededfafd0560da143c0b9 (diff)
downloaduClibc-alpine-bd26ecdcebac54521f8e0e9fd0074db25d97ccfd.tar.bz2
uClibc-alpine-bd26ecdcebac54521f8e0e9fd0074db25d97ccfd.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/unistd/getpass.c')
-rw-r--r--libc/unistd/getpass.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index 834fba9d9..455838c62 100644
--- a/libc/unistd/getpass.c
+++ b/libc/unistd/getpass.c
@@ -16,21 +16,27 @@
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 <stdio.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <string.h>
-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)
+libc_hidden_proto(stdin)
+libc_hidden_proto(stderr)
/* 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 +96,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 +105,7 @@ getpass (prompt)
buf[nread - 1] = '\0';
if (tty_changed)
/* Write the newline that was not echoed. */
- __putc('\n', out);
+ putc('\n', out);
}
}