diff --git a/appl/ftp/common/strerror.c b/appl/ftp/common/strerror.c new file mode 100644 index 000000000..517ac580c --- /dev/null +++ b/appl/ftp/common/strerror.c @@ -0,0 +1,21 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +RCSID("$Id$"); + +static char emsg[1024]; + +char* +strerror(int eno) +{ + if(eno < 0 || eno >= sys_nerr) + sprintf(emsg, "Error %d occurred.", eno); + else + strcpy(emsg, sys_errlist[eno]); + + return emsg; +}