From 478c451ff9df56681c9e011ecd28b329a23995b9 Mon Sep 17 00:00:00 2001 From: Ivan Denisov Date: Mon, 27 Mar 2017 10:03:37 +0700 Subject: [PATCH] add system and popen to Libc interface --- .../_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ | 4 ++++ BlackBox/_FreeBSD_/Lin/Mod/Libc.txt | 3 +++ BlackBox/_Linux_/Lin/Mod/Libc.txt | 5 ++++- BlackBox/_OpenBSD_/Lin/Mod/Libc.txt | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ b/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ index b367b0b..08993f4 100644 --- a/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ +++ b/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-Libc/Libc.txt.templ @@ -223,4 +223,8 @@ MODULE LinLibc ["libc.so%%libver%%"]; (* POSIX.1 *) PROCEDURE [ccall] sysconf* (name: int): long; + PROCEDURE [ccall] system* (cmd: PtrSTR): INTEGER; + PROCEDURE [ccall] popen* (cmd, mode: PtrSTR): INTEGER; + + END LinLibc. diff --git a/BlackBox/_FreeBSD_/Lin/Mod/Libc.txt b/BlackBox/_FreeBSD_/Lin/Mod/Libc.txt index 431e603..d05f602 100644 --- a/BlackBox/_FreeBSD_/Lin/Mod/Libc.txt +++ b/BlackBox/_FreeBSD_/Lin/Mod/Libc.txt @@ -691,4 +691,7 @@ MODULE LinLibc ["libc.so.7"]; (* POSIX.1 *) PROCEDURE [ccall] sysconf* (name: int): long; + PROCEDURE [ccall] system* (cmd: PtrSTR): INTEGER; + PROCEDURE [ccall] popen* (cmd, mode: PtrSTR): INTEGER; + END LinLibc. diff --git a/BlackBox/_Linux_/Lin/Mod/Libc.txt b/BlackBox/_Linux_/Lin/Mod/Libc.txt index feab677..b5b5767 100644 --- a/BlackBox/_Linux_/Lin/Mod/Libc.txt +++ b/BlackBox/_Linux_/Lin/Mod/Libc.txt @@ -472,5 +472,8 @@ MODULE LinLibc ["libc.so.6"]; PROCEDURE [ccall] sigaltstack* (VAR [nil] ss: stack_t; VAR [nil] oss: stack_t): INTEGER; PROCEDURE [ccall] sigprocmask* (how: INTEGER; set: Ptrsigset_t; oldset: Ptrsigset_t): INTEGER; + + PROCEDURE [ccall] system* (cmd: PtrSTR): INTEGER; + PROCEDURE [ccall] popen* (cmd, mode: PtrSTR): INTEGER; -END LinLibc. \ No newline at end of file +END LinLibc. diff --git a/BlackBox/_OpenBSD_/Lin/Mod/Libc.txt b/BlackBox/_OpenBSD_/Lin/Mod/Libc.txt index b2d0251..e2f84e3 100644 --- a/BlackBox/_OpenBSD_/Lin/Mod/Libc.txt +++ b/BlackBox/_OpenBSD_/Lin/Mod/Libc.txt @@ -691,4 +691,7 @@ MODULE LinLibc ["libc.so.89.2"]; (* POSIX.1 *) PROCEDURE [ccall] sysconf* (name: int): long; + PROCEDURE [ccall] system* (cmd: PtrSTR): INTEGER; + PROCEDURE [ccall] popen* (cmd, mode: PtrSTR): INTEGER; + END LinLibc. -- 2.29.2