I think it would be a useful addition to the errno/strerror/whatever
modules to be able to convert from the numeric errno to the symbolic
one.
e.g.,

char * errno_name () {
  switch (errno) {
  #ifdef ENOENT
   case ENOENT : return "ENOENT";
  #endif
   default: return NULL;
  }
}

the idea is that the error "explanation" (returned by strerror) is
different on different platforms (and especially if i18n is involved)
and is hard to search for on the web and in docs, while strings like
ENOENT et al are quite canonical and tell the expert everything they
need to know.

I am not proposing replacing strerror, of course; this is merely an
_addition_.

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://jihadwatch.org http://dhimmi.com http://palestinefacts.org
http://www.PetitionOnline.com/tap12009/ http://thereligionofpeace.com
What was there first: the Compiler or its Source code?

Reply via email to