aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/errno.h
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-08-04 00:32:45 +0800
committerAlon Zakai <alonzakai@gmail.com>2013-09-13 10:07:02 -0700
commit5c6e1633d218bd5b9c5077634829eb14d326308f (patch)
tree50a4fd55b51a0fab6506addf610a666afabaec9b /system/include/libc/errno.h
parent27d496610e0ef93c9805a6a1a77de3f053405c6b (diff)
Update libc headers to use musl headers.
Diffstat (limited to 'system/include/libc/errno.h')
-rw-r--r--system/include/libc/errno.h30
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__ */