init_errcode(void)
{
    static int initialize = 0;
    int i =0;

    if (initialize)
	return;
    initialize = 1;

    for(i=0; i < 500; i++) {
	errcode[i] = "UNKNOWN";
    }
#ifdef E2BIG
  errcode[E2BIG] = "E2BIG";
#endif
#ifdef EACCES
  errcode[EACCES] = "EACCES";
#endif
#ifdef EADDRINUSE
  errcode[EADDRINUSE] = "EADDRINUSE";
#endif
#ifdef EADDRNOTAVAIL
  errcode[EADDRNOTAVAIL] = "EADDRNOTAVAIL";
#endif
#ifdef EAFNOSUPPORT
  errcode[EAFNOSUPPORT] = "EAFNOSUPPORT";
#endif
#ifdef EAGAIN
  errcode[EAGAIN] = "EAGAIN";
#endif
#ifdef EALREADY
  errcode[EALREADY] = "EALREADY";
#endif
#ifdef EBADE
  errcode[EBADE] = "EBADE";
#endif
#ifdef EBADF
  errcode[EBADF] = "EBADF";
#endif
#ifdef EBADFD
  errcode[EBADFD] = "EBADFD";
#endif
#ifdef EBADMSG
  errcode[EBADMSG] = "EBADMSG";
#endif
#ifdef EBADR
  errcode[EBADR] = "EBADR";
#endif
#ifdef EBADRQC
  errcode[EBADRQC] = "EBADRQC";
#endif
#ifdef EBADSLT
  errcode[EBADSLT] = "EBADSLT";
#endif
#ifdef EBUSY
  errcode[EBUSY] = "EBUSY";
#endif
#ifdef ECANCELED
  errcode[ECANCELED] = "ECANCELED";
#endif
#ifdef ECHILD
  errcode[ECHILD] = "ECHILD";
#endif
#ifdef ECHRNG
  errcode[ECHRNG] = "ECHRNG";
#endif
#ifdef ECOMM
  errcode[ECOMM] = "ECOMM";
#endif
#ifdef ECONNABORTED
  errcode[ECONNABORTED] = "ECONNABORTED";
#endif
#ifdef ECONNREFUSED
  errcode[ECONNREFUSED] = "ECONNREFUSED";
#endif
#ifdef ECONNRESET
  errcode[ECONNRESET] = "ECONNRESET";
#endif
#ifdef EDEADLK
  errcode[EDEADLK] = "EDEADLK";
#endif
#ifdef EDEADLOCK
  #if !defined EDEADLK || EDEADLK != EDEADLOCK
    errcode[EDEADLOCK] = "EDEADLOCK";
  #endif
#endif
#ifdef EDESTADDRREQ
  errcode[EDESTADDRREQ] = "EDESTADDRREQ";
#endif
#ifdef EDOM
  errcode[EDOM] = "EDOM";
#endif
#ifdef EDQUOT
  errcode[EDQUOT] = "EDQUOT";
#endif
#ifdef EEXIST
  errcode[EEXIST] = "EEXIST";
#endif
#ifdef EFAULT
  errcode[EFAULT] = "EFAULT";
#endif
#ifdef EFBIG
  errcode[EFBIG] = "EFBIG";
#endif
#ifdef EHOSTDOWN
  errcode[EHOSTDOWN] = "EHOSTDOWN";
#endif
#ifdef EHOSTUNREACH
  errcode[EHOSTUNREACH] = "EHOSTUNREACH";
#endif
#ifdef EIDRM
  errcode[EIDRM] = "EIDRM";
#endif
#ifdef EILSEQ
  errcode[EILSEQ] = "EILSEQ";
#endif
#ifdef EINPROGRESS
  errcode[EINPROGRESS] = "EINPROGRESS";
#endif
#ifdef EINTR
  errcode[EINTR] = "EINTR";
#endif
#ifdef EINVAL
  errcode[EINVAL] = "EINVAL";
#endif
#ifdef EIO
  errcode[EIO] = "EIO";
#endif
#ifdef EISCONN
  errcode[EISCONN] = "EISCONN";
#endif
#ifdef EISDIR
  errcode[EISDIR] = "EISDIR";
#endif
#ifdef EISNAM
  errcode[EISNAM] = "EISNAM";
#endif
#ifdef EKEYEXPIRED
  errcode[EKEYEXPIRED] = "EKEYEXPIRED";
#endif
#ifdef EKEYREJECTED
  errcode[EKEYREJECTED] = "EKEYREJECTED";
#endif
#ifdef EKEYREVOKED
  errcode[EKEYREVOKED] = "EKEYREVOKED";
#endif
#ifdef EL2HLT
  errcode[EL2HLT] = "EL2HLT";
#endif
#ifdef EL2NSYNC
  errcode[EL2NSYNC] = "EL2NSYNC";
#endif
#ifdef EL3HLT
  errcode[EL3HLT] = "EL3HLT";
#endif
#ifdef EL3RST
  errcode[EL3RST] = "EL3RST";
#endif
#ifdef ELIBACC
  errcode[ELIBACC] = "ELIBACC";
#endif
#ifdef ELIBBAD
  errcode[ELIBBAD] = "ELIBBAD";
#endif
#ifdef ELIBMAX
  errcode[ELIBMAX] = "ELIBMAX";
#endif
#ifdef ELIBSCN
  errcode[ELIBSCN] = "ELIBSCN";
#endif
#ifdef ELIBEXEC
  errcode[ELIBEXEC] = "ELIBEXEC";
#endif
#ifdef ELOOP
  errcode[ELOOP] = "ELOOP";
#endif
#ifdef EMEDIUMTYPE
  errcode[EMEDIUMTYPE] = "EMEDIUMTYPE";
#endif
#ifdef EMFILE
  errcode[EMFILE] = "EMFILE";
#endif
#ifdef EMLINK
  errcode[EMLINK] = "EMLINK";
#endif
#ifdef EMSGSIZE
  errcode[EMSGSIZE] = "EMSGSIZE";
#endif
#ifdef EMULTIHOP
  errcode[EMULTIHOP] = "EMULTIHOP";
#endif
#ifdef ENAMETOOLONG
  errcode[ENAMETOOLONG] = "ENAMETOOLONG";
#endif
#ifdef ENETDOWN
  errcode[ENETDOWN] = "ENETDOWN";
#endif
#ifdef ENETRESET
  errcode[ENETRESET] = "ENETRESET";
#endif
#ifdef ENETUNREACH
  errcode[ENETUNREACH] = "ENETUNREACH";
#endif
#ifdef ENFILE
  errcode[ENFILE] = "ENFILE";
#endif
#ifdef ENOBUFS
  errcode[ENOBUFS] = "ENOBUFS";
#endif
#ifdef ENODATA
  errcode[ENODATA] = "ENODATA";
#endif
#ifdef ENODEV
  errcode[ENODEV] = "ENODEV";
#endif
#ifdef ENOENT
  errcode[ENOENT] = "ENOENT";
#endif
#ifdef ENOEXEC
  errcode[ENOEXEC] = "ENOEXEC";
#endif
#ifdef ENOKEY
  errcode[ENOKEY] = "ENOKEY";
#endif
#ifdef ENOLCK
  errcode[ENOLCK] = "ENOLCK";
#endif
#ifdef ENOLINK
  errcode[ENOLINK] = "ENOLINK";
#endif
#ifdef ENOMEDIUM
  errcode[ENOMEDIUM] = "ENOMEDIUM";
#endif
#ifdef ENOMEM
  errcode[ENOMEM] = "ENOMEM";
#endif
#ifdef ENOMSG
  errcode[ENOMSG] = "ENOMSG";
#endif
#ifdef ENONET
  errcode[ENONET] = "ENONET";
#endif
#ifdef ENOPKG
  errcode[ENOPKG] = "ENOPKG";
#endif
#ifdef ENOPROTOOPT
  errcode[ENOPROTOOPT] = "ENOPROTOOPT";
#endif
#ifdef ENOSPC
  errcode[ENOSPC] = "ENOSPC";
#endif
#ifdef ENOSR
  errcode[ENOSR] = "ENOSR";
#endif
#ifdef ENOSTR
  errcode[ENOSTR] = "ENOSTR";
#endif
#ifdef ENOSYS
  errcode[ENOSYS] = "ENOSYS";
#endif
#ifdef ENOTBLK
  errcode[ENOTBLK] = "ENOTBLK";
#endif
#ifdef ENOTCONN
  errcode[ENOTCONN] = "ENOTCONN";
#endif
#ifdef ENOTDIR
  errcode[ENOTDIR] = "ENOTDIR";
#endif
#ifdef ENOTEMPTY
  errcode[ENOTEMPTY] = "ENOTEMPTY";
#endif
#ifdef ENOTSOCK
  errcode[ENOTSOCK] = "ENOTSOCK";
#endif
#ifdef ENOTSUP
  errcode[ENOTSUP] = "ENOTSUP";
#endif
#ifdef ENOTTY
  errcode[ENOTTY] = "ENOTTY";
#endif
#ifdef ENOTUNIQ
  errcode[ENOTUNIQ] = "ENOTUNIQ";
#endif
#ifdef ENXIO
  errcode[ENXIO] = "ENXIO";
#endif
#ifdef EOPNOTSUPP
  errcode[EOPNOTSUPP] = "EOPNOTSUPP";
#endif
#ifdef EOVERFLOW
  errcode[EOVERFLOW] = "EOVERFLOW";
#endif
#ifdef EPERM
  errcode[EPERM] = "EPERM";
#endif
#ifdef EPFNOSUPPORT
  errcode[EPFNOSUPPORT] = "EPFNOSUPPORT";
#endif
#ifdef EPIPE
  errcode[EPIPE] = "EPIPE";
#endif
#ifdef EPROTO
  errcode[EPROTO] = "EPROTO";
#endif
#ifdef EPROTONOSUPPORT
  errcode[EPROTONOSUPPORT] = "EPROTONOSUPPORT";
#endif
#ifdef EPROTOTYPE
  errcode[EPROTOTYPE] = "EPROTOTYPE";
#endif
#ifdef ERANGE
  errcode[ERANGE] = "ERANGE";
#endif
#ifdef EREMCHG
  errcode[EREMCHG] = "EREMCHG";
#endif
#ifdef EREMOTE
  errcode[EREMOTE] = "EREMOTE";
#endif
#ifdef EREMOTEIO
  errcode[EREMOTEIO] = "EREMOTEIO";
#endif
#ifdef ERESTART
  errcode[ERESTART] = "ERESTART";
#endif
#ifdef EROFS
  errcode[EROFS] = "EROFS";
#endif
#ifdef ESHUTDOWN
  errcode[ESHUTDOWN] = "ESHUTDOWN";
#endif
#ifdef ESPIPE
  errcode[ESPIPE] = "ESPIPE";
#endif
#ifdef ESOCKTNOSUPPORT
  errcode[ESOCKTNOSUPPORT] = "ESOCKTNOSUPPORT";
#endif
#ifdef ESRCH
  errcode[ESRCH] = "ESRCH";
#endif
#ifdef ESTALE
  errcode[ESTALE] = "ESTALE";
#endif
#ifdef ESTRPIPE
  errcode[ESTRPIPE] = "ESTRPIPE";
#endif
#ifdef ETIME
  errcode[ETIME] = "ETIME";
#endif
#ifdef ETIMEDOUT
  errcode[ETIMEDOUT] = "ETIMEDOUT";
#endif
#ifdef ETXTBSY
  errcode[ETXTBSY] = "ETXTBSY";
#endif
#ifdef EUCLEAN
  errcode[EUCLEAN] = "EUCLEAN";
#endif
#ifdef EUNATCH
  errcode[EUNATCH] = "EUNATCH";
#endif
#ifdef EUSERS
  errcode[EUSERS] = "EUSERS";
#endif
#ifdef EWOULDBLOCK
  errcode[EWOULDBLOCK] = "EWOULDBLOCK";
#endif
#ifdef EXDEV
  errcode[EXDEV] = "EXDEV";
#endif
#ifdef EXFULL
  errcode[EXFULL] = "EXFULL";
#endif
#ifdef EOWNERDEAD
  errcode[EOWNERDEAD] = "EOWNERDEAD";
#endif
#ifdef ENOTRECOVERABLE
  errcode[ENOTRECOVERABLE] = "ENOTRECOVERABLE";
#endif
#ifdef ERFKILL
  errcode[ERFKILL] = "ERFKILL";
#endif
#ifdef EHWPOISON
  errcode[EHWPOISON] = "EHWPOISON";
#endif
#ifdef ETOOMANYREFS
  errcode[ETOOMANYREFS] = "ETOOMANYREFS";
#endif
#ifdef ENOTNAM
  errcode[ENOTNAM] = "ENOTNAM";
#endif
#ifdef ENAVAIL
  errcode[ENAVAIL] = "ENAVAIL";
#endif
#ifdef EDOTDOT
  errcode[EDOTDOT] = "EDOTDOT";
#endif
#ifdef ESRMNT
  errcode[ESRMNT] = "ESRMNT";
#endif
#ifdef EADV
  errcode[EADV] = "EADV";
#endif
#ifdef EBFONT
  errcode[EBFONT] = "EBFONT";
#endif
#ifdef ENOANO
  errcode[ENOANO] = "ENOANO";
#endif
#ifdef ENOCSI
  errcode[ENOCSI] = "ENOCSI";
#endif
#ifdef ELNRNG
  errcode[ELNRNG] = "ELNRNG";
#endif
}