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 31 32 33 34 35 36 37 38
|
-- arm64 specific constants
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
local abi = require "syscall.abi"
local octal = function (s) return tonumber(s, 8) end
local arch = {}
arch.O = {
RDONLY = octal('0000'),
WRONLY = octal('0001'),
RDWR = octal('0002'),
ACCMODE = octal('0003'),
CREAT = octal('0100'),
EXCL = octal('0200'),
NOCTTY = octal('0400'),
TRUNC = octal('01000'),
APPEND = octal('02000'),
NONBLOCK = octal('04000'),
DSYNC = octal('010000'),
ASYNC = octal('020000'),
DIRECTORY = octal('040000'),
NOFOLLOW = octal('0100000'),
DIRECT = octal('0200000'),
LARGEFILE = octal('0400000'),
NOATIME = octal('01000000'),
CLOEXEC = octal('02000000'),
SYNC = octal('04010000'),
}
return arch
|