From 0b8cebc1f074626f3c3e43a26152a3034ada7153 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 15 Nov 2021 15:10:35 -0800 Subject: Feat: prototype of self-hosted library This is very much a work in progress. Still ruminating on the structure of the library. It feels right but I want a more "social" presence - namely the ability to link to a libc seemlessly. The solution is most likely weak aliasing that musl uses - but musl itself weak aliases global symbols, e.g malloc. We would have to define weak internal symbols that musl defines as strong links but this knows too much about the internals of musl... --- sys/src/read.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sys/src/read.c (limited to 'sys/src/read.c') diff --git a/sys/src/read.c b/sys/src/read.c new file mode 100644 index 0000000..3aa3e29 --- /dev/null +++ b/sys/src/read.c @@ -0,0 +1,7 @@ +#include "internal.h" + +intptr +sys·read(int fd, intptr len, void *buf) +{ + return syscall(·Read, fd, buf, len); +} -- cgit v1.2.1