mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 23:31:55 -08:00
(init_buffer): Use getcwd instead of getwd, if available.
This commit is contained in:
parent
985d0dad78
commit
6335beb00f
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue