Commit 6335beb0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(init_buffer): Use getcwd instead of getwd, if available.

parent 985d0dad
......@@ -3706,8 +3706,13 @@ init_buffer ()
&& dotstat.st_dev == pwdstat.st_dev
&& strlen (pwd) < MAXPATHLEN)
strcpy (buf, pwd);
#ifdef HAVE_GETCWD
else if (getcwd (buf, MAXPATHLEN+1) == 0)
fatal ("`getcwd' failed: %s\n", buf);
#else
else if (getwd (buf) == 0)
fatal ("`getwd' failed: %s\n", buf);
#endif
#ifndef VMS
/* Maybe this should really use some standard subroutine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment