Added autoconf support for strerror/sys_errlist per Ralf Corsepius'

direction.  This fixes a problem reported by Steve Evans of Radstone
since he is using glibc2.
This commit is contained in:
Joel Sherrill
1998-01-21 18:28:09 +00:00
parent d73ed76b03
commit 9ad1f135fa
20 changed files with 418 additions and 143 deletions

View File

@@ -37,6 +37,23 @@
#include <stdlib.h>
#include <string.h>
#include "config.h"
#ifndef VMS
#ifndef HAVE_STRERROR
extern int sys_nerr;
extern char *sys_errlist[];
#define strerror( _err ) \
((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
#else /* HAVE_STRERROR */
char *strerror ();
#endif
#else /* VMS */
char *strerror (int,...);
#endif
#if defined(__unix__) && !defined(EXIT_FAILURE)
#define EXIT_FAILURE -1
#define EXIT_SUCCESS 0