changeset 5516:ec5a245c14ed

Don't declare sys_errlist; declare strerror instead. (relocate_fd): Call strerror instead of using sys_errlist.
author Roland McGrath <roland@gnu.org>
date Sat, 08 Jan 1994 21:24:35 +0000
parents 920b55d2057b
children 8b2b6a296cda
files src/callproc.c
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Sat Jan 08 14:36:57 1994 +0000
+++ b/src/callproc.c	Sat Jan 08 21:24:35 1994 +0000
@@ -1,11 +1,11 @@
 /* Synchronous subprocess invocation for GNU Emacs.
-   Copyright (C) 1985, 1986, 1987, 1988, 1993 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -24,9 +24,7 @@
 #include <config.h>
 
 extern int errno;
-#ifndef VMS
-extern char *sys_errlist[];
-#endif
+extern char *strerror ();
 
 /* Define SIGCHLD as an alias for SIGCLD.  */
 
@@ -674,9 +672,10 @@
       if (new == -1)
 	{
 	  char *message1 = "Error while setting up child: ";
+	  char *errmessage = strerror (errno);
 	  char *message2 = "\n";
 	  write (2, message1, strlen (message1));
-	  write (2, sys_errlist[errno], strlen (sys_errlist[errno]));
+	  write (2, errmessage, strlen (errmessage));
 	  write (2, message2, strlen (message2));
 	  _exit (1);
 	}