fopen_excl on Win32

Gisle Vanem <[email protected]>
Newsgroups gmane.comp.web.wget.patches
Message-ID <[email protected]>
The use of this function is wrong on Win32/DOS where
ASCII vs binary matters a great deal. Patch:

--- http.c.orig      Mon Apr 11 13:15:45 2005
+++ http.c      Tue Apr 12 17:45:05 2005
@@ -1803,7 +1803,7 @@
        fp = fopen (*hs->local_file, "wb");
       else
        {
-         fp = fopen_excl (*hs->local_file, 0);
+         fp = fopen_excl (*hs->local_file, 1);
          if (!fp && errno == EEXIST)
            {
              /* We cannot just invent a new name and use it (which is

--- ftp.c.orig  Fri Apr 01 23:41:04 2005
+++ ftp.c       Tue Apr 12 17:45:53 2005
@@ -982,7 +982,7 @@
        fp = fopen (con->target, "wb");
       else
        {
-         fp = fopen_excl (con->target, 0);
+         fp = fopen_excl (con->target, 1);
          if (!fp && errno == EEXIST)
            {
              /* We cannot just invent a new name and use it (which is

------------------------

--gv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.