]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r206893:
authorkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 4 May 2010 05:34:18 +0000 (05:34 +0000)
committerkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 4 May 2010 05:34:18 +0000 (05:34 +0000)
commit8338aaeacb04d598fda7645a96aad05c3a20e8d8
tree8d52fe16daa7d57ea1120185988372695ae793f5
parent5af1767131857162c40ae1880a2b40db4b14ad50
MFC r206893:
Slightly modernize realpath(3).

SUSv4 requires that implementation returns EINVAL if supplied path is NULL,
and ENOENT if path is empty string [1].
Bring prototype in conformance with SUSv4, adding restrict keywords.
Allow the resolved path buffer pointer be NULL, in which case realpath(3)
allocates storage with malloc().

MFC r206898:
Free() is not allowed to modify errno, remove safety brackets around it.
Add small optimization, do not copy a string to the buffer that is
to be freed immediately after.

MFC r206997:
Move realpath(3) prototype to a POSIX section.

MFC r206998:
Add standards section, improve wording, taking into account the handling
of NULL and changed type in declaration.

git-svn-id: svn://svn.freebsd.org/base/stable/8@207599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
include/stdlib.h
lib/libc/stdlib/realpath.3
lib/libc/stdlib/realpath.c