c/syscall/unix
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
|
||||
package exec
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"github.com/goplus/llgo/c/syscall/unix"
|
||||
)
|
||||
|
||||
func unixEaccess(path string, mode uint32) error {
|
||||
return syscall.Faccessat(AT_FDCWD, path, mode, AT_EACCESS)
|
||||
return syscall.Faccessat(unix.AT_FDCWD, path, mode, unix.AT_EACCESS)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package os
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
@@ -173,7 +172,10 @@ func (d *unixDirent) Info() (FileInfo, error) {
|
||||
}
|
||||
|
||||
func (d *unixDirent) String() string {
|
||||
/* TODO(xsw):
|
||||
return fs.FormatDirEntry(d)
|
||||
*/
|
||||
panic("todo: os.unixDirent.String")
|
||||
}
|
||||
|
||||
/* TODO(xsw):
|
||||
|
||||
16
internal/lib/syscall/syscall_linux.go
Normal file
16
internal/lib/syscall/syscall_linux.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Linux system calls.
|
||||
// This file is compiled as ordinary Go code,
|
||||
// but it is also input to mksyscall,
|
||||
// which parses the //sys lines and generates system call stubs.
|
||||
// Note that sometimes we use a lowercase //sys name and
|
||||
// wrap it in our own nicer implementation.
|
||||
|
||||
package syscall
|
||||
|
||||
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
panic("todo: syscall.Faccessat")
|
||||
}
|
||||
Reference in New Issue
Block a user