diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-02-08 18:42:39 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-02-08 18:42:39 -0500 |
commit | 7ef8a7379f7f7d09e71ccae2a0b688c3cd80423f (patch) | |
tree | 092ab0aed1769117fd7b28b8592f6f96b0e0d5af /src/errno | |
parent | 6acf19370e8adff79cd83b257d3f04aeaf2a59dd (diff) |
merge sources into single tree
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) +*/ |