From acd17e9b2b9740ea374ec18bcc7a4cd488eb534c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 14 Dec 2017 11:59:33 +0100 Subject: syscall: support Getwd on all BSDs All supported BSDs provide the SYS___GETCWD syscall which can be used to implement syscall.Getwd. With this change os.Getwd can use a single syscall instead of falling back to the current kludge solution on the BSDs. This doesn't add any new exported functions to the frozen syscall package, only ImplementsGetwd changes to true for dragonfly, freebsd, netbsd and openbsd. As suggested by Ian, this follows CL 83755 which did the same for golang.org/x/sys/unix. Also, an entry for netbsd/arm is added to mkall.sh which was used to generate the syscall wrappers there. Change-Id: I84da1ec61a6b8625443699a63cde556b6442ad41 Reviewed-on: https://go-review.googlesource.com/84484 Reviewed-by: Ian Lance Taylor --- api/except.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'api') diff --git a/api/except.txt b/api/except.txt index f8cd0faf64..ea4fa0eb9d 100644 --- a/api/except.txt +++ b/api/except.txt @@ -15,25 +15,30 @@ pkg syscall (darwin-amd64-cgo), func Fchflags(string, int) error pkg syscall (freebsd-386), const AF_MAX = 38 pkg syscall (freebsd-386), const DLT_MATCHING_MAX = 242 pkg syscall (freebsd-386), const ELAST = 94 +pkg syscall (freebsd-386), const ImplementsGetwd = false pkg syscall (freebsd-386), const O_CLOEXEC = 0 pkg syscall (freebsd-386), func Fchflags(string, int) error pkg syscall (freebsd-386-cgo), const AF_MAX = 38 pkg syscall (freebsd-386-cgo), const DLT_MATCHING_MAX = 242 pkg syscall (freebsd-386-cgo), const ELAST = 94 +pkg syscall (freebsd-386-cgo), const ImplementsGetwd = false pkg syscall (freebsd-386-cgo), const O_CLOEXEC = 0 pkg syscall (freebsd-amd64), const AF_MAX = 38 pkg syscall (freebsd-amd64), const DLT_MATCHING_MAX = 242 pkg syscall (freebsd-amd64), const ELAST = 94 +pkg syscall (freebsd-amd64), const ImplementsGetwd = false pkg syscall (freebsd-amd64), const O_CLOEXEC = 0 pkg syscall (freebsd-amd64), func Fchflags(string, int) error pkg syscall (freebsd-amd64-cgo), const AF_MAX = 38 pkg syscall (freebsd-amd64-cgo), const DLT_MATCHING_MAX = 242 pkg syscall (freebsd-amd64-cgo), const ELAST = 94 +pkg syscall (freebsd-amd64-cgo), const ImplementsGetwd = false pkg syscall (freebsd-amd64-cgo), const O_CLOEXEC = 0 pkg syscall (freebsd-arm), const AF_MAX = 38 pkg syscall (freebsd-arm), const BIOCGRTIMEOUT = 1074545262 pkg syscall (freebsd-arm), const BIOCSRTIMEOUT = 2148287085 pkg syscall (freebsd-arm), const ELAST = 94 +pkg syscall (freebsd-arm), const ImplementsGetwd = false pkg syscall (freebsd-arm), const O_CLOEXEC = 0 pkg syscall (freebsd-arm), const SIOCAIFADDR = 2151967019 pkg syscall (freebsd-arm), const SIOCGIFSTATUS = 3274991931 @@ -65,6 +70,7 @@ pkg syscall (freebsd-arm-cgo), const AF_MAX = 38 pkg syscall (freebsd-arm-cgo), const BIOCGRTIMEOUT = 1074545262 pkg syscall (freebsd-arm-cgo), const BIOCSRTIMEOUT = 2148287085 pkg syscall (freebsd-arm-cgo), const ELAST = 94 +pkg syscall (freebsd-arm-cgo), const ImplementsGetwd = false pkg syscall (freebsd-arm-cgo), const O_CLOEXEC = 0 pkg syscall (freebsd-arm-cgo), const SIOCAIFADDR = 2151967019 pkg syscall (freebsd-arm-cgo), const SIOCGIFSTATUS = 3274991931 @@ -98,6 +104,12 @@ pkg syscall (linux-amd64), type Cmsghdr struct, X__cmsg_data [0]uint8 pkg syscall (linux-amd64-cgo), type Cmsghdr struct, X__cmsg_data [0]uint8 pkg syscall (linux-arm), type Cmsghdr struct, X__cmsg_data [0]uint8 pkg syscall (linux-arm-cgo), type Cmsghdr struct, X__cmsg_data [0]uint8 +pkg syscall (netbsd-386), const ImplementsGetwd = false +pkg syscall (netbsd-386-cgo), const ImplementsGetwd = false +pkg syscall (netbsd-amd64), const ImplementsGetwd = false +pkg syscall (netbsd-amd64-cgo), const ImplementsGetwd = false +pkg syscall (netbsd-arm), const ImplementsGetwd = false +pkg syscall (netbsd-arm-cgo), const ImplementsGetwd = false pkg syscall (netbsd-arm), const SizeofIfData = 132 pkg syscall (netbsd-arm), func Fchflags(string, int) error pkg syscall (netbsd-arm), type IfMsghdr struct, Pad_cgo_1 [4]uint8 @@ -106,6 +118,7 @@ pkg syscall (netbsd-arm-cgo), func Fchflags(string, int) error pkg syscall (netbsd-arm-cgo), type IfMsghdr struct, Pad_cgo_1 [4]uint8 pkg syscall (openbsd-386), const BIOCGRTIMEOUT = 1074283118 pkg syscall (openbsd-386), const BIOCSRTIMEOUT = 2148024941 +pkg syscall (openbsd-386), const ImplementsGetwd = false pkg syscall (openbsd-386), const RTF_FMASK = 63496 pkg syscall (openbsd-386), const RTM_VERSION = 4 pkg syscall (openbsd-386), const SIOCBRDGDADDR = 2150132039 @@ -158,6 +171,7 @@ pkg syscall (openbsd-386), type Timespec struct, Sec int32 pkg syscall (openbsd-386), type Timeval struct, Sec int32 pkg syscall (openbsd-386-cgo), const BIOCGRTIMEOUT = 1074283118 pkg syscall (openbsd-386-cgo), const BIOCSRTIMEOUT = 2148024941 +pkg syscall (openbsd-386-cgo), const ImplementsGetwd = false pkg syscall (openbsd-386-cgo), const RTF_FMASK = 63496 pkg syscall (openbsd-386-cgo), const RTM_VERSION = 4 pkg syscall (openbsd-386-cgo), const SIOCBRDGDADDR = 2150132039 @@ -220,6 +234,7 @@ pkg syscall (openbsd-amd64), const EFER_NXE = 2048 pkg syscall (openbsd-amd64), const EFER_NXE ideal-int pkg syscall (openbsd-amd64), const EFER_SCE = 1 pkg syscall (openbsd-amd64), const EFER_SCE ideal-int +pkg syscall (openbsd-amd64), const ImplementsGetwd = false pkg syscall (openbsd-amd64), const PMC5_PIPELINE_FLUSH = 21 pkg syscall (openbsd-amd64), const PMC5_PIPELINE_FLUSH ideal-int pkg syscall (openbsd-amd64), const RTF_FMASK = 63496 @@ -282,6 +297,7 @@ pkg syscall (openbsd-amd64-cgo), const EFER_NXE = 2048 pkg syscall (openbsd-amd64-cgo), const EFER_NXE ideal-int pkg syscall (openbsd-amd64-cgo), const EFER_SCE = 1 pkg syscall (openbsd-amd64-cgo), const EFER_SCE ideal-int +pkg syscall (openbsd-amd64-cgo), const ImplementsGetwd = false pkg syscall (openbsd-amd64-cgo), const PMC5_PIPELINE_FLUSH = 21 pkg syscall (openbsd-amd64-cgo), const PMC5_PIPELINE_FLUSH ideal-int pkg syscall (openbsd-amd64-cgo), const RTF_FMASK = 63496 -- cgit v1.3