Ada bindings to IEEE Std 1003.1-2008 POSIX
License
io7m/coreland-posix-ada
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
FILES errno.map - Contains list of errno names specified by POSIX. Second field is a brief description of the value (ignored by compilation). errno_to_ada.map - Contains mapping of errno names to Ada Error_t values. errno_to_int.map - Generated by errno_to_int.sh. Contains mapping of errno names to integer values on the current system. DESCRIPTION A mapping is specified from POSIX errno names to an enumerated Ada type (Error_t). An enumerated type is used in preference of individual constants to allow static checking of case values ("have I handled all possible error conditions appropriately?"). All values of Error_t are prefixed with 'Error_' to help avoid namespace pollution. A function is provied to map a given Error_t value to a system-specific POSIX errno value: function Errno_To_Ada (Value : in Error_t) return Interfaces.C.int; In order to retrieve error messages for Error_t values, it is necessary to convert Error_t back to a system-specific integer value in order to pass the value to a message catalogue of locale-specific messages. A function is provided to map a given POSIX errno value to an Ada Error_t value: function Ada_To_Errno (Value : in Interfaces.C.int) return Error_t; IMPLEMENTATION Values of POSIX errno names are not guaranteed to be consistent across systems or distinct on any given system. The values of the set of POSIX errno names are discovered at compile time and written to errno_to_int.map. Both Error_t<->POSIX errno mapping functions are generated at compile time using the definitions in errno.map and errno_to_ada.map.
About
Ada bindings to IEEE Std 1003.1-2008 POSIX
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published