Skip to content
Browse files

OpenBSD: Libc updated

  • Loading branch information...
1 parent b42ccf2 commit 4aa4a1b31b4fad0e8136b26ef06a50ac7a0df92f @aixp committed Oct 5, 2012
Showing with 36 additions and 18 deletions.
  1. +36 −18 BlackBox/OpenBSD/Lin/Mod/Libc.txt
View
54 BlackBox/OpenBSD/Lin/Mod/Libc.txt
@@ -83,16 +83,30 @@ MODULE LinLibc ["libc.so.66.0"];
SA_ONESHOT* = SA_RESETHAND;
SA_STACK* = SA_ONSTACK;
- (* code values for siginfo_t.si_code when sig = SIGFPE *)
- (* OpenBSD 5.2: OK, the same *)
- FPE_INTDIV* = 1; (* Integer divide by zero. *)
- FPE_INTOVF* = 2; (* Integer overflow. *)
- FPE_FLTDIV* = 3; (* Floating point divide by zero. *)
- FPE_FLTOVF* = 4; (* Floating point overflow. *)
- FPE_FLTUND* = 5; (* Floating point underflow. *)
- FPE_FLTRES* =6; (* Floating point inexact result. *)
- FPE_FLTINV* = 7; (* Floating point invalid operation. *)
- FPE_FLTSUB* = 8; (* Subscript out of range. *)
+ (* code values for siginfo_t.si_code *)
+ (* OpenBSD /usr/include/sys/siginfo.h *)
+ FPE_INTDIV* = 1; (* integer divide by zero *)
+ FPE_INTOVF* = 2; (* integer overflow *)
+ FPE_FLTDIV* = 3; (* floating point divide by zero *)
+ FPE_FLTOVF* = 4; (* floating point overflow *)
+ FPE_FLTUND* = 5; (* floating point underflow *)
+ FPE_FLTRES* = 6; (* floating point inexact result *)
+ FPE_FLTINV* = 7; (* invalid floating point operation *)
+ FPE_FLTSUB* = 8; (* subscript out of range *)
+ ILL_ILLOPC* = 1; (* illegal opcode *)
+ ILL_ILLOPN* = 2; (* illegal operand *)
+ ILL_ILLADR* = 3; (* illegal addressing mode *)
+ ILL_ILLTRP* = 4; (* illegal trap *)
+ ILL_PRVOPC* = 5; (* privileged opcode *)
+ ILL_PRVREG* = 6; (* privileged register *)
+ ILL_COPROC* = 7; (* co-processor *)
+ ILL_BADSTK* = 8; (* bad stack *)
+ SEGV_MAPERR* = 1; (* address not mapped to object *)
+ SEGV_ACCERR* = 2; (* invalid permissions *)
+ BUS_ADRALN* = 1; (* invalid address alignment *)
+ BUS_ADRERR* = 2; (* non-existent physical address *)
+ BUS_OBJERR* = 3; (* object specific hardware error *)
+
(* possible error constants for errno *)
(* OpenBSD /usr/include/sys/errno.h *)
@@ -446,11 +460,13 @@ MODULE LinLibc ["libc.so.66.0"];
Ptrsiginfo_t* = POINTER TO siginfo_t;
(* sigset_t* = ARRAY [untagged] 128 OF BYTE; *)
- sigset_t* = ARRAY [untagged] 4 OF BYTE; (* OpenBSD 5.2 /usr/include/sys/signal.h *)
+ (* OpenBSD 5.2 /usr/include/sys/signal.h *)
+ (* sigset_t* = ARRAY [untagged] 4 OF BYTE; *)
+ sigset_t* = SET;
Ptrsigset_t* = INTEGER;
sigaction_t* = RECORD [untagged] (* OpenBSD 5.2 /usr/include/sys/signal.h *)
- sa_sigaction*: PROCEDURE (sig: INTEGER; siginfo: Ptrsiginfo_t; ptr: Ptrucontext_t); (* union with sa_handler*: PtrProc;*)
+ sa_sigaction*: PROCEDURE (* [ccall] *) (sig: INTEGER; siginfo: Ptrsiginfo_t; ptr: Ptrucontext_t); (* union with sa_handler*: PtrProc;*)
sa_mask*: sigset_t;
sa_flags*: SET;
(* sa_restorer*: LONGINT; *) (* OpenBSD *)
@@ -730,14 +746,17 @@ MODULE LinLibc ["libc.so.66.0"];
(* PROCEDURE [ccall] __errno_location*(): INTEGER; *)
PROCEDURE [ccall] __errno_location* ["__errno"] (): INTEGER; (* OpenBSD *)
- (* OpenBSD *)
- PROCEDURE [ccall] mprotect* (addr: PtrVoid; len: size_t; prot: SET): INTEGER;
-
PROCEDURE [ccall] open* (path: PtrSTR; flags: SET; mode: mode_t): INTEGER;
PROCEDURE [ccall] close* (d: INTEGER): INTEGER;
PROCEDURE [ccall] read* (d: INTEGER; buf: PtrVoid; nbytes: size_t): ssize_t;
PROCEDURE [ccall] write* (d: INTEGER; buf: PtrVoid; nBytes: size_t): ssize_t;
+ (* OpenBSD *)
+ PROCEDURE [ccall] mprotect* (addr: PtrVoid; len: size_t; prot: SET): INTEGER;
+
+ (* OpenBSD 5.2 *)
+ PROCEDURE [ccall] madvise* (addr: PtrVoid; len: size_t; behav: INTEGER): INTEGER;
+
PROCEDURE [ccall] mmap* (addr: PtrVoid; len: size_t; prot: SET; flags: SET; fd: INTEGER; offset: off_t): PtrVoid;
PROCEDURE [ccall] munmap* (addr: PtrVoid; len: size_t): INTEGER;
@@ -752,9 +771,8 @@ MODULE LinLibc ["libc.so.66.0"];
(* OpenBSD 5.2 *)
PROCEDURE [ccall] sysconf* (name: INTEGER): INTEGER;
- (* OpenBSD 5.2 *)
- PROCEDURE [ccall] madvise* (addr: PtrVoid; len: size_t; behav: INTEGER): INTEGER;
-
PROCEDURE [ccall] sigaltstack* (VAR [nil] ss: sigaltstack_t; VAR [nil] oss: sigaltstack_t): INTEGER;
+ PROCEDURE [ccall] sigreturn* (ucontext_t: Ptrucontext_t): INTEGER;
+
END LinLibc.

0 comments on commit 4aa4a1b

Please sign in to comment.
Something went wrong with that request. Please try again.