svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Konstantin Belousov
Author: kib Date: Fri May 11 11:29:08 2012 New Revision: 235266 URL: http://svn.freebsd.org/changeset/base/235266 Log: According to SUSv4, realpath(3) must fail if [ENOENT] A component of file_name does not name an existing file or file_name points to an empty string. [ENOTDIR] A

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Andrey Chernov
Thanks, but in this two places old errno value should be saved across free() because free() may damage it: On Fri, May 11, 2012 at 11:29:08AM +, Konstantin Belousov wrote: ... + if (lstat(resolved, sb) != 0) { + if (m) +

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Konstantin Belousov
On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: Thanks, but in this two places old errno value should be saved across free() because free() may damage it: I do not agree. free() cannot change errno. On Fri, May 11, 2012 at 11:29:08AM +, Konstantin Belousov wrote: ... +

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Garrett Cooper
On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov kostik...@gmail.com wrote: On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: Thanks, but in this two places old errno value should be saved across free() because free() may damage it: I do not agree. free() cannot change

Re: svn commit: r235266 - head/lib/libc/stdlib

2012-05-11 Thread Andrey Chernov
On Fri, May 11, 2012 at 08:04:12PM +0300, Konstantin Belousov wrote: On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: Thanks, but in this two places old errno value should be saved across free() because free() may damage it: I do not agree. free() cannot change errno. Perhaps