diff --git a/src/syscall/syscall_aix.go b/src/syscall/syscall_aix.go index ea88c666bec..186522bdde7 100644 --- a/src/syscall/syscall_aix.go +++ b/src/syscall/syscall_aix.go @@ -601,6 +601,7 @@ func PtraceDetach(pid int) (err error) { return ptrace64(PT_DETACH, int64(pid), //sysnb Setpgid(pid int, pgid int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error) //sys Symlink(path string, link string) (err error) diff --git a/src/syscall/types_aix.go b/src/syscall/types_aix.go index b961bdb197e..ee9380a6736 100644 --- a/src/syscall/types_aix.go +++ b/src/syscall/types_aix.go @@ -26,6 +26,7 @@ package syscall #include #include +#include #include #include @@ -170,3 +171,7 @@ const ( _AT_REMOVEDIR = C.AT_REMOVEDIR _AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW ) + +// Terminal handling + +type Termios C.struct_termios diff --git a/src/syscall/zsyscall_aix_ppc64.go b/src/syscall/zsyscall_aix_ppc64.go index fe27dcadf28..7d01dc013c6 100644 --- a/src/syscall/zsyscall_aix_ppc64.go +++ b/src/syscall/zsyscall_aix_ppc64.go @@ -83,6 +83,7 @@ import "unsafe" //go:cgo_import_dynamic libc_Setpgid setpgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_Setregid setregid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_Setreuid setreuid "libc.a/shr_64.o" +//go:cgo_import_dynamic libc_Setrlimit setrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_Stat stat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_Statfs statfs "libc.a/shr_64.o" //go:cgo_import_dynamic libc_Symlink symlink "libc.a/shr_64.o" @@ -171,6 +172,7 @@ import "unsafe" //go:linkname libc_Setpgid libc_Setpgid //go:linkname libc_Setregid libc_Setregid //go:linkname libc_Setreuid libc_Setreuid +//go:linkname libc_Setrlimit libc_Setrlimit //go:linkname libc_Stat libc_Stat //go:linkname libc_Statfs libc_Statfs //go:linkname libc_Symlink libc_Symlink @@ -262,6 +264,7 @@ var ( libc_Setpgid, libc_Setregid, libc_Setreuid, + libc_Setrlimit, libc_Stat, libc_Statfs, libc_Symlink, @@ -1198,6 +1201,16 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := rawSyscall6(uintptr(unsafe.Pointer(&libc_Setrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Stat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/src/syscall/ztypes_aix_ppc64.go b/src/syscall/ztypes_aix_ppc64.go index 314266ea797..68810dbe7e6 100644 --- a/src/syscall/ztypes_aix_ppc64.go +++ b/src/syscall/ztypes_aix_ppc64.go @@ -79,28 +79,27 @@ type Flock_t struct { } type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink int16 - Flag uint16 - Uid uint32 - Gid uint32 - Rdev uint64 - Ssize int32 - Pad_cgo_0 [4]byte - Atim StTimespec_t - Mtim StTimespec_t - Ctim StTimespec_t - Blksize int64 - Blocks int64 - Vfstype int32 - Vfs uint32 - Type uint32 - Gen uint32 - Reserved [9]uint32 - Padto_ll uint32 - Size int64 + Dev uint64 + Ino uint64 + Mode uint32 + Nlink int16 + Flag uint16 + Uid uint32 + Gid uint32 + Rdev uint64 + Ssize int32 + Atim StTimespec_t + Mtim StTimespec_t + Ctim StTimespec_t + Blksize int64 + Blocks int64 + Vfstype int32 + Vfs uint32 + Type uint32 + Gen uint32 + Reserved [9]uint32 + Padto_ll uint32 + Size int64 } type Statfs_t struct { @@ -114,7 +113,6 @@ type Statfs_t struct { Ffree uint64 Fsid Fsid64_t Vfstype int32 - Pad_cgo_0 [4]byte Fsize uint64 Vfsnumber int32 Vfsoff int32 @@ -123,7 +121,7 @@ type Statfs_t struct { Fname [32]uint8 Fpack [32]uint8 Name_max int32 - Pad_cgo_1 [4]byte + Pad_cgo_0 [4]byte } type Fsid64_t struct { @@ -214,10 +212,8 @@ type Linger struct { type Msghdr struct { Name *byte Namelen uint32 - Pad_cgo_0 [4]byte Iov *Iovec Iovlen int32 - Pad_cgo_1 [4]byte Control *byte Controllen uint32 Flags int32 @@ -270,3 +266,11 @@ const ( _AT_REMOVEDIR = 0x1 _AT_SYMLINK_NOFOLLOW = 0x1 ) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [16]uint8 +}