Commit 6c238def5cad8b3780940afba4d3cfcd7f722ccc

Thomas de Grivel 2017-04-24T18:03:22

Import error numbers from Linux.

diff --git a/grovel-errno.lisp b/grovel-errno.lisp
index 3fa0607..1db68d4 100644
--- a/grovel-errno.lisp
+++ b/grovel-errno.lisp
@@ -4,3 +4,140 @@
 (include "errno.h")
 
 (cvar ("errno" errno) :int)
+
+(constant (+perm+ "EPERM"))
+(constant (+noent+ "ENOENT"))
+(constant (+srch+ "ESRCH"))
+(constant (+intr+ "EINTR"))
+(constant (+io+ "EIO"))
+(constant (+nxio+ "ENXIO"))
+(constant (+2big+ "E2BIG"))
+(constant (+noexec+ "ENOEXEC"))
+(constant (+badf+ "EBADF"))
+(constant (+child+ "ECHILD"))
+(constant (+again+ "EAGAIN"))
+(constant (+nomem+ "ENOMEM"))
+(constant (+acces+ "EACCES"))
+(constant (+fault+ "EFAULT"))
+(constant (+notblk+ "ENOTBLK"))
+(constant (+busy+ "EBUSY"))
+(constant (+exist+ "EEXIST"))
+(constant (+xdev+ "EXDEV"))
+(constant (+nodev+ "ENODEV"))
+(constant (+notdir+ "ENOTDIR"))
+(constant (+isdir+ "EISDIR"))
+(constant (+inval+ "EINVAL"))
+(constant (+nfile+ "ENFILE"))
+(constant (+mfile+ "EMFILE"))
+(constant (+notty+ "ENOTTY"))
+(constant (+txtbsy+ "ETXTBSY"))
+(constant (+fbig+ "EFBIG"))
+(constant (+nospc+ "ENOSPC"))
+(constant (+spipe+ "ESPIPE"))
+(constant (+rofs+ "EROFS"))
+(constant (+mlink+ "EMLINK"))
+(constant (+pipe+ "EPIPE"))
+(constant (+dom+ "EDOM"))
+(constant (+range+ "ERANGE"))
+
+(constant (+deadlk+ "EDEADLK"))
+(constant (+nametoolong+ "ENAMETOOLONG"))
+(constant (+nolck+ "ENOLCK"))
+(constant (+nosys+ "ENOSYS"))
+(constant (+notempty+ "ENOTEMPTY"))
+(constant (+loop+ "ELOOP"))
+(constant (+wouldblock+ "EWOULDBLOCK"))
+(constant (+nomsg+ "ENOMSG"))
+(constant (+idrm+ "EIDRM"))
+(constant (+chrng+ "ECHRNG"))
+(constant (+l2nsync+ "EL2NSYNC"))
+(constant (+l3hlt+ "EL3HLT"))
+(constant (+l3rst+ "EL3RST"))
+(constant (+lnrng+ "ELNRNG"))
+(constant (+unatch+ "EUNATCH"))
+(constant (+nocsi+ "ENOCSI"))
+(constant (+l2hlt+ "EL2HLT"))
+(constant (+bade+ "EBADE"))
+(constant (+badr+ "EBADR"))
+(constant (+xfull+ "EXFULL"))
+(constant (+noano+ "ENOANO"))
+(constant (+badrqc+ "EBADRQC"))
+(constant (+badslt+ "EBADSLT"))
+(constant (+deadlock+ "EDEADLOCK"))
+(constant (+bfont+ "EBFONT"))
+(constant (+nostr+ "ENOSTR"))
+(constant (+nodata+ "ENODATA"))
+(constant (+time+ "ETIME"))
+(constant (+nosr+ "ENOSR"))
+(constant (+nonet+ "ENONET"))
+(constant (+nopkg+ "ENOPKG"))
+(constant (+remote+ "EREMOTE"))
+(constant (+nolink+ "ENOLINK"))
+(constant (+adv+ "EADV"))
+(constant (+srmnt+ "ESRMNT"))
+(constant (+comm+ "ECOMM"))
+(constant (+proto+ "EPROTO"))
+(constant (+multihop+ "EMULTIHOP"))
+(constant (+dotdot+ "EDOTDOT"))
+(constant (+badmsg+ "EBADMSG"))
+(constant (+overflow+ "EOVERFLOW"))
+(constant (+notuniq+ "ENOTUNIQ"))
+(constant (+badfd+ "EBADFD"))
+(constant (+remchg+ "EREMCHG"))
+(constant (+libacc+ "ELIBACC"))
+(constant (+libbad+ "ELIBBAD"))
+(constant (+libscn+ "ELIBSCN"))
+(constant (+libmax+ "ELIBMAX"))
+(constant (+libexec+ "ELIBEXEC"))
+(constant (+ilseq+ "EILSEQ"))
+(constant (+restart+ "ERESTART"))
+(constant (+strpipe+ "ESTRPIPE"))
+(constant (+users+ "EUSERS"))
+(constant (+notsock+ "ENOTSOCK"))
+(constant (+destaddrreq+ "EDESTADDRREQ"))
+(constant (+msgsize+ "EMSGSIZE"))
+(constant (+prototype+ "EPROTOTYPE"))
+(constant (+noprotoopt+ "ENOPROTOOPT"))
+(constant (+protonosupport+ "EPROTONOSUPPORT"))
+(constant (+socknosupport+ "ESOCKTNOSUPPORT"))
+(constant (+opnotsupp+ "EOPNOTSUPP"))
+(constant (+pfnosupport+ "EPFNOSUPPORT"))
+(constant (+afnosupport+ "EAFNOSUPPORT"))
+(constant (+addrinuse+ "EADDRINUSE"))
+(constant (+addrnotavail+ "EADDRNOTAVAIL"))
+(constant (+netdown+ "ENETDOWN"))
+(constant (+netunreach+ "ENETUNREACH"))
+(constant (+netreset+ "ENETRESET"))
+(constant (+connaborted+ "ECONNABORTED"))
+(constant (+connreset+ "ECONNRESET"))
+(constant (+nobufs+ "ENOBUFS"))
+(constant (+isconn+ "EISCONN"))
+(constant (+notconn+ "ENOTCONN"))
+(constant (+shutdown+ "ESHUTDOWN"))
+(constant (+toomanyrefs+ "ETOOMANYREFS"))
+(constant (+timedout+ "ETIMEDOUT"))
+(constant (+connrefused+ "ECONNREFUSED"))
+(constant (+hostdown+ "EHOSTDOWN"))
+(constant (+hostunreach+ "EHOSTUNREACH"))
+(constant (+already+ "EALREADY"))
+(constant (+inprogress+ "EINPROGRESS"))
+(constant (+stale+ "ESTALE"))
+(constant (+uclean+ "EUCLEAN"))
+(constant (+notnam+ "ENOTNAM"))
+(constant (+navail+ "ENAVAIL"))
+(constant (+isnam+ "EISNAM"))
+(constant (+remoteio+ "EREMOTEIO"))
+(constant (+dquot+ "EDQUOT"))
+(constant (+nomedium+ "ENOMEDIUM"))
+(constant (+mediumtype+ "EMEDIUMTYPE"))
+(constant (+canceled+ "ECANCELED"))
+(constant (+nokey+ "ENOKEY"))
+(constant (+keyexpired+ "EKEYEXPIRED"))
+(constant (+keyrevoked+ "EKEYREVOKED"))
+(constant (+keyrejected+ "EKEYREJECTED"))
+(constant (+ownerdead+ "EOWNERDEAD"))
+(constant (+notrecoverable+ "ENOTRECOVERABLE"))
+(constant (+rfkill+ "ERFKILL"))
+(constant (+hwpoison+ "EHWPOISON"))
+
+(constant (+notsupp+ "ENOTSUPP"))