/*
 * $Source: /afs/nada.kth.se/home/staff/bg/Work/krb4-0.0/src/lib/krb/RCS/k_strerror.c,v $
 *
 * $Locker:  $
 */

/*
 *
 * $Log: k_strerror.c,v $
 * Revision 1.1  1995/06/07 00:42:40  bg
 * Initial revision
 *
 *
 */

#include "krb_locl.h"

const char *
k_strerror(int errnum)
{
#if HAVE_STRERROR
  return strerror(errnum);
#else
  extern int sys_nerr;
  extern char *sys_errlist[];
  static char ebuf[40];		/* 64-bit number + slop */

  if ((unsigned int)errnum < sys_nerr)
    return(sys_errlist[errnum]);
  (void)sprintf(ebuf, "Unknown error: %d", errnum);
  return(ebuf);
#endif /* !HAVE_STRERROR */
}

