X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <50295185.7020908@dancol.org> Date: Mon, 13 Aug 2012 12:12:05 -0700 From: Daniel Colascione User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Side-by-side configuration is incorrect reported as permission denied References: <20120813185602 DOT GA22085 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20120813185602.GA22085@ednor.casa.cgf.cx> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC4011383DCFF71FC938CCD3F" X-IsSubscribed: yes 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 --------------enigC4011383DCFF71FC938CCD3F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 8/13/12 11:56 AM, Christopher Faylor wrote: > On Mon, Aug 13, 2012 at 07:56:52PM +0200, Pawel Jasinski wrote: >> hi guys, >> >> is that what we talking about (see patch below)? >=20 > Thanks for the patch but I wasn't looking for a simple patch to do this. > I said I'd make the change if someone could suggest a better errno. >=20 > When I suggested a patch, it was to somehow change the way Cygwin > reported errors so that Windows errors could be exposed to programs that > aren't expecting them. I was willing to look at an implementation if > someone was going to take the time to add the non-trivial amount of code > this would take. I like the way the Windows CRT solves this problem. It provides a traditional errno with the traditionally restricted set of error codes, but also provides something called "_doserrno" that holds the OS-level error code that generated the last errno. If Cygwin were to provide a similar facility, Someone could patch high-visibility programs like bash so that they'd display the Windows-level information instead of the familiar strerror(errno) message. Granted, not all errno-errors come from Win32 errors, so to avoid confusion, you'd want to set _doserrno to zero every time you set errno, then (in select places inside Cygwin) set _doserrno. Looking at the bash code, I think the change there would involve mechanically replacing all the uses of strerror (errno) with some xstrerror (errno, _doserrno), and having xstrerror do the right thing. --------------enigC4011383DCFF71FC938CCD3F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlApUYkACgkQ17c2LVA10VsMiQCdG2W3bbbcCNpmznFhbSN+YVUO 51AAoOmotei3cdpJ1f7j1udgM8xbSI9Y =zLBT -----END PGP SIGNATURE----- --------------enigC4011383DCFF71FC938CCD3F--