Skip to content

Commit

Permalink
netrc: Read in text mode when cygwin
Browse files Browse the repository at this point in the history
Use text mode when cygwin to eliminate trailing carriage returns.

Bug: curl#258
  • Loading branch information
orgads authored and jgsogo committed Oct 19, 2015
1 parent d599ea3 commit 2b48ab4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/netrc.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 2b48ab4

Please sign in to comment.