From 8642817a1a1d69c31059535024a5c3f02b5b176f Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 19 Mar 2015 20:22:08 -0700 Subject: [PATCH] unix: Add [RWX]_OK constants for Access POSIX defines [FRWX]_OK flags as the second arg to access() (Access() here). Only F_OK was defined heretofore. This adds the missing [RWX]_OK constants. Fixes golang/go#6262 Change-Id: Ie96273db19aa21af92c46affea9509afe0efe63f Reviewed-on: https://go-review.googlesource.com/7852 Reviewed-by: Brad Fitzpatrick --- unix/constants.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 unix/constants.go diff --git a/unix/constants.go b/unix/constants.go new file mode 100644 index 00000000..a96f0ebc --- /dev/null +++ b/unix/constants.go @@ -0,0 +1,13 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +const ( + R_OK = 0x4 + W_OK = 0x2 + X_OK = 0x1 +)