summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4090be1)
raw | patch | inline | side by side (parent: 4090be1)
author | Alexander Shiryaev <aixp@mail.ru> | |
Fri, 6 Dec 2013 17:40:46 +0000 (21:40 +0400) | ||
committer | Alexander Shiryaev <aixp@mail.ru> | |
Fri, 6 Dec 2013 17:40:46 +0000 (21:40 +0400) |
index 26bf4ac831e7a7a5d4230d127dd7a89459fc73f1..7df4f73e3e71556fdeddd73142d4c332d47cb38f 100644 (file)
O_DIRECTORY* = {17}; (* fail if not a directory *)
+ CLOCK_REALTIME* = 0;
+ CLOCK_VIRTUAL* = 1;
+ CLOCK_PROCESS_CPUTIME_ID* = 2;
+ CLOCK_MONOTONIC* = 3;
+ CLOCK_THREAD_CPUTIME_ID* = 4;
+ CLOCK_UPTIME* = 5;
+
+
TYPE
StrArray* = POINTER TO ARRAY [untagged] OF PtrSTR;
PtrSTR* = POINTER TO ARRAY [untagged] OF SHORTCHAR;
ssize_t* = INTEGER;
off_t* = LONGINT;
clock_t* = LONGINT;
+ clockid_t* = INTEGER;
time_t* = LONGINT;
mode_t* = SET;
pid_t* = INTEGER;
d_name*: ARRAY [untagged] 255 + 1 OF SHORTCHAR;
END;
+ timespec_t* = RECORD [untagged]
+ (* OpenBSD 5.4 /usr/include/time.h *)
+ tv_sec*: time_t; (* seconds *)
+ tv_nsec*: long; (* and nanoseconds *)
+ END;
+
(*
VAR
stdin*: INTEGER;
(* ANSI C 89 *)
PROCEDURE [ccall] clock* (): clock_t;
+ (* POSIX.1 *)
+ PROCEDURE [ccall] clock_gettime* (clock_id: clockid_t; VAR tp: timespec_t): int;
+
PROCEDURE [ccall] mmap* (adr: PtrVoid; len: size_t; prot: intFlags; flags: intFlags; fd: int; offset: off_t): PtrVoid;
(* BSD *)
PROCEDURE [ccall] munmap* (adr: PtrVoid; len: size_t): int;
index 87f675119f38755b4c239954871722ef15631498..8e8d081d58308a2c73e6a1a854bb73b51408dc87 100644 (file)
PY = python2.7
-DEFS = clockspersec defs-map defs-prot defs-sigmask nsig defs-signo defs-fpe defs-sa defs-errno namemax defs-fcntlo defs-basictypes defs-sc
+DEFS = clockspersec defs-map defs-prot defs-sigmask nsig defs-signo defs-fpe defs-sa defs-errno namemax defs-fcntlo defs-basictypes defs-sc defs-clockid
all: Libc.txt ${DEFS} strerrnocase.txt
-Libc.txt: Libc.txt.templ ${DEFS} libver osname machine custom fields-dirent fields-sigaction fields-siginfo fields-stack fields-stat fields-tm fields-ucontext
+Libc.txt: Libc.txt.templ ${DEFS} libver osname machine custom fields-dirent fields-sigaction fields-siginfo fields-stack fields-stat fields-tm fields-ucontext fields-timespec
${PY} ./untempl.py Libc.txt.templ ${.TARGET}
clockspersec:
defs-sc:
./dumpdefs.py 2 1 i ${INCDIR}/unistd.h | grep _SC_ > ${.TARGET}
+defs-clockid:
+ ./dumpdefs.py 2 1 i ${INCDIR}/sys/_time.h | grep CLOCK_ > ${.TARGET}
+
#defs-madv:
# ./dumpdefs.py 2 0 i ${INCDIR}/sys/mman.h | grep MADV > ${.TARGET}
# ./dumpdefs.py 2 1 i ${INCDIR}/sys/mman.h | grep MADV >> ${.TARGET}
diff --git a/new/_OpenBSD_/Lin/Mod/gen-Libc/fields-timespec b/new/_OpenBSD_/Lin/Mod/gen-Libc/fields-timespec
--- /dev/null
@@ -0,0 +1,3 @@
+ (* OpenBSD 5.4 /usr/include/time.h *)
+ tv_sec*: time_t; (* seconds *)
+ tv_nsec*: long; (* and nanoseconds *)
\ No newline at end of file
index ac3b9255ff4a27cd7216d99b413a0d9ab80a4d6a..b2ad10d85d4e755ce7aebcda13b4ae5615897d67 100644 (file)
#include <setjmp.h>
#include <stdlib.h>
#include <stdio.h>
+#include <time.h>
#define TABS "\t\t"
D("ssize_t", sizeof(ssize_t), FALSE, TRUE);
D("off_t", sizeof(off_t), FALSE, TRUE);
D("clock_t", sizeof(clock_t), FALSE, TRUE);
+ D("clockid_t", sizeof(clockid_t), FALSE, TRUE);
D("time_t", sizeof(time_t), FALSE, TRUE);
D("mode_t", sizeof(mode_t), TRUE, TRUE);
D("pid_t", sizeof(pid_t), FALSE, TRUE);
index ca87b4d782b923b73538b416b54987658fc366f5..fc065a2d539d4a00231ff6eb9df46e048c3e729d 100644 (file)
Binary files a/new/_OpenBSD_/System/Mod/Kernel.odc and b/new/_OpenBSD_/System/Mod/Kernel.odc differ
Binary files a/new/_OpenBSD_/System/Mod/Kernel.odc and b/new/_OpenBSD_/System/Mod/Kernel.odc differ
diff --git a/new/_OpenBSD_/libBB.so b/new/_OpenBSD_/libBB.so
index 8771d75c4410ff1182a9e147f150f83248683d17..62b54f7b1c9854587eef94bc8f87185c44e89843 100644 (file)
Binary files a/new/_OpenBSD_/libBB.so and b/new/_OpenBSD_/libBB.so differ
Binary files a/new/_OpenBSD_/libBB.so and b/new/_OpenBSD_/libBB.so differ
index 005132419ed0e3430e3eaf2390f5a8d524cc585e..aac734ed6e0e17bc54928f51841850227ca489a8 100644 (file)
Binary files a/new/_OpenBSD_/libBB0.so and b/new/_OpenBSD_/libBB0.so differ
Binary files a/new/_OpenBSD_/libBB0.so and b/new/_OpenBSD_/libBB0.so differ