From 33058a1dc34cb0673fb79ba8d07c5553a5a4d62a Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 6 May 2015 02:33:57 -0400 Subject: [PATCH] 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 --- lib/netrc.c | 4 ++++ 1 file changed, 4 insertions(+) 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) {