summaryrefslogtreecommitdiff
path: root/lib/netrc.c
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2015-05-06 02:33:57 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-05-06 02:34:31 -0400
commit33058a1dc34cb0673fb79ba8d07c5553a5a4d62a (patch)
tree4fb089d8387871735703a11f77ffdad16bfc8380 /lib/netrc.c
parent9fcc297ff30a265c31747d440c5262ac3ffa0020 (diff)
downloadcurl-33058a1dc34cb0673fb79ba8d07c5553a5a4d62a.tar.gz
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
Diffstat (limited to 'lib/netrc.c')
-rw-r--r--lib/netrc.c4
1 files changed, 4 insertions, 0 deletions
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) {