Mercurial > emacs
changeset 19242:a7d44588be35
(init_buffer): Use getcwd instead of getwd, if available.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 09 Aug 1997 04:46:22 +0000 |
parents | eb1cef5fa337 |
children | f8f590160844 |
files | src/buffer.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c Sat Aug 09 04:30:41 1997 +0000 +++ b/src/buffer.c Sat Aug 09 04:46:22 1997 +0000 @@ -3706,8 +3706,13 @@ && 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