From 2d657d6c89b8954320c3e0fb3b3093dc434ca7ac Mon Sep 17 00:00:00 2001 From: Alexander Shiryaev Date: Wed, 14 Nov 2012 13:26:22 +0400 Subject: [PATCH] OpenBSD LinLibc: some errno constants added --- Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt | 29 ++++++++++++++++++- .../_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ | 2 +- .../_OpenBSD_/Lin/Mod/gen-Libc/Makefile | 5 ++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt b/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt index ba1be61..c6e699d 100644 --- a/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt +++ b/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt @@ -110,7 +110,7 @@ MODULE LinLibc ["libc.so.66.0"]; (* possible error constants for errno *) - (* OpenBSD /usr/include/sys/errno.h *) + (* /usr/include/sys/errno.h *) EPERM* = 1; (* Operation not permitted *) ENOENT* = 2; (* No such file or directory *) ESRCH* = 3; (* No such process *) @@ -179,6 +179,33 @@ MODULE LinLibc ["libc.so.66.0"]; EIDRM* = 89; (* Identifier removed *) ENOMSG* = 90; (* No message of desired type *) ENOTSUP* = 91; (* Not supported *) + ENOTBLK* = 15; (* Block device required *) + ESOCKTNOSUPPORT* = 44; (* Socket type not supported *) + EPFNOSUPPORT* = 46; (* Protocol family not supported *) + ESHUTDOWN* = 58; (* Can't send after socket shutdown *) + ETOOMANYREFS* = 59; (* Too many references: can't splice *) + EHOSTDOWN* = 64; (* Host is down *) + EHOSTUNREACH* = 65; (* No route to host *) + EPROCLIM* = 67; (* Too many processes *) + EUSERS* = 68; (* Too many users *) + EREMOTE* = 71; (* Too many levels of remote in path *) + EBADRPC* = 72; (* RPC struct is bad *) + ERPCMISMATCH* = 73; (* RPC version wrong *) + EPROGUNAVAIL* = 74; (* RPC prog. not avail *) + EPROGMISMATCH* = 75; (* Program version wrong *) + EPROCUNAVAIL* = 76; (* Bad procedure for program *) + EFTYPE* = 79; (* Inappropriate file type or format *) + EAUTH* = 80; (* Authentication error *) + ENEEDAUTH* = 81; (* Need authenticator *) + EIPSEC* = 82; (* IPsec processing failure *) + ENOATTR* = 83; (* Attribute not found *) + ENOMEDIUM* = 85; (* No medium found *) + EMEDIUMTYPE* = 86; (* Wrong Medium Type *) + EOVERFLOW* = 87; (* Conversion overflow *) + ECANCELED* = 88; (* Operation canceled *) + ELAST* = 91; (* Must be equal largest errno *) + ERESTART* = -1; (* restart syscall *) + EJUSTRETURN* = -2; (* don't modify regs, just return *) (* OpenBSD 5.2 /usr/include/i386/setjmp.h *) diff --git a/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ b/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ index 4fe4143..dacb4db 100644 --- a/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ +++ b/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ @@ -52,7 +52,7 @@ MODULE LinLibc ["libc.so.66.0"]; %%defs-siginfo1%% (* possible error constants for errno *) - (* OpenBSD /usr/include/sys/errno.h *) + (* /usr/include/sys/errno.h *) %%defs-errno%% (* OpenBSD 5.2 /usr/include/i386/setjmp.h *) diff --git a/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Makefile b/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Makefile index 022db25..eb2d245 100644 --- a/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Makefile +++ b/Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Makefile @@ -12,6 +12,7 @@ all: Libc.txt ${DEFS} Libc.txt: Libc.txt.templ ${DEFS} sizeofs ${PY} ./untempl.py Libc.txt.templ ${.TARGET} +# perl -pe 's/\n/\r\n/' < ${.TARGET}.tmp > ${.TARGET} # ${PY} ./untempl2.py ${.TARGET}.tmp ${.TARGET} # rm -f ${.TARGET}.tmp @@ -20,6 +21,10 @@ sizeofs: sizeofs.c defs-errno: ./dumpdefs.py 2 0 i /usr/include/sys/errno.h > ${.TARGET} + ./dumpdefs.py 2 1 i /usr/include/sys/errno.h >> ${.TARGET} + +defs-tftp: + ./dumpdefs.py 2 1 i /usr/include/arpa/tftp.h | grep EACCESS > ${.TARGET} defs-signal: ./dumpdefs.py 2 1 i /usr/include/sys/signal.h > ${.TARGET} -- 2.29.2