diff options
Diffstat (limited to 'src/errno')
| -rw-r--r-- | src/errno/EDOM.c | 10 | ||||
| -rw-r--r-- | src/errno/EILSEQ.c | 7 | ||||
| -rw-r--r-- | src/errno/ERANGE.c | 9 | ||||
| -rw-r--r-- | src/errno/__errno.c | 8 | ||||
| -rw-r--r-- | src/errno/errno.c | 23 |
5 files changed, 57 insertions, 0 deletions
diff --git a/src/errno/EDOM.c b/src/errno/EDOM.c new file mode 100644 index 00000000..927df956 --- /dev/null +++ b/src/errno/EDOM.c @@ -0,0 +1,10 @@ +#include <errno.h> +#define EDOM (1) +/** domain error **/ +/*** +is used to indicate that an argument supplied to a function is outside the +defined input domain. +***/ +/* +STDC(1) +*/ diff --git a/src/errno/EILSEQ.c b/src/errno/EILSEQ.c new file mode 100644 index 00000000..cb8f42e7 --- /dev/null +++ b/src/errno/EILSEQ.c @@ -0,0 +1,7 @@ +#include <errno.h> +#define EILSEQ (3) +/** Illegal sequence / Illegal byte sequence **/ + +/* +STDC(199409) +*/ diff --git a/src/errno/ERANGE.c b/src/errno/ERANGE.c new file mode 100644 index 00000000..70b47572 --- /dev/null +++ b/src/errno/ERANGE.c @@ -0,0 +1,9 @@ +#include <errno.h> +#define ERANGE (2) +/** out of range **/ +/*** +used to indicated that the result of an operation is too large or too small. +***/ +/* +STDC(1) +*/ diff --git a/src/errno/__errno.c b/src/errno/__errno.c new file mode 100644 index 00000000..c46c86c7 --- /dev/null +++ b/src/errno/__errno.c @@ -0,0 +1,8 @@ +#include <errno.h> +#include "nonstd/internal.h" + +int *__errno(void) +{ + return __libc(ERRNO); +} + diff --git a/src/errno/errno.c b/src/errno/errno.c new file mode 100644 index 00000000..007526b8 --- /dev/null +++ b/src/errno/errno.c @@ -0,0 +1,23 @@ +#include <errno.h> +#define errno (*__errno()) + +/** get system errors **/ + +/*** +is a modifiable lvalue of type TYPE(int) which is used to +indicate errors in standard library functions. It may be a macro or an +identifier with external linkage. It is initialized to 0 at program start, +but no function in the standard library will set it to 0. Library functions +may set it to a non-zero value if its use is not documented in their +description. +***/ + +/* +UNSPECIFIED(Whether THIS() is declared as a macro or an identifier with external linkage (C89, C95, and C99 only)) +UNDEFINED(A macro definition of THIS() is suppressed) +UNDEFINED(A program defines an identifier named THIS()) +*/ + +/* +STDC(1) +*/ |
