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 Message-ID: <430F0DDA.9040609@byu.net> Date: Fri, 26 Aug 2005 06:40:58 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problem with sh/bash and snapshot cygwin1-20050825.dll References: <430E9B0B DOT 8040303 AT scytek DOT de> <20050826052618 DOT GC4087 AT trixie DOT casa DOT cgf DOT cx> <20050826090717 DOT GB21203 AT calimero DOT vinschen DOT de> <430F0849 DOT 8040002 AT byu DOT net> In-Reply-To: <430F0849.8040002@byu.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 8/26/2005 6:17 AM: > I also noticed that realpath("c:..", buf) now returns "c:", rather than > "/cygdrive" - I guess it comes down to the choice of whether cygwin has 2 > roots or 28 roots. I prefer 2 roots (so that the parent directory of any > drive letter is the cygdrive prefix), but maybe I can be convinced that 28 > is okay. But whatever the choice is, it should be consistent - right now > realpath("c:/..", buf) is failing with ENOENT, even though it should have > the same result as realpath("c:..", buf). Replying to myself, if cygwin is ever changed so that it tracks 27 current working directories the way Windows does (using the !C: environment variable and friends), then c:.. and c:/.. would have to have different semantics. But currently cygwin is documented as implicitly inserting a path separator after a drive letter, so that all pathnames from a drive letter start at the root of the drive. Also, another argument for cygwin to only have 2 roots instead of 28 is that realpath() is then consistent with getcwd(), and that way, ALL fully-resolved absolute paths start with '/'. In other words, since chdir("c:");getcwd(buf, PATH_MAX) returns /cygdrive/c, so should realpath("c:", buf). As to your comment in path.cc about realpath(path, NULL) malloc'ing its result being weird, it is consistent with getcwd(NULL, 0) malloc'ing its result, and it is quite useful. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDDw3a84KuGfSFAYARAm43AKCyrAyRRgdD5ziTXFHuBBdQmHDipwCdF8q/ rxekL6Aw70gvyijX3qZXJt8= =bD2n -----END PGP SIGNATURE----- -- 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/