diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h index 6849f524..471c7ec8 100644 --- a/WINGs/WINGs/WUtil.h +++ b/WINGs/WINGs/WUtil.h @@ -176,10 +176,6 @@ typedef void waborthandler(int); waborthandler* wsetabort(waborthandler* handler); - -/* don't free the returned string */ -char* wstrerror(int errnum); - enum { WMESSAGE_TYPE_MESSAGE, WMESSAGE_TYPE_WARNING, diff --git a/WINGs/error.c b/WINGs/error.c index 0e3597fb..8bfe15ef 100644 --- a/WINGs/error.c +++ b/WINGs/error.c @@ -32,33 +32,6 @@ extern char *_WINGS_progname; #define MAXLINE 1024 -/********************************************************************* - * Returns the system error message associated with error code 'errnum' - *********************************************************************/ -char *wstrerror(int errnum) -{ -#if defined(HAVE_STRERROR) - return strerror(errnum); -#elif !defined(HAVE_STRERROR) && defined(BSD) - extern int errno, sys_nerr; -# ifndef __DECC - extern char *sys_errlist[]; -# endif - static char buf[] = "Unknown error 12345678901234567890"; - - if (errno < sys_nerr) - return sys_errlist[errnum]; - - snprintf(buf, sizeof(buf), _("Unknown error %d"), errnum); - return buf; -#else /* no strerror() and no sys_errlist[] */ - static char buf[] = "Error 12345678901234567890"; - - snprintf(buf, sizeof(buf), _("Error %d"), errnum); - return buf; -#endif -} - void __wmessage(int type, void *extra, const char *msg, ...) { va_list args; @@ -89,7 +62,7 @@ void __wmessage(int type, void *extra, const char *msg, ...) msg, args); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ": %s", type == WMESSAGE_TYPE_WSYSERROR ? - wstrerror(errno) : wstrerror(*(int *)extra)); + strerror(errno) : strerror(*(int *)extra)); break; case WMESSAGE_TYPE_MESSAGE: /* FALLTHROUGH */ diff --git a/configure.ac b/configure.ac index 568306bb..5f791a0f 100644 --- a/configure.ac +++ b/configure.ac @@ -163,7 +163,7 @@ dnl ============================ dnl not used anywhere AC_FUNC_MEMCMP AC_FUNC_VPRINTF -AC_CHECK_FUNCS(gethostname select poll strerror strcasecmp strncasecmp \ +AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \ setsid atexit mallinfo mkstemp) dnl Check for inotify