From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9429 invoked by alias); 18 Jan 2009 22:12:08 -0000 Received: (qmail 9421 invoked by uid 22791); 18 Jan 2009 22:12:07 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f11.google.com (HELO mail-ew0-f11.google.com) (209.85.219.11) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 18 Jan 2009 22:11:59 +0000 Received: by ewy4 with SMTP id 4so718000ewy.2 for ; Sun, 18 Jan 2009 14:11:56 -0800 (PST) Received: by 10.210.58.13 with SMTP id g13mr2200349eba.187.1232316715721; Sun, 18 Jan 2009 14:11:55 -0800 (PST) Received: from ?192.168.1.2? (82-171-113-142.ip.telfort.nl [82.171.113.142]) by mx.google.com with ESMTPS id b36sm8627482ika.19.2009.01.18.14.11.54 (version=SSLv3 cipher=RC4-MD5); Sun, 18 Jan 2009 14:11:54 -0800 (PST) Message-ID: <4973A927.1010003@dazjorz.com> Date: Sun, 18 Jan 2009 22:22:00 -0000 From: Sjors Gielen User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: "Yaakov (Cygwin/X)" , dave.korn.cygwin@googlemail.com CC: cygwin@cygwin.com, Ed Schouten Subject: Re: GNU coreutils does not work on Cygwin because of freopen() ? References: <49738867.702@dazjorz.com> <49739D07.7020507@cygwin.com> <49739E38.5080305@dazjorz.com> <4973A2B1.9060601@users.sourceforge.net> In-Reply-To: <4973A2B1.9060601@users.sourceforge.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-01/txt/msg00555.txt.bz2 Yaakov (Cygwin/X) wrote: > Sjors Gielen wrote: >> Did you try with Cygwin coreutils or GNU coreutils? :) > > Cygwin's coreutils *is* GNU coreutils, with some patches which you will > find necessary. > [snip] Dave Korn wrote: > However, you may have to recreate all the cygwin-specific patches > that the > cygwin bash maintainer hasn't managed to send upstream yet... [snip] > ?? Are you using an old version?? It should be fixed by now. > > http://www.mail-archive.com/bug-coreutils@gnu.org/msg10188.html Oooh. Can I get a list of patches the Cygwin project has already applied to packages? :) So this bug was fixed in Cygwin's version of GNU coreutils, but not in Debian's version of GNU coreutils. Has a patch for that been sent upstream? I took GNU coreutils from Debian sid, which should be almost as up to date as it gets... > Dunno if your project makes sense. You'll have to end up porting > everything where the differences in the underlying OS show through... > which is > basically what Cygwin package maintainers have already done for most > of this > stuff. Do you mean you're trying to cross-compile Debian on Cygwin, > or do you > actually want to build the whole Debian distro under Cygwin to run on > Windows > rather than natively under a linux kernel? I'm trying to create a full Cygwin port for Debian. This means the base system packages, et cetera. Let's just keep it at I love apt and dpkg for package managers. > Nope. Cygwin runs on windows, which uses CR-LF for line endings, > but > Cygwin is POSIX-compliant and uses LF internally. This is exactly > what O_TEXT > was invented for: it translates LF->CRLF on write and CRLF->LF on > read. On > Linux platforms, the native format is LF line-ends, so O_TEXT and > O_BINARY are > the same, but not here. But if Cygwin uses LF internally, why does it translate to CRLF on write? I remember this installation option, asking if it should use CRLF or LF for writing files. I think I chose LF only, because that's the Unix way of doing it. Do I misunderstand here? Currently, when I write a file in vim and save it, it has LF line endings anyway. If it is saved with LF line endings, there's no difference between O_TEXT and O_BINARY, right? So why not skip this at all and make *every* fd O_BINARY by default? >> 2. I don't know why coreutils is calling freopen() at all. Should I >> patch it out completely, or add something like an #ifndef __CYGWIN__ >> around the pieces of code in question? > > Well, if you really want to build coreutils under cygwin, why not > use > setup.exe to install the corresponding source package, which comes > with all > these problems pre-solved for you? That would, of course, defeat the idea of bootstrapping Debian on Cygwin. ;) Sjors -- 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/