Commit | Line | Data |
---|---|---|
dffa93b1 | 1 | /* Turning errno values into English error messages. |
e17cba16 GH |
2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc. |
3 | ||
4 | This file is part of GNU Emacs. | |
5 | ||
6 | GNU Emacs is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GNU Emacs is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GNU Emacs; see the file COPYING. If not, write to | |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | ||
22 | char * | |
23 | strerror (errnum) | |
24 | int errnum; | |
25 | { | |
26 | extern char *sys_errlist[]; | |
27 | extern int sys_nerr; | |
28 | ||
29 | if (errnum >= 0 && errnum < sys_nerr) | |
30 | return sys_errlist[errnum]; | |
31 | return (char *) "Unknown error"; | |
32 | } |