X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Trurl-based%2F_OpenBSD_%2FLin%2FMod%2FLibc.txt;h=c6e699dbc162257003a413417648970c4e321e42;hb=321130719c55f61b48aa3bb09ee3622c27ee55cb;hp=e8a9294cc841870a29a65281fd715ffe2745fff1;hpb=02a3486a4adb7964c73018e2702ae19e0811e06e;p=bbcp.git diff --git a/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt b/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt index e8a9294..c6e699d 100644 --- a/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt +++ b/Trurl-based/_OpenBSD_/Lin/Mod/Libc.txt @@ -1,7 +1,7 @@ MODULE LinLibc ["libc.so.66.0"]; (* - A. V. Shiryaev, 2012.09 + A. V. Shiryaev, 2012.11 Based on Linux' LinLibc (OpenBUGS Lin/Mod/Libc.odc) @@ -35,7 +35,7 @@ MODULE LinLibc ["libc.so.66.0"]; SIG_IGN* = 1; (* Ignore signal. *) SIG_HOLD* = 3; (* Add signal to hold mask. *) (* OpenBSD 5.2 /usr/include/sys/signalvar.h *) - (* Signals. *) + (* Signals. *) (* OpenBSD /usr/include/sys/signal.h *) _NSIG* = 33; (* counting 0 (mask is 1-32) *) SIGHUP* = 1; (* hangup *) @@ -68,20 +68,21 @@ MODULE LinLibc ["libc.so.66.0"]; SIGWINCH* = 28; (* window size changes *) SIGTHR* = 32; (* thread library AST *) + (* Bits in `sa_flags'. *) + SA_NOCLDSTOP* = {3}; (* do not generate SIGCHLD on child stop *) + SA_ONSTACK* = {0}; (* take signal on signal stack *) + SA_RESTART* = {1}; (* restart system on signal return *) + SA_RESETHAND* = {2}; (* reset to SIG_DFL when taking signal *) + SA_NODEFER* = {4}; (* don't mask the signal we're delivering *) + SA_NOCLDWAIT* = {5}; (* don't create zombies (assign to pid 1) *) + SA_SIGINFO* = {6}; (* generate siginfo_t *) - (* Bits in `sa_flags'. *) - SA_NOCLDSTOP* = {3}; (* = 1 Don't send SIGCHLD when children stop. *) (* OpenBSD *) - SA_NOCLDWAIT* = {5}; (* = 2 Don't create zombie on child death. *) (* OpenBSD *) - SA_SIGINFO* = {6}; (* = 4 Invoke signal-catching function wth three arguments instead of one. *) (* OpenBSD *) - SA_ONSTACK* = {0}; (* = 0x08000000 Use signal stack by using `sa_restorer'. *) (* OpenBSD *) - SA_RESTART* = {1}; (* = 0x10000000 Restart syscall on signal return. *) (* OpenBSD *) - SA_NODEFER* = {4}; (* = 0x40000000 Don't automatically block the signal when its handler is being executed. *) (* OpenBSD *) - SA_RESETHAND* = {2}; (* = 0x80000000 Reset to SIG_DFL on entry to handler. *) (* OpenBSD *) - (* SA_INTERRUPT* = {29}; (* = 0x20000000 Historical no-op. *) *) (* OpenBSD *) (* Some aliases for the SA_ constants. *) +(* SA_NOMASK* = SA_NODEFER; SA_ONESHOT* = SA_RESETHAND; SA_STACK* = SA_ONSTACK; +*) (* code values for siginfo_t.si_code *) (* OpenBSD /usr/include/sys/siginfo.h *) @@ -109,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 *) @@ -178,29 +179,61 @@ 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 *) _JBLEN = 10; (* OpenBSD 5.2 /usr/include/sys/mman.h *) - PROT_NONE* = {}; (* no permission *) + MAP_FAILED* = -1; + PROT_NONE* = {}; (* no permissions *) PROT_READ* = {0}; (* pages can be read *) PROT_WRITE* = {1}; (* pages can be written *) PROT_EXEC* = {2}; (* pages can be executed *) - - (* OpenBSD 5.2 /usr/include/sys/mman.h *) - MAP_FILE* = {}; (* map from file (default) *) - MAP_ANON* = {12}; (* allocated from memory, swap space *) + MAP_SHARED* = {0}; (* share changes *) + MAP_PRIVATE* = {1}; (* changes are private *) + MAP_COPY* = {2}; (* "copy" region at mmap time *) MAP_FIXED* = {4}; (* map addr must be exactly as requested *) - MAP_HASSEMAPHORE* = {9}; (* region may contain semaphores *) + MAP_RENAME* = {5}; (* Sun: rename private pages to file *) + MAP_NORESERVE* = {6}; (* Sun: don't reserve needed swap area *) MAP_INHERIT* = {7}; (* region is retained after exec *) - MAP_PRIVATE* = {1}; (* changes are private *) - MAP_SHARED* = {0}; (* share changes *) + MAP_NOEXTEND* = {8}; (* for MAP_FILE, don't change file size *) + MAP_HASSEMAPHORE* = {9}; (* region may contain semaphores *) MAP_TRYFIXED* = {10}; (* attempt hint address, even within heap *) - MAP_COPY* = {2}; (* "copy" region at mmap time *) + MAP_FILE* = {}; (* map from file (default) *) + MAP_ANON* = {12}; (* allocated from memory, swap space *) + MAP_FLAGMASK* = {0..2,4..12}; + MAP_INHERIT_SHARE* = {}; (* share with child *) + MAP_INHERIT_COPY* = {0}; (* copy into child *) + MAP_INHERIT_NONE* = {1}; (* absent from child *) - MAP_FAILED* = -1; (* OpenBSD 5.2 /usr/include/i386/param.h *) PAGE_SHIFT* = 12; @@ -208,22 +241,26 @@ MODULE LinLibc ["libc.so.66.0"]; PAGE_MASK* = PAGE_SIZE - 1; (* OpenBSD 5.2: /usr/include/fcntl.h *) - O_RDONLY* = {}; - O_WRONLY* = {0}; - O_RDWR* = {1}; - O_ACCMODE* = {0,1}; - - O_NONBLOCK* = {2}; (* Do not block on open or for data to become available *) - O_APPEND* = {3}; (* Append on each write *) - O_CREAT* = {9}; (* Create file if it does not exist *) - O_TRUNC* = {10}; (* Truncate size to 0 *) - O_EXCL* = {11}; (* Error if create and file exists *) - O_SYNC* = {7}; (* Perform synchronous I/O operations *) - O_SHLOCK* = {4}; (* Atomically obtain a shared lock *) - O_EXLOCK* = {5}; (* Atomically obtain an exclusive lock *) - O_NOFOLLOW* = {8}; (* If last path element is a symlink, don't follow it *) - O_CLOEXEC* = {16}; (* Set FD_CLOEXEC on the new file descriptor *) - O_DIRECTORY* = {17}; (* Error if path does not name a directory *) + O_SHLOCK* = {4}; (* open with shared file lock *) + O_EXLOCK* = {5}; (* open with exclusive file lock *) + O_ASYNC* = {6}; (* signal pgrp when data ready *) + O_NOFOLLOW* = {8}; (* if path is a symlink, don't follow *) + O_SYNC* = {7}; (* synchronous writes *) + O_RDONLY* = {}; (* open for reading only *) + O_WRONLY* = {0}; (* open for writing only *) + O_RDWR* = {1}; (* open for reading and writing *) + O_ACCMODE* = {0,1}; (* mask for above modes *) + O_NONBLOCK* = {2}; (* no delay *) + O_APPEND* = {3}; (* set append mode *) + O_CREAT* = {9}; (* create if nonexistent *) + O_TRUNC* = {10}; (* truncate to zero length *) + O_EXCL* = {11}; (* error if already exists *) + O_DSYNC* = O_SYNC; (* synchronous data writes *) + O_RSYNC* = O_SYNC; (* synchronous reads *) + O_NOCTTY* = {15}; (* don't assign controlling terminal *) + O_CLOEXEC* = {16}; (* atomically set FD_CLOEXEC *) + O_DIRECTORY* = {17}; (* fail if not a directory *) + (* OpenBSD 5.2 /usr/include/unistd.h *) _SC_ARG_MAX* = 1; @@ -382,6 +419,7 @@ MODULE LinLibc ["libc.so.66.0"]; SIG_UNBLOCK* = 2; (* unblock specified signal set *) SIG_SETMASK* = 3; (* set specified signal set *) + TYPE (* OpenBSD OK *) __ftw_func_t* = PROCEDURE (fileName: PtrSTR; VAR [nil] stat: stat_t; flag: INTEGER): INTEGER; (* OpenBSD 5.2: OK *)