[haiku-development] BSD vs. POSIX realpath()

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: "Haiku Development" <haiku-development@xxxxxxxxxxxxx>
  • Date: Wed, 15 Jul 2009 11:41:11 +0200 CEST

Hi there,

I recently noticed that our realpath() did not comply to the POSIX 
standard, and fixed that.
However, the BSD version of realpath() does not fail if only the last 
path component is not accessible. While it's very simple to check if 
the file really exists (just an additional [l]stat()), the other check 
(if at least the parent exists) is at least slightly more involved).

The question is, should we follow BSD style, or POSIX here?

Bye,
   Axel.


Other related posts: