delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/10/11:25:22

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <BLU0-SMTP97B6AD85F5813BE73A584ACED20@phx.gbl>
References: <BLU0-SMTP193F74A0A7FC396B8160663CED30 AT phx DOT gbl> <20120709154456 DOT GA6696 AT ednor DOT casa DOT cgf DOT cx> <BLU0-SMTP224D901B80815ECFB99E3BCED30 AT phx DOT gbl> <1BBEF94B6B46E54980290D150A6F2EDD20C950F5 AT SN2PRD0610MB396 DOT namprd06 DOT prod DOT outlook DOT com> <BLU0-SMTP97B6AD85F5813BE73A584ACED20 AT phx DOT gbl>
Date: Tue, 10 Jul 2012 11:24:54 -0400
Message-ID: <CA+sc5mmri4CSe19uaGig_uwzWruOVzpDmm-xDuYsUapph_Ji4w@mail.gmail.com>
Subject: Re: Inconsistence on file operation when the name already exists with exe extension
From: Earnie Boyd <earnie AT users DOT sourceforge DOT net>
To: notstop AT users DOT sourceforge DOT net, cygwin AT cygwin DOT com
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

On Tue, Jul 10, 2012 at 4:34 AM, Aaron Schneider
<notstop AT users DOT sourceforge DOT net> wrote:
> You're right that cygwin shell tries to emulate bash, I just twisted things.
>

You're still wrong.  Cygwin is a POSIX library for Windows.  Bash is a
shell capable of being built with that POSIX library for use on
Windows but it isn't an emulation of Bash, it *is* Bash.  Other shells
available on *nix is also available for Cygwin.

> The problem is that in unix executables don't have extension but they actually do in cygwin so I think that's the root of the problem.
>

They don't need one in Cygwin either; as a matter of fact it was an
addition to binutils in the second generation of Cygwin that added the
.exe to the executable because it was more natural for Windows and
Windows at the time wouldn't execute the binary without the .exe
extension.

> Probably compiling binaries under cygwin without the exe extension, like unix, is not an alternative, or is it? Cygwin may detect if it is executable checking if it's PE format; if it is perl script.  Just check if file is present in path or run. /file

False.  It is wholly possible, you just have to pass the correct flags
to the linker process.  Current windows versions since at least XP and
maybe before would run files that did not contain a .exe extension.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019