Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
billofarrell 5640770f5e unix: add support for zos/s390x
This adds sys/unix support for zos/s390x.
These changes should not affect other platforms.

Fixes golang/go#43230

Change-Id: If1c1d9df134fbc44f95ca1b214e836508696da93
Reviewed-on: https://go-review.googlesource.com/c/sys/+/275992
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-24 23:11:01 +00:00
Russ Cox 9a76102bfb all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
2021-02-20 05:07:31 +00:00
Tobias Klauser 3e7259c5e7 unix: don't use 32-bit aligned access for cmsgAlignOf on dragonfly after ABI change
Use 32-bit alignment for versions before the September 2019 ABI changes
http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html

Follows CL 201977 which did the same for package syscall.

Updates golang/go#34958

Change-Id: I0e13fccf6563e4d34dd4aa7410be044881f220aa
Reviewed-on: https://go-review.googlesource.com/c/sys/+/202179
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-10-20 21:24:54 +00:00
Tobias Klauser 727590c500 unix: avoid "just past the end" pointers in UnixRights
Same as CL 201617 did for package syscall.

Caught with -d=checkptr

Updates golang/go#22218

Change-Id: I8208f8e6d9bd62376bf9e0458dc18956daabd785
Reviewed-on: https://go-review.googlesource.com/c/sys/+/201937
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Elias Naur <mail@eliasnaur.com>
2019-10-18 09:52:05 +00:00
Brad Fitzpatrick 3ef323f4f1 unix: add illumos case
From CL 174457 which modified this file's vendored copy in the "go"
repo.

Updates golang/go#20603

Change-Id: Ic89b2e772120a08ac0fa3a56acb93a8ee96ba337
Reviewed-on: https://go-review.googlesource.com/c/sys/+/174958
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-05-02 14:57:24 +00:00
Tobias Klauser 12500544f8 unix: fix cmsg alignment on aix
This was missing from CL 171941.

Change-Id: I14f16355b2fe18103d2713faf2bebf004248fc0c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/172257
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-04-16 15:28:02 +00:00
Benny Siegert a34e9553db unix: use 64-bit alignment on netbsd-arm
This is the same change as CL 164458.
netbsd-arm needs the same override to the alignment function as
openbsd-arm. This fixes the TestPassFD failure.

Update golang/go#24771

Change-Id: I9c6451feb11ec9810de9273b1324b0c23d7e6d11
Reviewed-on: https://go-review.googlesource.com/c/164497
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-02-28 12:41:57 +00:00
Tobias Klauser 73d4af5aa0 unix: evaluate cmsg alignment in cmsgAlignOf at compile time
runtime.GOOS and runtime.GOARCH are constants, thus all comparisons are
evaluated at compile time.

Follow-up for CL 153619 to make the code consistent with the syscall
package, cf. CL 153837

Change-Id: I0520d88c1636c6ed2acad69fce85a28042eafe56
Reviewed-on: https://go-review.googlesource.com/c/153937
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-12-13 08:13:44 +00:00
Joel Sing b05ddf5780 unix: use correct cmsg alignment for openbsd/arm
The OpenBSD armv7 port requires 64-bit alignment for cmsgs.

Rework the cmsg alignment code to facilitate this.

Change-Id: Ie3eae1d367e2f3ac200fa8b78e97a2eb2eccae6a
Reviewed-on: https://go-review.googlesource.com/c/153619
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-12 12:00:07 +00:00
Tobias Klauser 8469e31483 unix: export sizeof consts
Export the sizeof(Ptr|Short|Int|Long|LongLong) consts. This allows users
to get this information (e.g. for alignment purposes) without using cgo
or generating these constants themselves.

Change-Id: I8640482bf67b89c2f2b6e9a116ba7bc268f8135a
Reviewed-on: https://go-review.googlesource.com/c/139617
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-04 14:53:25 +00:00
Tony Reix d99a578cf4 unix: code for AIX ppc and ppc64, for gccgo
Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-08-28 06:51:06 +00:00
Mikio Hara 9c9d83fe39 unix: fix Send{msg,msgN}, Recvmsg and control message handling on solaris
This is a backport of https://go-review.googlesource.com/30171.

Updates golang/go#7402.

Change-Id: I4e79570964c248ec52acf14d0ed8306e52073a51
Reviewed-on: https://go-review.googlesource.com/43212
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-11 21:48:29 +00:00
Damien Neil c8bc69bc2d unix: fix uint64->int cast of control message header
Change-Id: I533233a08472b686d03573bcbae664c76919b18e
Reviewed-on: https://go-review.googlesource.com/22527
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-27 20:20:20 +00:00
Matthew Dempsky 354f231ae1 unix: fix vet warning in UnixRights
Same fix as golang.org/cl/15608 for package syscall.

Change-Id: I8de2369220e58140596325d7ea16c015aab90d1b
Reviewed-on: https://go-review.googlesource.com/15609
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-10-09 04:16:36 +00:00
Rob Pike 8442dd2c63 go.sys: update package names
Semi-automatic migration from package syscall to package {plan9,windows,unix}.
No builds attempted yet, but this gets a lot of noise behind us so subsequent
CLs will be more concise and easier to follow.
Subsequent CLs will have semantic content.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/121520043
2014-08-11 15:58:26 -07:00
Rob Pike 20acc5cf31 go.sys: copy files from syscall package to go.sys/{plan9,windows,unix}
This CL copies to each package of go.sys the files from syscall it will need.
Different directories have different files, but these:
        mkall.sh
        str.go
        syscall.go
        mksyscall.pl
        race.go
        race0.go
        syscall_test.go
are copied to all three.
No changes yet, these are just copies. They are not ready to use yet:
package names are wrong, for starters. But this clean copy will make
it easier to follow the changes as the packages are enabled.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126960043
2014-08-11 14:48:46 -07:00