This is the mail archive of the cygwin@sources.redhat.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]

RE: [cgf: Re: rxvt SEGV (Win98, 1.1.5s/2000-10-08)]



>
>
> --- Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru> wrote:
> > > > HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
> > > >   (default) = `/cygdrive'
> > > >   cygdrive flags = 0x00000020
> > >
> > > I notice that your /cygdrive variable is set to process in text
> mode (DOS
> > > sytle) line endings.
> > >
> >
> > I have exactly the same after clean Cygwin reinstall (removing
> all registry
> > entries). So, it must be default.
> >
>

But that is consistent with user manual. Quoting:

===================================
a. If the file appears to reside on a file system that is mounted (i.e. if its
pathname starts with a directory displayed by mount), then the default is
specified by the mount flag. If the file is a symbolic link, the mode of the
target file system applies.

b. If the file appears to reside on a file system that is not mounted (as can
happen when the path contains a drive letter), the default is text.
===================================

Now it is clear where default for b. comes from.

> I was afraid of that.  If you choose UNIX style line endings from
> setup, setup
> should modify the registry entry for /cygdrive to be binary processing also.
>
> > >
> > > The problem is that if you process files in and out of your home
> > > directory they
> > > will have \r\n line endings while all of the other devices have \n line
> > > endings.  I assume from the fact that you have all mount points in
> > > binary mode
> > > that you really want to process all files in binary mode.  To change the
> > > /cygdrive pseudo mount point to binary mode do `mount -s -b
> > > --change-cygdrive-prefix /cygdrive'.
> > >
> >
> > But then _all_ io from DOS devices will be in binary mode? IMHO that may
> > cause
> > other problems.
> >
>
> What problems do you forsee?  Don't give me any fictious ones.
> I've processed
> with all binary mounts for a long time and haven't seen any
> problems.  I have
> seen problems posted to this list because of this scenario though.
>

I don't expect any problem for Cygwin. I do expect problems for Windows. What
happens if you try to edit (create) autoexec.bat with 'vi c:/autoexec.bat'? Or
hosts file? It will be created in Unix format - will Windows be happy with
this file?

This is yet another argument, why c:/ must not be mounted as cygwin root BTW.

I am very impressed by current design. It does the best to allow two worlds to
coexist.

> > Do you mean to say, that the default for text vs binary is set by this
> > option?
> >
>
> Yes, choosing UNIX sets binary mounts, choosing DOS sets text mounts.
>
> > Actually, I think, defaults are correct. This way you get binary IO on
> > explicit mounts (when you now, that all files are in Unix format)
> and text IO
> > everywhere else.
> >
>
> We disagree.  I have concrete reasons for setting /cygdrive to
> binary mode as
> can be exampled from the archives.  The surprise factor alone is a
> good reason
> if your expecting to be processing in binary mode as Jonathan appeared to be
> from his environment.
>

Of course you have to be careful to not mix your environments. If you scatter
your Unix tools and files around, you are asking for troubles. So far I had no
problems by using binary mounts only when I was sure that every file is in
Unix format and using default everywhere else.

Thank you for useful information once again.

-andrej


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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