1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-12 04:25:08 -05:00

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
This commit is contained in:
Orgad Shaneh 2015-05-06 02:33:57 -04:00 committed by Jay Satiro
parent 9fcc297ff3
commit 33058a1dc3

View File

@ -109,7 +109,11 @@ int Curl_parsenetrc(const char *host,
netrc_alloc = TRUE; netrc_alloc = TRUE;
} }
#ifdef __CYGWIN__
file = fopen(netrcfile, "rt");
#else
file = fopen(netrcfile, "r"); file = fopen(netrcfile, "r");
#endif
if(netrc_alloc) if(netrc_alloc)
free(netrcfile); free(netrcfile);
if(file) { if(file) {