library patch: syscall, os environ

This commit is contained in:
xushiwei
2024-07-18 14:30:49 +08:00
parent f8bacfcc67
commit 3da3c8ecd8
7 changed files with 462 additions and 32 deletions

View File

@@ -73,14 +73,6 @@ func Getwd() (string, error) {
return "", Errno(os.Errno)
}
func Getenv(key string) (value string, found bool) {
ret := os.Getenv(c.AllocaCStr(key))
if ret != nil {
return c.GoString(ret), true
}
return "", false
}
func Getpid() (pid int) {
return int(os.Getpid())
}