---@meta posix.stdlib

---@class posix_stdlib*
---@field version string
---@type posix_stdlib*
local M = {}

function M.abort() end

---@param name string
---@return string? value
function M.getenv(name) end

---@param fd integer
---@return integer? ok
---@return string? errMsg
---@return integer? errno
function M.grantpt(fd) end

---@param template string
---@return string? path
---@return string? errMsg
---@return integer? errno
function M.mkdtemp(template) end

---@param template string
---@return integer? fd
---@return string? pathOrErr
---@return integer? errno
function M.mkstemp(template) end

---@param flags integer
---@return integer? fd
---@return string? errMsg
---@return integer? errno
function M.openpt(flags) end

---@param fd integer
---@return string? name
---@return string? errMsg
---@return integer? errno
function M.ptsname(fd) end

---@param path string
---@return string? path
---@return string? errMsg
---@return integer? errno
function M.realpath(path) end

---@param name string
---@param value string
---@param overwrite? boolean
---@return integer? ok
---@return string? errMsg
---@return integer? errno
function M.setenv(name, value, overwrite) end

---@param fd integer
---@return integer? ok
---@return string? errMsg
---@return integer? errno
function M.unlockpt(fd) end

return M
