1 /* $PostgreSQL: pgsql/src/port/strerror.c,v 1.5 2005/07/28 04:03:14 tgl Exp $ */
4 * strerror - map error number to descriptive string
6 * This version is obviously somewhat Unix-specific.
8 * based on code by Henry Spencer
9 * modified for ANSI by D'Arcy J.M. Cain
15 extern const char *const sys_errlist[];
23 if (errnum < 0 || errnum > sys_nerr)
25 sprintf(buf, _("unrecognized error %d"), errnum);
29 return sys_errlist[errnum];