1 --- realpath.3.orig 2008-04-05 00:03:06.000000000 -0700
2 +++ realpath.3 2008-04-05 17:42:41.000000000 -0700
4 .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94
5 .\" $FreeBSD: src/lib/libc/stdlib/realpath.3,v 1.13 2003/03/27 20:48:53 fjoe Exp $
13 .Nd returns the canonicalized absolute pathname
22 -.Fn realpath "const char *pathname" "char resolved_path[PATH_MAX]"
24 +.Fa "const char *restrict file_name"
25 +.Fa "char *restrict resolved_name"
30 function resolves all symbolic links, extra
32 -characters and references to
33 +characters, and references to
39 -and copies the resulting absolute pathname into
40 -the memory referenced by
48 +is non-NULL, the resulting absolute pathname is copied there (it
50 refer to a buffer capable of storing at least
55 +As a permitted extension to the standard, if
58 +memory is allocated for the resulting absolute pathname, and is returned by
60 +This memory should be freed by a call to
62 +when no longer needed.
66 function will resolve both absolute and relative paths
67 and return the absolute pathname corresponding to
69 -All but the last component of
84 +function returns the address of the resulting absolute pathname, which is
86 +if it was non-NULL, or the address of newly allocated memory.
96 +was non-NULL, it will
97 contains the pathname which caused the problem.
101 may fail and set the external variable
103 for any of the errors specified for the library functions
114 -This implementation of
117 +.\" This implementation of
119 +.\" differs slightly from the Solaris implementation.
122 +.\" version always returns absolute pathnames,
123 +.\" whereas the Solaris implementation will,
124 +.\" under certain circumstances, return a relative
125 +.\" .Fa resolved_name
126 +.\" when given a relative
129 +.Fd #include <sys/param.h>
130 +.Fd #include <stdlib.h>
135 +.Sh LEGACY DESCRIPTION
137 +the last component of
139 +does not need to exist when
141 -differs slightly from the Solaris implementation.
144 -version always returns absolute pathnames,
145 -whereas the Solaris implementation will,
146 -under certain circumstances, return a relative
148 -when given a relative