delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/19/04:07:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Date: Fri, 19 Dec 2008 10:05:31 +0100
From: Spiro Trikaliotis <an-cygwin AT spiro DOT trikaliotis DOT net>
To: cygwin AT cygwin DOT com
Message-ID: <20081219090531.GV14886@trikaliotis.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <877i5wlwc3 DOT fsf AT mcbain DOT luannocracy DOT com>
MIME-Version: 1.0
In-Reply-To: <877i5wlwc3.fsf@mcbain.luannocracy.com>
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
X-SA-Exim-Connect-IP: 87.163.218.237
X-SA-Exim-Mail-From: an-cygwin AT spiro DOT trikaliotis DOT net
Subject: Re: Rationale for line-ending recommendation?
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on mail.trikaliotis.net)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello David,

* On Thu, Dec 18, 2008 at 05:42:20PM -0900 David Abrahams wrote:
> 
> Can anyone explain why the installer began recommending using *nix line
> ending conventions?  DOS-compatible endings have always "just worked"
> for me and I've heard of lots of problems doing it the now-recommended
> way.

Personally, I also install it with CR/LF line endings.

However, I noticed one problem this way: xfonts. If you install xfonts
on cygwin with CR/LF line endings, the fonts end up corrupt, and you
cannot start X. I was bitten by this problems many times, whenever I
installed a fresh Cygwin.

To fix this, I use the following way: I mount /var/cache (which also has
/var/cache/fonts/) in binmode, and reinstall xfonts.

This is a long-running problem.

Another problem I once had, but which might have been fixed in the
meantime, was the gcc compiler for the Lego mindstorms: It did not
accept sources files with DOS line endings. Note, however, that this was
2000 or 2001, so it might have changed in the meantime.

Oh, and Subversion is problematic, too. Because the SVN developers
decided to handle line endings on their own using libapr, opening files
in binary mode and reading and writing CR, LF or CR/LF on their own, on
Cygwin, SVN is hard-coded to *nix line endings. This is not nice. Note
that this approach will also fail badly if you mount parts of your
system in textmode, and parts in binmode.

Because of this, I am using an SVN version which I compiled myself with
a patched libapr.


Other than that, I never had any problems with the CR/LF line endings.
However, the rationale might be that most problems are testing better
with LF line endings, as they come from the *nix world. Remember, on
*nix systems, the difference between opening a file in text- or in
binmode is practically non-existant. Thus, many programmers do not care
about the "right" mode.

Best regards,
   Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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