File: constants.lua

package info (click to toggle)
lua-ljsyscall 0.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,732 kB
  • sloc: ansic: 434; sh: 59; makefile: 3
file content (30 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- Documentation of constants

-- Currently taken from FreeBSD man pages, so need Linux/NetBSD/OSX specific ones added

local d = {}

d.O = {
  RDONLY       = "open for reading only",
  WRONLY       = "open for writing only",
  RDWR         = "open for reading and writing",
  EXEC         = "open for execute only",
  NONBLOCK     = "do not block on open",
  APPEND       = "append on each write",
  CREAT        = "create file if it does not exist",
  TRUNC        = "truncate size to 0",
  EXCL         = "error if create and file exists",
  SHLOCK       = "atomically obtain a shared lock",
  EXLOCK       = "atomically obtain an exclusive lock",
  DIRECT       = "eliminate or reduce cache effects",
  FSYNC        = "synchronous writes",
  SYNC         = "synchronous writes",
  NOFOLLOW     = "do not follow symlinks",
  NOCTTY       = "don't assign controlling terminal",
  TTY_INIT     = "restore default terminal attributes",
  DIRECTORY    = "error if file is not a directory",
  CLOEXEC      = "set FD_CLOEXEC upon open", -- TODO should be hyperlink
}

return d