PR 51803 Handle getcwd failure and lack of the function better.
2012-01-11 Janne Blomqvist <jb@gcc.gnu.org> Mike Stump <mikestump@comcast.net> PR libfortran/51803 * runtime/main.c (store_exe_path): Handle getcwd failure and lack of the function better. Co-Authored-By: Mike Stump <mikestump@comcast.net> From-SVN: r183090
This commit is contained in:
parent
ef1ed13d9a
commit
8763317661
|
@ -1,3 +1,9 @@
|
||||||
|
2012-01-11 Janne Blomqvist <jb@gcc.gnu.org>
|
||||||
|
Mike Stump <mikestump@comcast.net>
|
||||||
|
PR libfortran/51803
|
||||||
|
* runtime/main.c (store_exe_path): Handle getcwd failure and lack
|
||||||
|
of the function better.
|
||||||
|
|
||||||
2012-01-10 Tobias Burnus <burnus@net-b.de>
|
2012-01-10 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/51197
|
PR fortran/51197
|
||||||
|
|
|
@ -116,8 +116,10 @@ store_exe_path (const char * argv0)
|
||||||
memset (buf, 0, sizeof (buf));
|
memset (buf, 0, sizeof (buf));
|
||||||
#ifdef HAVE_GETCWD
|
#ifdef HAVE_GETCWD
|
||||||
cwd = getcwd (buf, sizeof (buf));
|
cwd = getcwd (buf, sizeof (buf));
|
||||||
|
if (!cwd)
|
||||||
|
cwd = ".";
|
||||||
#else
|
#else
|
||||||
cwd = "";
|
cwd = ".";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* exe_path will be cwd + "/" + argv[0] + "\0". This will not work
|
/* exe_path will be cwd + "/" + argv[0] + "\0". This will not work
|
||||||
|
|
Loading…
Reference in New Issue