1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:40:21 -07:00

syscall: add S_IRWXG and S_IRWXO on DragonflyBSD

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>
This commit is contained in:
Tobias Klauser 2018-08-21 08:28:16 +02:00 committed by Tobias Klauser
parent 1040626c0c
commit e8daca4c48
2 changed files with 4 additions and 0 deletions

View 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

View 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 {