DEADSOFTWARE

OpenBSD LinLibc: some errno constants added
authorAlexander Shiryaev <aixp@mail.ru>
Wed, 14 Nov 2012 09:26:22 +0000 (13:26 +0400)
committerAlexander Shiryaev <aixp@mail.ru>
Wed, 14 Nov 2012 09:26:22 +0000 (13:26 +0400)
Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt
Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ
Trurl-based/_OpenBSD_/Lin/Mod/gen-Libc/Makefile

index ba1be6138d4c77ff0953162114b9520f20907646..c6e699dbc162257003a413417648970c4e321e42 100644 (file)
@@ -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 *)
index 4fe4143cfad87da1433d4624dc4c1b6804d2e343..dacb4db495fcc4d437adacc1518286b1b6cc3e4d 100644 (file)
@@ -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 *)
index 022db2536dbb6e206c9f0ccac04a879241b99cae..eb2d2450bee2ad43473e6f06c6156784a753c822 100644 (file)
@@ -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}