Skip to content

Commit e8b3292

Browse files
author
ian
committed
syscall: enable ParseDirent for AIX
Reviewed-on: https://go-review.googlesource.com/64990 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253022 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 664ac49 commit e8b3292

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

gcc/go/gofrontend/MERGE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
84f827669dc76326ed99ebcc982c482aa148d8d8
1+
5deeab42b0e5fdf2721773ce7fdaf61716599d4d
22

33
The first line of this file holds the git revision number of the last
44
merge done from the gofrontend repository.

libgo/go/syscall/dirent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
5+
// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
66

77
package syscall
88

libgo/go/syscall/syscall_aix.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2017 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+
package syscall
6+
7+
import "unsafe"
8+
9+
func direntIno(buf []byte) (uint64, bool) {
10+
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
11+
}
12+
13+
func direntReclen(buf []byte) (uint64, bool) {
14+
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
15+
}
16+
17+
func direntNamlen(buf []byte) (uint64, bool) {
18+
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
19+
}

libgo/mksysinfo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ fi | sed -e 's/type _dirent64/type Dirent/' \
485485
-e 's/d_name/Name/' \
486486
-e 's/]int8/]byte/' \
487487
-e 's/d_ino/Ino/' \
488+
-e 's/d_namlen/Namlen/' \
488489
-e 's/d_off/Off/' \
489490
-e 's/d_reclen/Reclen/' \
490491
-e 's/d_type/Type/' \

0 commit comments

Comments
 (0)