Fix "PR c++/92804 ICE trying to use concept as a nested-name-specifier"
[official-gcc.git] / libgo / go / syscall / syscall_glibc.go
blobb40f297facb210644c6ea8eb1b4dce84bb9f6f37
1 // Copyright 2009 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.
5 // +build hurd linux
7 package syscall
9 import "unsafe"
11 func rawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
12 r1, r2, _ = RawSyscall(trap, a1, a2, a3)
13 return
16 func direntIno(buf []byte) (uint64, bool) {
17 return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
20 func direntReclen(buf []byte) (uint64, bool) {
21 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
24 func direntNamlen(buf []byte) (uint64, bool) {
25 reclen, ok := direntReclen(buf)
26 if !ok {
27 return 0, false
29 return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true