blob: b3c8e3301ce61c7b11150e749a59596b3ac58ff6 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001// 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
5// +build aix
6// +build ppc
7
8package unix
9
10//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
11//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
12//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
13
14//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
15
16func setTimespec(sec, nsec int64) Timespec {
17 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
18}
19
20func setTimeval(sec, usec int64) Timeval {
21 return Timeval{Sec: int32(sec), Usec: int32(usec)}
22}
23
24func (iov *Iovec) SetLen(length int) {
25 iov.Len = uint32(length)
26}
27
28func (msghdr *Msghdr) SetControllen(length int) {
29 msghdr.Controllen = uint32(length)
30}
31
32func (msghdr *Msghdr) SetIovlen(length int) {
33 msghdr.Iovlen = int32(length)
34}
35
36func (cmsg *Cmsghdr) SetLen(length int) {
37 cmsg.Len = uint32(length)
38}
39
40func Fstat(fd int, stat *Stat_t) error {
41 return fstat(fd, stat)
42}
43
44func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
45 return fstatat(dirfd, path, stat, flags)
46}
47
48func Lstat(path string, stat *Stat_t) error {
49 return lstat(path, stat)
50}
51
52func Stat(path string, statptr *Stat_t) error {
53 return stat(path, statptr)
54}