diff options
author | Bernd Schmidt <bernds_cb1@t-online.de> | 2008-06-12 10:14:14 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds_cb1@t-online.de> | 2008-06-12 10:14:14 +0000 |
commit | 74d1d18f6bc7140f9bc5568b939870d8ec89b9ad (patch) | |
tree | a94a10518984ec82670a5795f82356d13b4b2516 /libc/unistd | |
parent | 436626859f21639f8f57e5044f8d269457a45adc (diff) |
Revert revision 19345 plus libc_hidden_proto for __uc_malloc.
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/getpass.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c index 08bf23636..f17a1d71d 100644 --- a/libc/unistd/getpass.c +++ b/libc/unistd/getpass.c @@ -20,7 +20,7 @@ #include <string.h> #include <termios.h> #include <unistd.h> -#include <malloc.h> +#include <string.h> #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K) @@ -37,7 +37,6 @@ libc_hidden_proto(fputs) libc_hidden_proto(fputc) libc_hidden_proto(putc) libc_hidden_proto(__fputc_unlocked) -libc_hidden_proto(__uc_malloc) /* 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 @@ -51,16 +50,12 @@ libc_hidden_proto(__uc_malloc) char * getpass (const char *prompt) { - static char *buf; - FILE *in, *out; struct termios s, t; int tty_changed; + static char buf[PWD_BUFFER_SIZE]; int nread; - free(buf); - buf = __uc_malloc(PWD_BUFFER_SIZE); - /* Try to write to and read from the terminal if we can. If we can't open the terminal, use stderr and stdin. */ |