delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/14/07:48:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <4.2.0.58.20020214133209.019b68a8@ics.u-strasbg.fr>
X-Sender: muller AT ics DOT u-strasbg DOT fr
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Thu, 14 Feb 2002 13:46:16 +0100
To: cygwin AT cygwin DOT com
From: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
Subject: [BUG] Patch.exe problem report
Mime-Version: 1.0
Note-from-DJ: This may be spam


I already mentioned the following bug some time ago,
but I now took the time to identify the problem.


   The problem appears if you are using patch to
apply a patch on a binary mounted device 
while your patch uses a temporary directory that is located on 
a text mounted dir.

The temprary file is that created as
/temp/dir/  poXXXXX
where the XXX are replaced by a number.
But the file is opened without O_BINARY flag.

After the patch is applied, the patch code tries to move the file,
which fails with EXDEV err, which seems OK as they are on different partition,
but after that the use copy_file function,
which does copy the file using O_BINARY file.

   This results in a unix mode source file on which you apply 
a unix mode patch, will be written as text in the temporary directory, and thus
in Dos mode with CR/LF, and finally copied back to the binary mounted
dir.

   I hope that my explanation of the problem is clear enough.

It seems to be a consequence of the apparently innocent assumption
that on a given OS, a copy of a text file from one dir to another dir can be done
using O_BINARY. But this assumption is false for cygwin.

I didn't really find a good solution to this problem yet...




Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller AT ics DOT u-strasbg DOT fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019