Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
syscall: should contain X_OK, R_OK & W_OK for use with syscall.Access() #6262
What steps will reproduce the problem? 1. write code like syscall.Access("foo", syscall.X_OK) 2. try to run "go run a.go" 3. Get error: ./a.go:8: undefined: syscall.X_OK What is the expected output? Expect [RXW]_OK to exist. Otherwise how can syscall.Access() be used? What do you see instead? Compile error. Which compiler are you using (5g, 6g, 8g, gccgo)? whichever is the amd64 one. Which operating system are you using? Linux Which version are you using? (run 'go version') go version go1.1 linux/amd64 Please provide any additional information below. Filing bug as requested.
syscall.Access can be used because these constants are the same as the file permission bits. R_OK=4, W_OK=2, X_OK=1, F_OK=0, on all systems. People just wrote the numbers before POSIX came along and decided to name everything. Not critical, so leaving for Go 1.3.
Labels changed: added go1.3maybe, removed go1.2maybe.