summaryrefslogtreecommitdiff
path: root/include/errno.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-06 20:28:45 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-06 20:28:45 +0000
commit6278781655261a5011376b2fa2600996e32ca889 (patch)
tree11783e71b36c8c546c4dc02dff355b0f2478978b /include/errno.h
parenta704ccaa5232184844cd67315951b39f85a6ba04 (diff)
Fix include/errno.h to not use kernel header, and instead use bits/errno.h.
This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik
Diffstat (limited to 'include/errno.h')
-rw-r--r--include/errno.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/errno.h b/include/errno.h
index f96590c2e..da7f7a0e4 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -1,8 +1,8 @@
-#ifndef __ERRNO_H
-#define __ERRNO_H
+#ifndef _ERRNO_H
+#define _ERRNO_H
#include <features.h>
-#include <linux/errno.h>
+#include <bits/errno.h>
extern int sys_nerr;
extern const char *const sys_errlist[];
@@ -10,8 +10,11 @@ extern const char *const sys_errlist[];
#define _sys_nerr sys_nerr
#define _sys_errlist sys_errlist
+#ifndef errno
extern int errno;
+#endif
extern void perror __P ((__const char* __s));
extern char* strerror __P ((int __errno));
+
#endif