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

From-SVN: r247947
This commit is contained in:
Ian Lance Taylor 2017-05-12 00:59:15 +00:00
parent 2d82ec25dc
commit b3a7fdc3ea
4 changed files with 31 additions and 7 deletions

View File

@ -1,4 +1,4 @@
619848ccd463ac385e9912df008e7e8e6301a284
fc3d6af694c518d73a126bcbd90d79982524f9f6
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.

View File

@ -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

View File

@ -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

View File

@ -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