os: use opendir64 and closedir64 on AIX
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 12 May 2017 00:59:15 +0000 (00:59 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 12 May 2017 00:59:15 +0000 (00:59 +0000)
    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

gcc/go/gofrontend/MERGE
libgo/go/os/dir_gccgo.go
libgo/go/os/dir_libc64_gccgo.go [new file with mode: 0644]
libgo/go/os/dir_libc_gccgo.go [new file with mode: 0644]

index a0e661bd61bc5eda9c1ebfee1912d8088c204a09..27f42275e0d75a50024e883fae19a923f5db2086 100644 (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.
index 8923f0e47ae45e42778d022c447560b266edfd20..f66064670df779d759245bef79b35eb906a17998 100644 (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
diff --git a/libgo/go/os/dir_libc64_gccgo.go b/libgo/go/os/dir_libc64_gccgo.go
new file mode 100644 (file)
index 0000000..95d4663
--- /dev/null
@@ -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 (file)
index 0000000..1ee253c
--- /dev/null
@@ -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