]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add S_IRWXG and S_IRWXO on DragonflyBSD
authorTobias Klauser <tklauser@distanz.ch>
Tue, 21 Aug 2018 06:28:16 +0000 (08:28 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 21 Aug 2018 14:08:12 +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 DragonflyBSD (and
OpenBSD, in a separate CL) as well.

Change-Id: I708c60f75f787a410bdfa4ceebd2825874e92511
Reviewed-on: https://go-review.googlesource.com/130335
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_dragonfly.go
src/syscall/ztypes_dragonfly_amd64.go

index 0c060d932ece8c4007623787936c3b6bd55af965..53bc12403b2fabd67f17af855ede52a9c6cb87c2 100644 (file)
@@ -113,6 +113,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 1cb860822854371a28425e6af816b88a93fdc9ce..e9e811f77643b6653d069d1f464b9ec00e512909 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 {