]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add S_IRWXG and S_IRWXO on OpenBSD
authorTobias Klauser <tklauser@distanz.ch>
Tue, 21 Aug 2018 06:31:38 +0000 (08:31 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 21 Aug 2018 14:08:25 +0000 (14:08 +0000)
As discussed in CL 126621, these constants are already defined on Linux,
Darwin, FreeBSD and NetBSD. In order to ensure portability of existing
code using the syscall package, provide them for OpenBSD (and
DragonflyBSD, in a separate CL) as well.

Change-Id: Ia9e07cb01f989d144a620d268daa8ec946788861
Reviewed-on: https://go-review.googlesource.com/130336
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/types_openbsd.go
src/syscall/ztypes_openbsd_386.go
src/syscall/ztypes_openbsd_amd64.go
src/syscall/ztypes_openbsd_arm.go

index 93456c31a0c29597a5f2a13aecb15474ea000354..922864815bc7d0cddf29493bbf397c675cbeb650 100644 (file)
@@ -114,6 +114,8 @@ const ( // Directory mode bits
        S_IRUSR  = C.S_IRUSR
        S_IWUSR  = C.S_IWUSR
        S_IXUSR  = C.S_IXUSR
+       S_IRWXG  = C.S_IRWXG
+       S_IRWXO  = C.S_IRWXO
 )
 
 type Stat_t C.struct_stat
index 04d53966f4609d87d664602c99b88d8d181462ff..c2a03ebdd807949793682a9e691b44c8620f0a62 100644 (file)
@@ -71,6 +71,8 @@ const (
        S_IRUSR  = 0x100
        S_IWUSR  = 0x80
        S_IXUSR  = 0x40
+       S_IRWXG  = 0x38
+       S_IRWXO  = 0x7
 )
 
 type Stat_t struct {
index aad787a3e497b7c140c5112860422bb95e6fbf21..1a659ba2feacbea8fcb5d0806aaff6d10d25c8ff 100644 (file)
@@ -71,6 +71,8 @@ const (
        S_IRUSR  = 0x100
        S_IWUSR  = 0x80
        S_IXUSR  = 0x40
+       S_IRWXG  = 0x38
+       S_IRWXO  = 0x7
 )
 
 type Stat_t struct {
index 4383b68eae23094f6b600cd56e3cc9668e07fa87..e75043f2c67ceb2e6ae496eb0dc963ee847d66cd 100644 (file)
@@ -71,6 +71,8 @@ const (
        S_IRUSR  = 0x100
        S_IWUSR  = 0x80
        S_IXUSR  = 0x40
+       S_IRWXG  = 0x38
+       S_IRWXO  = 0x7
 )
 
 type Stat_t struct {