package unix-errno

  1. Overview
  2. Docs
Unix errno types, maps, and support

Install

Dune Dependency

Authors

Maintainers

Sources

unix-errno-0.6.2.tbz
sha256=2d6a9bc86731b3a7ff15c38fa3725847753e00bd091de5828868ee621c71ad65
sha512=3f820834fe4dcc246e777a3e4b9d19c85dcccf87aa77b7b9e3a59e5080f6094dc059d5d035831e82cc3efc4c20065422e3299cb44ff49674b7b0a3139fd15ba7

Description

unix-errno can be used with or without ctypes and OCaml's Unix module. Without ctypes and Unix, the basic types and functions are provided as well as Errno_host containing errno maps for popular operating systems. The errno-srcgen tool for generating OCaml source representing Errno.Host.t values will also be built. With ctypes and Unix, you'll also receive the errno-map tool for outputting the current host's errno map and the Errno_unix module containing an errno global variable checking function and Unix.error type converters.

README

ocaml-unix-errno

ocaml-unix-errno provides an errno variant similar to Unix.error but including POSIX 2008, Linux, OS X, and FreeBSD constructors. A macro definition type, defns is also provided in order to transport a specific errno-integer map as is the case with FUSE or 9p2000.u. The types and their functions reside in Errno and are independent of any Unix bindings. This makes the library's types usable from MirageOS on top of Xen. Errno_unix provides maps to and from Unix.error, the present host's errno map, an errno exception Error, and higher-order errno checking functions.

The executable errno-map will output a tab-delimited map from errno macro name to integer. This map can then be read back using the function Errno.defns_of_string.

Dependencies (5)

  1. integers
  2. ctypes >= "0.12.0"
  3. result
  4. dune >= "2.8"
  5. ocaml >= "4.03.0"

Dev Dependencies (1)

  1. alcotest with-test

Conflicts

None

OCaml

Innovation. Community. Security.