aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-08 21:24:35 +0000
committerRoland McGrath1994-01-08 21:24:35 +0000
commit826c56acc9f7ca7cec43a310888a7bca142f9f16 (patch)
treee1a779134e604ec4185b7d46105d506bfbf5867e /src
parentafa433491263f1d62e80ec164565daafe2879618 (diff)
downloademacs-826c56acc9f7ca7cec43a310888a7bca142f9f16.tar.gz
emacs-826c56acc9f7ca7cec43a310888a7bca142f9f16.zip
Don't declare sys_errlist; declare strerror instead.
(relocate_fd): Call strerror instead of using sys_errlist.
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 174ffa214d4..c9718e7fa04 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1,11 +1,11 @@
1/* Synchronous subprocess invocation for GNU Emacs. 1/* Synchronous subprocess invocation for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
6GNU Emacs is free software; you can redistribute it and/or modify 6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by 7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option) 8the Free Software Foundation; either version 2, or (at your option)
9any later version. 9any later version.
10 10
11GNU Emacs is distributed in the hope that it will be useful, 11GNU Emacs is distributed in the hope that it will be useful,
@@ -24,9 +24,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24#include <config.h> 24#include <config.h>
25 25
26extern int errno; 26extern int errno;
27#ifndef VMS 27extern char *strerror ();
28extern char *sys_errlist[];
29#endif
30 28
31/* Define SIGCHLD as an alias for SIGCLD. */ 29/* Define SIGCHLD as an alias for SIGCLD. */
32 30
@@ -674,9 +672,10 @@ relocate_fd (fd, min)
674 if (new == -1) 672 if (new == -1)
675 { 673 {
676 char *message1 = "Error while setting up child: "; 674 char *message1 = "Error while setting up child: ";
675 char *errmessage = strerror (errno);
677 char *message2 = "\n"; 676 char *message2 = "\n";
678 write (2, message1, strlen (message1)); 677 write (2, message1, strlen (message1));
679 write (2, sys_errlist[errno], strlen (sys_errlist[errno])); 678 write (2, errmessage, strlen (errmessage));
680 write (2, message2, strlen (message2)); 679 write (2, message2, strlen (message2));
681 _exit (1); 680 _exit (1);
682 } 681 }