diff options
Diffstat (limited to 'system/include/libc/errno.h')
-rw-r--r-- | system/include/libc/errno.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/system/include/libc/errno.h b/system/include/libc/errno.h index 7cc2ca86..0361b33a 100644 --- a/system/include/libc/errno.h +++ b/system/include/libc/errno.h @@ -1,11 +1,27 @@ -#ifndef __ERRNO_H__ -#define __ERRNO_H__ +#ifndef _ERRNO_H +#define _ERRNO_H -#ifndef __error_t_defined -typedef int error_t; -#define __error_t_defined 1 +#ifdef __cplusplus +extern "C" { #endif -#include <sys/errno.h> +#include <features.h> + +#include <bits/errno.h> + +#ifdef __GNUC__ +__attribute__((const)) +#endif +int *__errno_location(void); +#define errno (*__errno_location()) + +#ifdef _GNU_SOURCE +extern char *program_invocation_short_name, *program_invocation_name; +#endif + +#ifdef __cplusplus +} +#endif + +#endif -#endif /* !__ERRNO_H__ */ |