From: Orgad Shaneh Date: Wed, 6 May 2015 06:33:57 +0000 (-0400) Subject: netrc: Read in text mode when cygwin X-Git-Tag: curl-7_43_0~177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33058a1dc34cb0673fb79ba8d07c5553a5a4d62a;p=curl netrc: Read in text mode when cygwin Use text mode when cygwin to eliminate trailing carriage returns. Bug: https://github.com/bagder/curl/pull/258 --- diff --git a/lib/netrc.c b/lib/netrc.c index e656cf7c6..97a07b88e 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -109,7 +109,11 @@ int Curl_parsenetrc(const char *host, netrc_alloc = TRUE; } +#ifdef __CYGWIN__ + file = fopen(netrcfile, "rt"); +#else file = fopen(netrcfile, "r"); +#endif if(netrc_alloc) free(netrcfile); if(file) {