* toplev.c (get_src_pwd): Handle failure of getpwd().

From-SVN: r92910
This commit is contained in:
Geoffrey Keating 2005-01-04 23:28:00 +00:00 committed by Geoffrey Keating
parent e3523f56d2
commit 5f0c48ed93
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-01-04 Geoffrey Keating <geoffk@apple.com>
* toplev.c (get_src_pwd): Handle failure of getpwd().
2005-01-04 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold_single_bit_test): Delete unreachable handling

View File

@ -449,7 +449,11 @@ const char *
get_src_pwd (void)
{
if (! src_pwd)
src_pwd = getpwd ();
{
src_pwd = getpwd ();
if (!src_pwd)
src_pwd = ".";
}
return src_pwd;
}