WASI & darwin: support basic file io based on libc

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2021-03-18 12:53:32 +09:00
committed by Ron Evans
parent 6d3c11627c
commit 1406453350
16 changed files with 390 additions and 84 deletions
+3 -5
View File
@@ -2,8 +2,6 @@
package syscall
import "errors"
// A Signal is a number describing a process signal.
// It implements the os.Signal interface.
type Signal int
@@ -32,7 +30,6 @@ const (
O_RDWR = 2
O_CREAT = 0100
O_CREATE = O_CREAT
O_TRUNC = 01000
O_APPEND = 02000
O_EXCL = 0200
@@ -41,8 +38,9 @@ const (
O_CLOEXEC = 0
)
var dummyError = errors.New("unknown syscall error")
//go:extern errno
var libcErrno uintptr
func getErrno() error {
return dummyError
return Errno(libcErrno)
}