You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

syscall_aix_ppc.go 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build aix && ppc
  5. package unix
  6. //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
  7. //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
  8. //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
  9. func setTimespec(sec, nsec int64) Timespec {
  10. return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
  11. }
  12. func setTimeval(sec, usec int64) Timeval {
  13. return Timeval{Sec: int32(sec), Usec: int32(usec)}
  14. }
  15. func (iov *Iovec) SetLen(length int) {
  16. iov.Len = uint32(length)
  17. }
  18. func (msghdr *Msghdr) SetControllen(length int) {
  19. msghdr.Controllen = uint32(length)
  20. }
  21. func (msghdr *Msghdr) SetIovlen(length int) {
  22. msghdr.Iovlen = int32(length)
  23. }
  24. func (cmsg *Cmsghdr) SetLen(length int) {
  25. cmsg.Len = uint32(length)
  26. }
  27. func Fstat(fd int, stat *Stat_t) error {
  28. return fstat(fd, stat)
  29. }
  30. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
  31. return fstatat(dirfd, path, stat, flags)
  32. }
  33. func Lstat(path string, stat *Stat_t) error {
  34. return lstat(path, stat)
  35. }
  36. func Stat(path string, statptr *Stat_t) error {
  37. return stat(path, statptr)
  38. }