Is there any function in UNIX to the convert errno to its corresponding string for e.g. EIDRM to \"EIDRM\". Its very annoying to debug to check for errors with these integer
If you do indeed want EIDRM and not its error string: no. However, on OpenBSD,
man errno|egrep ' [0-9]+ E[A-Z]+'|sed 's/^ *//'|cut -d' ' -f1,2
prints out a nice table of "...\n89 EIDM\n..." that you can convert further into a data structure for the programming language that you'd like to have this function in.