]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: use goarch.BigEndian
authorTobias Klauser <tklauser@distanz.ch>
Tue, 5 Mar 2024 09:56:01 +0000 (10:56 +0100)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 01:59:07 +0000 (01:59 +0000)
Change-Id: I99e5f6fab900b0bf301f78460c618c01b231f62b
Reviewed-on: https://go-review.googlesource.com/c/go/+/568956
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/syscall/dirent.go
src/syscall/endian_big.go [deleted file]
src/syscall/endian_little.go [deleted file]

index 1a0f1eec11bf3dc6db993b552828c4a1f5c468e4..a9eab15736fbbdb2b5bacd26afd753f9a7688f4c 100644 (file)
@@ -7,6 +7,7 @@
 package syscall
 
 import (
+       "internal/goarch"
        "runtime"
        "unsafe"
 )
@@ -16,7 +17,7 @@ func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
        if len(b) < int(off+size) {
                return 0, false
        }
-       if isBigEndian {
+       if goarch.BigEndian {
                return readIntBE(b[off:], size), true
        }
        return readIntLE(b[off:], size), true
diff --git a/src/syscall/endian_big.go b/src/syscall/endian_big.go
deleted file mode 100644 (file)
index 8e3874e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 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.
-//
-//go:build ppc64 || s390x || mips || mips64
-
-package syscall
-
-const isBigEndian = true
diff --git a/src/syscall/endian_little.go b/src/syscall/endian_little.go
deleted file mode 100644 (file)
index f5fcb58..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 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.
-//
-//go:build 386 || amd64 || arm || arm64 || loong64 || ppc64le || mips64le || mipsle || riscv64 || wasm
-
-package syscall
-
-const isBigEndian = false