[PATCH] Fix llvm::sys::path::home_directory on unix to get path from passwd.pw_dir when the $HOME variable isn't set

Chandler Carruth chandlerc at google.com
Mon Feb 9 12:51:45 PST 2015


On Mon, Feb 9, 2015 at 12:10 PM, Ilia K <ki.stfu at gmail.com> wrote:

> Hello Chandler,
>
> >RE: Why is this useful?
> It tries to get home_direictory by all ways. It's useful in case when HOME
> wasn't set (that was in my case).
>
> >RE: The documentation for getpwuid specifically suggests that
> applications should merely inspect the HOME environment variable.
> I didn't see any references to HOME variable. (see
> http://pubs.opengroup.org/onlinepubs/009695399/functions/getpwuid.html)
>

But what platform is it that we're hypothetically supporting? All the BSD
and Linux flavors I know of rely heavily on the HOME environment variable.
All the build bots I know of test under that assumption. I'm worried about
adding code to support another variant that we have essentially no way of
testing and no knowledge of why it was important.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/5a53b455/attachment.html>


More information about the llvm-commits mailing list