From: Daniel Stenberg Date: Tue, 20 Aug 2019 11:22:15 +0000 (+0200) Subject: cleanup: remove DOT_CHAR completely X-Git-Tag: curl-7_66_0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e59540139a398dc70fde6aec487b19c5085105af;p=thirdparty%2Fcurl.git cleanup: remove DOT_CHAR completely Follow-up to f9c7ba9096ec The use of DOT_CHAR for ".ssh" was probably a mistake and is removed now. Pointed-out-by: Gisle Vanem Bug: https://github.com/curl/curl/pull/4230#issuecomment-522960638 Closes #4247 --- diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 2b3f9f2fda..13af8cdec9 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -486,7 +486,6 @@ #ifdef WIN32 # define DIR_CHAR "\\" -# define DOT_CHAR "_" #else /* WIN32 */ @@ -512,14 +511,6 @@ # endif # define DIR_CHAR "/" -# ifndef DOT_CHAR -# define DOT_CHAR "." -# endif - -# ifdef MSDOS -# undef DOT_CHAR -# define DOT_CHAR "_" -# endif # ifndef fileno /* sunos 4 have this as a macro! */ int fileno(FILE *stream); diff --git a/lib/url.c b/lib/url.c index 30263258f8..437b5d85ca 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2860,8 +2860,7 @@ static CURLcode override_login(struct Curl_easy *data, &netrc_user_changed, &netrc_passwd_changed, data->set.str[STRING_NETRC_FILE]); if(ret > 0) { - infof(data, "Couldn't find host %s in the " - DOT_CHAR "netrc file; using defaults\n", + infof(data, "Couldn't find host %s in the .netrc file; using defaults\n", conn->host.name); } else if(ret < 0) { diff --git a/src/tool_operate.c b/src/tool_operate.c index c9189bdeee..87d3ab89cc 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1487,7 +1487,7 @@ static CURLcode create_transfers(struct GlobalConfig *global, result = CURLE_OUT_OF_MEMORY; home = homedir(); if(home) { - file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR); + file = aprintf("%s/.ssh/known_hosts", home); if(file) { /* new in curl 7.19.6 */ result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);