mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 21:33:01 -06:00
Update dependencies (#333)
This commit is contained in:
parent
ce22e03f9d
commit
182b4eea73
848 changed files with 377869 additions and 107280 deletions
48
vendor/modernc.org/libc/libc_unix.go
generated
vendored
48
vendor/modernc.org/libc/libc_unix.go
generated
vendored
|
|
@ -2,15 +2,17 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux || darwin || freebsd
|
||||
// +build linux darwin freebsd
|
||||
//go:build linux || darwin || freebsd || netbsd
|
||||
// +build linux darwin freebsd netbsd
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
gosignal "os/signal"
|
||||
"reflect"
|
||||
"strings"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
|
|
@ -217,3 +219,45 @@ func Xgetresuid(t *TLS, ruid, euid, suid uintptr) int32 {
|
|||
func Xgetresgid(t *TLS, rgid, egid, sgid uintptr) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// FILE *tmpfile(void);
|
||||
func Xtmpfile(t *TLS) uintptr {
|
||||
f, err := ioutil.TempFile("", "tmpfile-")
|
||||
if err != nil {
|
||||
t.setErrno(err)
|
||||
return 0
|
||||
}
|
||||
|
||||
cf := newFile(t, int32(f.Fd()))
|
||||
AtExit(func() {
|
||||
nm := f.Name()
|
||||
file(cf).close(t)
|
||||
os.Remove(nm)
|
||||
})
|
||||
|
||||
return cf
|
||||
}
|
||||
|
||||
// FILE *fdopen(int fd, const char *mode);
|
||||
func Xfdopen(t *TLS, fd int32, mode uintptr) uintptr {
|
||||
m := strings.ReplaceAll(GoString(mode), "b", "")
|
||||
switch m {
|
||||
case
|
||||
"a",
|
||||
"a+",
|
||||
"r",
|
||||
"r+",
|
||||
"w",
|
||||
"w+":
|
||||
default:
|
||||
t.setErrno(errno.EINVAL)
|
||||
return 0
|
||||
}
|
||||
|
||||
if p := newFile(t, fd); p != 0 {
|
||||
return p
|
||||
}
|
||||
|
||||
t.setErrno(errno.EINVAL)
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue