sperber's strerror fix
This commit is contained in:
parent
6ed1d26e9d
commit
507631b689
|
@ -494,22 +494,26 @@ char *scm_gethostname(void)
|
||||||
int gethostname();
|
int gethostname();
|
||||||
gethostname(hostname, MAXHOSTNAMELEN);
|
gethostname(hostname, MAXHOSTNAMELEN);
|
||||||
return hostname;
|
return hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
char *errno_msg(int i)
|
char *errno_msg(int i)
|
||||||
{
|
{
|
||||||
/* temp hack until we figure out what to do about losing sys_errlist's */
|
#ifdef HAVE_STRERROR
|
||||||
extern
|
return(strerror(i));
|
||||||
|
#else
|
||||||
|
/* temp hack until we figure out what to do about losing sys_errlist's */
|
||||||
|
extern
|
||||||
#ifdef HAVE_CONST_SYS_ERRLIST
|
#ifdef HAVE_CONST_SYS_ERRLIST
|
||||||
const
|
const
|
||||||
#endif
|
#endif
|
||||||
char *sys_errlist[];
|
char *sys_errlist[];
|
||||||
extern int sys_nerr;
|
extern int sys_nerr;
|
||||||
return ( i < 0 || i > sys_nerr ) ? NULL /* i.e., #f */
|
return ( i < 0 || i > sys_nerr ) ? NULL /* i.e., #f */
|
||||||
: (char*) sys_errlist[i];
|
: (char*) sys_errlist[i];
|
||||||
}
|
#endif /* !HAVE_STRERROR */
|
||||||
|
}
|
||||||
|
|
||||||
/* Some of fcntl()
|
/* Some of fcntl()
|
||||||
******************
|
******************
|
||||||
|
|
Loading…
Reference in New Issue