Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 25 Apr 2003 22:44:34 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cat stories Message-ID: <20030426024434.GB16165@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20030426021119 DOT GA16026 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i On Fri, Apr 25, 2003 at 10:36:45PM -0400, Igor Pechtchanski wrote: >On Fri, 25 Apr 2003, Christopher Faylor wrote: > >> On Fri, Apr 25, 2003 at 08:50:23PM -0500, Matthew Smith wrote: >> >Right. How gnarly are the cygwin patches for the current sh-utils and >> >file-utils? If they're nothing major, I'll step up to bat for maintaining >> >coreutils. >> >> I made an attempt to get "cp foo /bin" working "correctly" so that foo.exe >> would be copied if there was no existing foo but I never got it quite right. >> I don't think my changes should be reincorporated although it would be nice >> to get this working. >> >> sh-utils should be patched so that test.exe uses the cygwin version of >> access() rather than the sh-utils version. >> >> Other than that, I think it should be standard. >> cgf > >Chris, > >Regarding the .exe appending issue, do you think it would make sense to >add a "stat_pure()" function to Cygwin (as suggested in >)? >That would make easier implementing things like: > > struct stat buf; > char name[8]="foo"; > if (stat_pure(name, &buf)) { > strcat(name,".exe"); > if (errno == ENOENT && !stat_pure(name, &buf)) { > ... > } > } > >which would be useful for both cp and, say, unzip... I don't see what this had to do with the cp issue. I wasn't saying that cp was hampered by stat's behavior. My changes to cp were trying to ensure that files with a .exe extension were copied appropriately even when a .exe extension was not specified. However to answer your question, no, I don't think adding non-POSIX functions to cygwin is the way to go. If you want to add cygwin-specific code, then just check for "foo." rather than "foo". cgf -- Please use the resources at cygwin.com rather than sending personal email. Special for spam email harvesters: send email to aaaspam AT sourceware DOT org and be permanently blocked from mailing lists at sources.redhat.com -- 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/