Problem with sh/bash and snapshot cygwin1-20050825.dll

Eric Blake ebb9@byu.net
Fri Aug 26 13:09:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> While you're at it, fix realpath(NULL, buf) to set buf[0]='\0', instead of
>> leaving garbage there.
>
>http://cygwin.com/acronyms/#PTC

Also, strdup() is faster than malloc()/strcpy(), since it calculates the
path length only once instead of twice.

>> Also, realpath("//..", buf) should be "//", not "/", since it is its own
>> root (there is no way to make // a subdirectory of /).  And when pwd is
>> //, realpath("..", buf) is correctly "//", but realpath("../..", buf) is
>> mistakenly "/".
>
>http://cygwin.com/acronyms/#PTC

Unfortunately, I don't have copyright assignment (I've tried convincing my
employer; I'll try again), and this would push me over my current
contribution limits.

2005-08-26  Eric Blake  <ebb9@byu.net>

	* path.cc (realpath): Truncate resolved when path is NULL.  Use
	strdup when resolved is NULL.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.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

iD8DBQFDDxRe84KuGfSFAYARAnXaAJ0b9xkB+hhmp9GQk0S52vSlzbtqkwCdGlfE
wjGOq/B2Iv2JyJ2HA81HZIc=
=EXXF
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20050826/d619fcbf/attachment.ksh>


More information about the Cygwin-patches mailing list