X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=OwMliNs8DnVE0+cRDUdpvTyeIQd/1vGDuKxe8IGuKxWZvLgr/SlUU /kChMGGgn7EpsgMWhRl7kBVxY2BDkca90CWftSM6ZUa0evFsdfkG+NAmzFB8qNQZ 3pAXkNApTHGEE1SDfI6Y0m3e29b2qx3/8xM+Wu6vgDdvfM4WeFUTKU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=X4T7NjbhkozophunIHKwFFnCVNs=; b=WIM1TJKOLDSDkmt012K7TbuGTddB uTmhzr9jheOlrk/o5hZiN50uv1jqmGy/tQfaRdHxrU5AQlrLprMzAw0VZj/hj8S7 0JHXvPv1HT4pj1cLzS+y7m0SlfIQzF3KQZavy4IQRsglohWn3HPBXK2ZJ+26URC5 OsmnYQpnrmIfgYA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-94.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=Were, Hx-languages-length:1373, H*i:sk:EGf-Gu3, H*MI:sk:EGf-Gu3 X-HELO: calimero.vinschen.de Date: Mon, 8 Aug 2016 16:00:17 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN Message-ID: <20160808140017.GQ25811@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <001001d1edf1$a4e1ae90$eea50bb0$@rogers.com> <1C0AE95E-0118-4353-AA77-4D41F1AE9AE1 AT solidrocksystems DOT com> <001a01d1eea9$f7949a90$e6bdcfb0$@rogers.com> <76ec05e9-140a-19cb-942b-698582c3d024 AT gmail DOT com> <001f01d1ef2c$f04af9e0$d0e0eda0$@rogers.com> <20160805152951 DOT GO25811 AT calimero DOT vinschen DOT de> <57A6ED1C DOT 1060402 AT gmx DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+W7ryvxEk4RRyt+P" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) --+W7ryvxEk4RRyt+P Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 8 09:52, Erik Soderquist wrote: > On Sun, Aug 7, 2016 at 4:11 AM, Herbert Stocker wrote: > >> > >> code required to handle .exe and .lnk extensions you don't *want* > >> PATHEXT support anymore. > >> > > > > Moreso, this code has recently broken my C++ code in Cygwin. > > It tried to see if a directory /dir/subdir/something existed, > > and Cygwin said yes because it found a /dir/subdir/something.exe . > > So my program failed. >=20 > Were you testing for the existence of a *directory* ( > /dir/subdir/something/. ) or for anything named *something* in > /dir/subdir/ ? >=20 > And what call were you using? It was my understanding that the foo =3D= =3D > foo.exe =3D=3D foo.lnk =3D=3D foo.exe.lnk was only applied when attemptin= g to > execute something... (is my understanding wrong?) Yes. It's also applied when stat'ing si or access'ing something. The same rules apply. Consider: if (access ("foo", X_OK) =3D=3D 0) execve ("foo", ...); else error ("foo not executable"); Consider that every call of the application has some reason Cygwin just can NOT double guess. If you skip the .exe/.lnk tests, you're\ basically doomed in one scenario or the other. Been there, done that, no joy. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --+W7ryvxEk4RRyt+P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXqJBxAAoJEPU2Bp2uRE+ggvQQAJS/vEbMNA4rI9mZg9uxVAd0 nCXrnjSrg+2ORWAXoI88Tcx0A2ScZZfxrIRDBbHZABOBzCP7YpGW5nnuw/5bNK0u +L4pC6ES4uulZsGd7rWAESSzvHDwlgkbwrbNXAIwXD09pF367qd45tYE/aKLwYDJ /a0cHwe+Roq+UmSnOk9QodYCOmQXLIeIjMujrCDyypmZ+/pB0OSma1eTZOaVc3vf KVTsHi5GovsnsX9NedpDNCmQeG888sJ1gHsMNo7Lkm8kiQHhtxKn2sAf3bjtvcKx dS/DBLtY4j2EB8kIW2rYWHbU+I15pFIBPF8rmELU4UMxw01Yj0ZJMkAIX4Rpu0B2 yW4BI0OcjREZvoQb6RowVf023wZdkHn+dHCbjqw5Jm/ASFS6h7w2lIj2kKT4s8px h6L4ccyK4OzzyYSqqohq/0i1Y8mtQHqIJA3SvuiRwdd3D0DNnGjMZ/aCpA9YAAin vgxviFiZ7Wu1kP6ylh2OhlDA5pmaVZ/LfVWKuj0hICtn/yVhDVtd6nbnHRBMC8OL Bja1w8dQeiRtqqB5v2C9xytADHCbgwhh2Oohw7Lo02bBwf7bf+dyx8N9XnAVgS7S Puil0sHtfSEftvEwlHb3QjYqTXEe8GFn66jO//1IIrgBwmxVwuCALYpWSRAIdILN IWAHvgQvhKFXMuiO4579 =aiZz -----END PGP SIGNATURE----- --+W7ryvxEk4RRyt+P--