---@meta posix.stdio

---@class posix_stdio*
---@field version string
---@field _IOFBF integer
---@field _IOLBF integer
---@field _IONBF integer
---@field BUFSIZ integer
---@field EOF integer
---@field FOPEN_MAX integer
---@field FILENAME_MAX integer
---@type posix_stdio*
local M = {}

---@return string? name
function M.ctermid() end

---@param file file*
---@return integer? fd
---@return string? errMsg
---@return integer? errno
function M.fileno(file) end

---@param fd integer
---@param mode string
---@return file*? file
---@return string? errMsg
---@return integer? errno
function M.fdopen(fd, mode) end

---@param oldpath string
---@param newpath string
---@return integer? ok
---@return string? errMsg
---@return integer? errno
function M.rename(oldpath, newpath) end

return M
