diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 23:18:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 23:18:50 +0000 |
commit | 56548f9a13b9438ca2be3760f486f5441f679057 (patch) | |
tree | ec868352a222ba2ce9b42d53d0b51194db044605 /lib | |
parent | 36000e52876cddac768cd0447980b1aa88c77ee6 (diff) | |
download | curl-56548f9a13b9438ca2be3760f486f5441f679057.tar.gz |
getpass_r() is the new getpass name for thread-safe getpass!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getpass.c | 6 | ||||
-rw-r--r-- | lib/getpass.h | 2 | ||||
-rw-r--r-- | lib/url.c | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/getpass.c b/lib/getpass.c index d18f6d79f..245782027 100644 --- a/lib/getpass.c +++ b/lib/getpass.c @@ -5,7 +5,7 @@ * * 1) This header remain in tact. * 2) The prototype for getpass is not changed from: - * char *getpass(const char *prompt) + * int getpass_r(const char *prompt, char *buffer, int buflen) * 3) This source code is not used outside of this(getpass.c) file. * 3) Any changes to this(getpass.c) source code are made publicly available. * @@ -68,7 +68,7 @@ # define perror(x) fprintf(stderr, "Error in: %s\n", x) #endif -int my_getpass(void *client, const char *prompt, char *buffer, int buflen) +int getpass_r(const char *prompt, char *buffer, int buflen) { FILE *infp; FILE *outfp; @@ -181,7 +181,7 @@ int my_getpass(void *client, const char *prompt, char *buffer, int buflen) #else /* WIN32 */ #include <stdio.h> #include <conio.h> -int my_getpass(void *client, const char *prompt, char *buffer, int buflen) +int getpass_r(const char *prompt, char *buffer, int buflen) { int i; printf("%s", prompt); diff --git a/lib/getpass.h b/lib/getpass.h index 1248030ee..2f63e6db0 100644 --- a/lib/getpass.h +++ b/lib/getpass.h @@ -3,6 +3,6 @@ /* * Returning non-zero will abort the continued operation! */ -int my_getpass(void *client, char *prompt, char* buffer, int buflen ); +int getpass_r(char *prompt, char* buffer, int buflen ); #endif @@ -264,6 +264,12 @@ CURLcode curl_close(CURL *curl) return CURLE_OK; } +int my_getpass(void *clientp, char *prompt, char* buffer, int buflen ) +{ + return getpass_r(prompt, buffer, buflen); +} + + CURLcode curl_open(CURL **curl, char *url) { /* We don't yet support specifying the URL at this point */ |