diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-12 00:59:15 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-12 00:59:15 +0000 |
commit | 939aa06fb0f3db908e2683b6fd4a99a0b9346c9e (patch) | |
tree | 002ab5a68d9c1394e2acc105df1a0bb41a87ba50 /libgo | |
parent | 2d5afa6108df1ea80bb3806cc15c9375d14f4f5b (diff) | |
download | gcc-939aa06fb0f3db908e2683b6fd4a99a0b9346c9e.tar.gz |
os: use opendir64 and closedir64 on AIX
When using readdir64 on AIX, we must also use
opendir64 and closedir64.
Issue golang/go#19200
Reviewed-on: https://go-review.googlesource.com/43251
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/os/dir_gccgo.go | 6 | ||||
-rw-r--r-- | libgo/go/os/dir_libc64_gccgo.go | 15 | ||||
-rw-r--r-- | libgo/go/os/dir_libc_gccgo.go | 15 |
3 files changed, 30 insertions, 6 deletions
diff --git a/libgo/go/os/dir_gccgo.go b/libgo/go/os/dir_gccgo.go index 8923f0e47ae..f66064670df 100644 --- a/libgo/go/os/dir_gccgo.go +++ b/libgo/go/os/dir_gccgo.go @@ -12,12 +12,6 @@ import ( "unsafe" ) -//extern opendir -func libc_opendir(*byte) *syscall.DIR - -//extern closedir -func libc_closedir(*syscall.DIR) int - // FIXME: pathconf returns long, not int. //extern pathconf func libc_pathconf(*byte, int) int diff --git a/libgo/go/os/dir_libc64_gccgo.go b/libgo/go/os/dir_libc64_gccgo.go new file mode 100644 index 00000000000..95d46634c17 --- /dev/null +++ b/libgo/go/os/dir_libc64_gccgo.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build aix + +package os + +import "syscall" + +//extern opendir64 +func libc_opendir(*byte) *syscall.DIR + +//extern closedir64 +func libc_closedir(*syscall.DIR) int diff --git a/libgo/go/os/dir_libc_gccgo.go b/libgo/go/os/dir_libc_gccgo.go new file mode 100644 index 00000000000..1ee253c2a77 --- /dev/null +++ b/libgo/go/os/dir_libc_gccgo.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !aix + +package os + +import "syscall" + +//extern opendir +func libc_opendir(*byte) *syscall.DIR + +//extern closedir +func libc_closedir(*syscall.DIR) int |