]> git.pond.sub.org Git - empserver/blobdiff - src/client/getpass.c
client: Drop use of getpass()
[empserver] / src / client / getpass.c
index b04ec7e504cf66b6e3b81de123e162347bc8d46f..297b8417b0b604a69819a0705963f5773f553ee6 100644 (file)
 
 #include <config.h>
 
-#ifdef HAVE_GETPASS
-#include <unistd.h>
-#else
 #include <string.h>
 #ifdef _WIN32
 #include <windows.h>
 #else
 #include <termios.h>
 #endif
-#endif
 #include "misc.h"
 
-#ifndef HAVE_GETPASS
 static int
 set_echo_if_tty(int on)
 {
@@ -79,14 +74,10 @@ set_echo_if_tty(int on)
     return 1;
 #endif
 }
-#endif /* !HAVE_GETPASS */
 
 char *
 get_password(const char *prompt)
 {
-#ifdef HAVE_GETPASS
-    return getpass(prompt);
-#else
     static char buf[128];
     char *p;
     size_t len;
@@ -109,5 +100,4 @@ get_password(const char *prompt)
     if (p[len - 1] == '\n')
        p[len - 1] = 0;
     return p;
-#endif /* !HAVE_GETPASS */
 }