1
Fork 0
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:
Richard M. Stallman 1997-08-09 04:46:22 +00:00
parent 985d0dad78
commit 6335beb00f

View file

@ -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