]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/mmap: use syscall.Mmap on solaris
authorTobias Klauser <tklauser@distanz.ch>
Mon, 15 Aug 2022 08:52:48 +0000 (10:52 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 16 Aug 2022 05:09:57 +0000 (05:09 +0000)
Now that syscall.Mmap is defined on solaris (see CL 413374), use it in
mmapFile like on other Unix ports.

For #52875

Change-Id: Ic5c5a84da8613f0c6dc947a52b7fcca50af43d79
Reviewed-on: https://go-review.googlesource.com/c/go/+/413375
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/mmap/mmap_plan9.go [moved from src/cmd/go/internal/mmap/mmap_other.go with 93% similarity]
src/cmd/go/internal/mmap/mmap_unix.go

similarity index 93%
rename from src/cmd/go/internal/mmap/mmap_other.go
rename to src/cmd/go/internal/mmap/mmap_plan9.go
index 269fe8d60ab666c0846fa32b45a6a665ae0c3ce7..faa5d5fc665e106c29deffadbe6251275a5d2171 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build plan9 || solaris
-
 package mmap
 
 import (
index 33e839c217a3c358aced2fd2b8580acab1aa0334..53bcbb92a8ebb230be997077b2609049acfb3a29 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build unix && !solaris
+//go:build unix
 
 package mmap