Re: realpath(3) bugs

Andries E. Brouwer
2012-05-05T22:14:41Z

On Sat, May 05, 2012 at 08:34:50PM +0200, Casper.Dik-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org wrote:

> I've looked through earlier SunOS versions and I didn't find
> it n SunOS 3.5 but I did find it in SunOS 4.1.1.
> So if i ever happened in SunOS it may happened in SunOS 4.0.

Guy Harris wrote (1992-01-17):

: Unfortunately, "realpath()" is *not* present in BSD, as of 4.3-reno;
: I think it first showed up in SunOS 4.0, and was then picked up by other
: systems, such as System V Release 4.

That seems to define the history. SunOS 4.0 -> SVr4 -> Solaris 2.0.

Concerning man pages: old man pages (for a derived version, cf.
http://osr600doc.sco.com/en/man/html.S-osr5/realpath.S-osr5.html
) document realpath as sometimes returning a relative path.
Later man pages leave the old text but prefix it by a new
paragraph stating that an absolute path is returned.
This yields confusing versions like the SunOS 5.9 one given in
http://www.s-gms.ms.edus.si/cgi-bin/man-cgi?realpath+3C .
Still later man pages remove all mention of relative paths
(or comment it out, as Apple did).

Andries