This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch(1) (Win32) and path separators


On Tue, 19 Nov 2002, Parish wrote:

> On 19/11/2002 18:14 Larry Hall (RFK Partners, Inc) stood on a soap-box
> and preached to the unwashed masses:
>
> > At 01:10 PM 11/19/2002, Parish wrote:
> >>patch(1) on Win32 seems to insist on '\' rather than '/' in the paths in diffs. This is somewhat at odds with diff(1) which uses '/', even on Windows.
> >>
> >>According to the manpage there is no option to change this behaviour.
> >>
> >>I have d/l the sources but have yet to build it (am I correct that it needs gcc to build, i.e. won't build with MSVC++?) with the intention of making my own version that works with '/'.
> >>
> >>Can anyone confirm that there isn't an undocumented option (cmd line or build) to make it use '/'? If there isn't, why is it that the Windows version works this way, especially when diff(1) DTRT?
> >
> >
> > What patch are you using?  The Cygwin version works fine with '/'.  I have
> > to assume that since you mention the "Windows version" that your talking
>
> No, the one installed by the cygwin setup program:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{13}$ patch --version
> patch 2.5
> Copyright 1988 Larry Wall
> Copyright 1997 Free Software Foundation, Inc.
>
> This program comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute copies of this program
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> written by Larry Wall with lots o' patches by Paul Eggert
> marder-1:/cygdrive/e/mozilla_src/mozilla{14}$
>
> This is what happens when I run it:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{12}$ patch --dry-run <
> ../nsNativeAppSupportGtk.diff
> can't find file to patch at input line 8
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> |Index: xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> |===================================================================
> |RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsNativeAppSupportGtk.cpp,v
> |retrieving revision 1.9
> |diff -u -r1.9 nsNativeAppSupportGtk.cpp
> |--- xpfe/bootstrap/nsNativeAppSupportGtk.cpp   29 Aug 2002 03:04:36
> -00001.9
> |+++ xpfe/bootstrap/nsNativeAppSupportGtk.cpp   17 Nov 2002 22:06:07 -0000
> --------------------------
> File to patch:
>
> The file, nsNativeAppSupportGtk.cpp exists:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{14}$ ls -l
> xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> -rwx------    1 marko    None         3624 Nov 17 22:11
> xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> marder-1:/cygdrive/e/mozilla_src/mozilla{15}$
>
> > about a native port and not the patch that's available through Cygwin.
> > If that's a proper assumption, you don't have the right forum to discuss the
> > Windows native version of patch.  This list discusses Cygwin-related issues
> > only.
> >
> > Sorry,
> >
> > Larry Hall                              lhall@rfk.com

Try 'patch -p0 --dry-run < filename'.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]