aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-12-05 01:11:02 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-12-05 01:11:02 +0000
commit9cf3cb7c2599ac56386b600146f494c2eb2370b3 (patch)
treea56e30aefb8fb77466cc2a27a28b9f8347559dbf
parent4526e5eccb78947d0d54c7470aa5b2e187bb515e (diff)
downloadgcc-9cf3cb7c2599ac56386b600146f494c2eb2370b3.zip
gcc-9cf3cb7c2599ac56386b600146f494c2eb2370b3.tar.gz
gcc-9cf3cb7c2599ac56386b600146f494c2eb2370b3.tar.bz2
syscall: remove Flock for aix/ppc64
CL 152397 removed it from gc's syscall package. Updates golang/go#29084 Reviewed-on: https://go-review.googlesource.com/c/152557 From-SVN: r266812
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--libgo/go/syscall/libcall_aix.go22
2 files changed, 1 insertions, 23 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 558f713..7693242 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-7259d9a403db2784c7d03239c6a50e730062fc61
+d3a98b7a9ea8032be22ebb3ea2f389ce22669d53
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/go/syscall/libcall_aix.go b/libgo/go/syscall/libcall_aix.go
index 5afc65e..072f92a 100644
--- a/libgo/go/syscall/libcall_aix.go
+++ b/libgo/go/syscall/libcall_aix.go
@@ -111,28 +111,6 @@ func Reboot(how int) (err error) {
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//fchownat(dirfd _C_int, path *byte, owner Uid_t, group Gid_t, flags _C_int) _C_int
-// On AIX, there is no flock() system call, we emulate it.
-func Flock(fd int, op int) (err error) {
- lk := &Flock_t{}
- if (op & LOCK_UN) != 0 {
- lk.Type = F_UNLCK
- } else if (op & LOCK_EX) != 0 {
- lk.Type = F_WRLCK
- } else if (op & LOCK_SH) != 0 {
- lk.Type = F_RDLCK
- } else {
- return nil
- }
- if (op & LOCK_NB) != 0 {
- err = FcntlFlock(uintptr(fd), F_SETLK, lk)
- if err != nil && (err == EAGAIN || err == EACCES) {
- return EWOULDBLOCK
- }
- return err
- }
- return FcntlFlock(uintptr(fd), F_SETLKW, lk)
-}
-
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
//fstatfs64(fd _C_int, buf *Statfs_t) _C_int