Also use the Ubuntu 17.10 docker image and additionally install bison
which is needed by the glibc build.
The resulting change only consists of a few additional constants.
Exclude the X86_CR3_PCID_NOFLUSH constant on 386 and amd64, though.
Change-Id: I0a9b8959146273ff3b259c17bb616625a9ac8278
Reviewed-on: https://go-review.googlesource.com/96255
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Add rudimentary godoc for all existing Sockaddr* types implementing the
Sockaddr interface.
Change-Id: Ida7d1e8756477b54fc773f4bc978002c3d4a376d
Reviewed-on: https://go-review.googlesource.com/89775
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Copy zsyscall_plan9_arm.go from syscall and add asm_plan9_arm.s which
just contains jumps to the corresponding syscall functions.
Change-Id: I0eed6449c622ae3f6e73abcb43edfd306e96753f
Reviewed-on: https://go-review.googlesource.com/89795
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
CL 87555 added the AT_STATX_* constants which are garbled on linux/s390x due
to the replacement regex in mkpost.go being too broad. Adjust the regex to
only match on word boundaries.
Change-Id: I898547fbbbc5d02965e86300e9144fb65207ab33
Reviewed-on: https://go-review.googlesource.com/87876
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
statx(2) allows to get enhanced file status information (not currently
available through the existing stat syscalls), lightweight stat,
heavyweight stat. The Statx_t type used by Statx has consistent field
sizes on all arches (with year-2038-capable timestamps) and is closer to
the BSD implementation of Stat_t.
See http://man7.org/linux/man-pages/man2/statx.2.html for details. The
syscall was added in Linux kernel 4.11.
See https://github.com/tklauser/statx for an example of how this
function and types can be used to report stat(1)-like file status
information.
Change-Id: I9e9642b5b42a393f94fd532453888ce9ba4f0003
Reviewed-on: https://go-review.googlesource.com/87555
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Unsetenv was in its own file for Go 1.4 compatibility. This version is
no longer supported, so move Unsetenv with the other environment
specific functions.
Change-Id: I8b6621993f2ab0fbafe900b19dcaee7b5b3ed26f
Reviewed-on: https://go-review.googlesource.com/86540
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Unsetenv was in its own file for Go 1.4 compatibility. This version is
no longer supported, so move Unsetenv with the other environment
specific functions.
Change-Id: I63d67e2a9e4d7651be79c2e72a7f27fe0fac68c4
Reviewed-on: https://go-review.googlesource.com/86539
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Unsetenv was in its own file for Go 1.4 compatibility. This version is
no longer supported, so move Unsetenv with the other environment
specific functions.
Change-Id: I81ed5182297598a7b3859711211ec8ef194bbe9a
Reviewed-on: https://go-review.googlesource.com/86538
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The var e error declaration is shadowed inside the for loop, so the
outer e always stays nil. Also, there is no need to reset the inner e in
case of EPERM, as it is reset by ExattrList* on the next iteration
anyhow.
Change-Id: Ib395e34b5a390a5d37bee334c44f6f87d3add2a0
Reviewed-on: https://go-review.googlesource.com/85295
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
As suggested by Brad in CL 83275.
From what I can tell getsockopt syscall on these OSes doesn't return
ERANGE in any case, so these versions don't include the buffer growing.
Change-Id: I667c3751021e26defec0a04761a689fa4b78c65d
Reviewed-on: https://go-review.googlesource.com/84016
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
All BSDs provide the SYS___GETCWD syscall which can be used to implement
Getwd.
Also add a test based on TestChdirAndGetwd from os/os_test.go
Change-Id: I243eae3e02a40e92afad317eb1f8a28b6032c131
Reviewed-on: https://go-review.googlesource.com/83755
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
The Utsname members are only 32 bytes on Dragonfly and the syscall
returns ENOMEM in case the value is longer than that. Like uname(3)
on Dragonfly, handle this case gracefully and just truncate the
value.
Change-Id: If617af1b6831cff6d4245f498dad9f264b8fd118
Reviewed-on: https://go-review.googlesource.com/82155
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Looks like it's enough to just add wrappers pointing to the
corresponding SYS_FSTATAT{,64} or SYS_NEWFSTATAT syscall. Add a test to
verify that assumption which checks that the returned stat data matches
what is returned by Stat/Lstat.
Also add the AT_NO_AUTOMOUNT constant which may be used for the flags
parmeter.
Fixesgolang/go#14216
Change-Id: I73f27b483bd97d2dcf09d4b95a7957e75d194395
Reviewed-on: https://go-review.googlesource.com/79795
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
dragonfly/386 isn't a valid GOOS/GOARCH pair and there are no generated
files for this pair in x/sys/unix.
Follows CL 79675 which did the same for syscall.
Change-Id: Ie70937b464fa911a43c26515bcac1c03740dc1fe
Reviewed-on: https://go-review.googlesource.com/79676
Reviewed-by: Ian Lance Taylor <iant@golang.org>