www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
From: | aschwarz1309 AT att DOT net |
To: | cygwin AT cygwin DOT com, peter AT wyrmberg DOT co DOT uk |
Subject: | Re: TEXT mode, BINARY mode default file opening |
Date: | Mon, 24 Jan 2005 12:29:32 +0000 |
Message-Id: | <012420051229.15359.41F4EA2C0002C88A00003BFF2160466648C7CFCCCE969D0E99080C9C0E@att.net> |
X-Authenticated-Sender: | YXNjaHdhcnoxMzA5QGF0dC5uZXQ= |
Pete James wrote: Hello, I am new to the list a have only been using CYGWIN for a few months. I would like to use the GNU compiler as a cross compiler for a Windoze machine and I am having problems with the files being opened in BINARY mode, I think. Unfortunately I can't change all the files to remove the extra carriage returns or line feeds as the files are used by other programs. So I think my options are: > I never have any problems with any files, regardless which mode these > files are. GCC doesn't care if you use \r\n or \n as line ending. > Gerrit 1: Carriage returns (\r) and line feeds (\n) are treated as white space by GCC. They are ignored and should cause no problem. 2: You should NOT mount your drives in Text Mode. Input files will be scanned for \r\n and converted for text and binary (at least that was the 'old' behavior). 3: You can remove \r\n from all or any of your files. In bash-ese for i in *.c *.cc *.h ; do u2d $i done 4: I don't understand your reference to a cross-compiler for Windows. The native Cygwin compiler is for Windows. The Mingw compiler is also generates Windows code but it doesn't use Cygwin.dll. Look at 'gcc.gnu.org'. 5: You can recompile GCC but it shouldn't have any effect on your stated problem with \r\n. I think you need to look elsewhere. art -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |