]> code.delx.au - gnu-emacs/commitdiff
Include errno.h.
authorRichard M. Stallman <rms@gnu.org>
Wed, 27 Aug 1997 20:01:05 +0000 (20:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 27 Aug 1997 20:01:05 +0000 (20:01 +0000)
(init_buffer) [HAVE_GETCWD]: Fix error message for getcwd failure.

src/buffer.c

index 2b4c18fa189e8fe77fc3393f6c69e1f3f269a57d..47b4f150363056c34964fefbaced68e3bc305239 100644 (file)
@@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA.  */
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/param.h>
+#include <errno.h>
+
+extern int errno;
 
 #ifndef MAXPATHLEN
 /* in 4.1, param.h fails to define this. */
@@ -3708,7 +3711,7 @@ init_buffer ()
     strcpy (buf, pwd);
 #ifdef HAVE_GETCWD
   else if (getcwd (buf, MAXPATHLEN+1) == 0)
-    fatal ("`getcwd' failed: %s\n", buf);
+    fatal ("`getcwd' failed: %s\n", strerror (errno));
 #else
   else if (getwd (buf) == 0)
     fatal ("`getwd' failed: %s\n", buf);