This is the mail archive of the
mailing list for the libstdc++ project.
Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.
- From: Martin Sebor <msebor at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Sep 2015 11:39:30 -0600
- Subject: Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.
- Authentication-results: sourceware.org; auth=none
- References: <20150911142140 dot GL2631 at redhat dot com>
On 09/11/2015 08:21 AM, Jonathan Wakely wrote:
Solaris 10 doesn't follow POSIX in accepting a null pointer as the
second argument to realpath(), so allocate a buffer for it.
FWIW, the NULL requirement is new in Issue 7. In Issue 6, the behavior
is implementation-defined, and before then it was an error. Solaris 10
claims conformance to SUSv2 and its realpath fails with EINVAL.
Solaris 11 says it conforms to Issue 6 but according to the man page
its realpath already implements the Issue 7 requirement.
I suspect the same problem will come up on other systems so checking
the POSIX version might be better than testing for each OS.