aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-04-04 17:44:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-04-04 17:44:24 +0000
commit00ad88408d3e4df9413cf9d9f0f9b2d6ce111687 (patch)
tree934ea6de23681643268149985847f2511b580817
parentd62d25bdb468e05384f7d81e0390db8a11fb6a84 (diff)
Marco G. Salvagno's OS/2 patch is applied
-rw-r--r--lib/url.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index e47f0568b..7152511f6 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1183,6 +1183,19 @@ static UrgError _urlget(struct UrlData *data)
kerberos_connect(data, name);
#endif
+#ifdef __EMX__
+ /* 20000330 mgs
+ * the check is quite a hack...
+ * we're calling _fsetmode to fix the problem with fwrite converting newline
+ * characters (you get mangled text files, and corrupted binary files when
+ * you download to stdout and redirect it to a file). */
+
+ if ((data->out)->_handle == NULL) {
+ fprintf(stderr, "_fsetmode\n");
+ _fsetmode(stdout, "b");
+ }
+#endif
+
if((data->conf&(CONF_FTP|CONF_PROXY)) == CONF_FTP) {
result = ftp(data, &bytecount, data->user, data->passwd, ppath);
if(result)