Update dependencies and remove old matterclient lib (#2067)
This commit is contained in:
39
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
39
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
@@ -277,11 +277,7 @@ var localtime time.Tm
|
||||
|
||||
// struct tm *localtime(const time_t *timep);
|
||||
func Xlocaltime(_ *TLS, timep uintptr) uintptr {
|
||||
loc := gotime.Local
|
||||
if r := getenv(Environ(), "TZ"); r != 0 {
|
||||
zone, off := parseZone(GoString(r))
|
||||
loc = gotime.FixedZone(zone, -off)
|
||||
}
|
||||
loc := getLocalLocation()
|
||||
ut := *(*time.Time_t)(unsafe.Pointer(timep))
|
||||
t := gotime.Unix(int64(ut), 0).In(loc)
|
||||
localtime.Ftm_sec = int32(t.Second())
|
||||
@@ -298,11 +294,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr {
|
||||
|
||||
// struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||
func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
|
||||
loc := gotime.Local
|
||||
if r := getenv(Environ(), "TZ"); r != 0 {
|
||||
zone, off := parseZone(GoString(r))
|
||||
loc = gotime.FixedZone(zone, -off)
|
||||
}
|
||||
loc := getLocalLocation()
|
||||
ut := *(*time_t)(unsafe.Pointer(timep))
|
||||
t := gotime.Unix(int64(ut), 0).In(loc)
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second())
|
||||
@@ -1534,33 +1526,6 @@ func fcntlCmdStr(cmd int32) string {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// ssize_t pread(int fd, void *buf, size_t count, off_t offset);
|
||||
func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
|
||||
var n int
|
||||
var err error
|
||||
switch {
|
||||
case count == 0:
|
||||
n, err = unix.Pread(int(fd), nil, int64(offset))
|
||||
default:
|
||||
n, err = unix.Pread(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
|
||||
if dmesgs && err == nil {
|
||||
dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n]))
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
|
||||
func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
|
||||
var n int
|
||||
|
||||
Reference in New Issue
Block a user