summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/errno.h9
-rw-r--r--include/features.h2
-rw-r--r--include/grp.h2
-rw-r--r--include/pwd.h2
-rw-r--r--include/utmp.h2
5 files changed, 10 insertions, 7 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
diff --git a/include/features.h b/include/features.h
index 93c41d7a1..475d62a85 100644
--- a/include/features.h
+++ b/include/features.h
@@ -15,7 +15,7 @@
* their developers intended. This is IMHO, pardonable, since these defines
* are not really intended to check for the presence of a particular library,
* but rather are used to define an _interface_. */
-#if !defined __LIBC__ || defined __FORCE_GLIBC__
+#if !defined _LIBC || defined __FORCE_GLIBC__
# define __GNU_LIBRARY__ 6
# define __GLIBC__ 2
# define __GLIBC_MINOR__ 1
diff --git a/include/grp.h b/include/grp.h
index 96b2b4b65..4ecef44f0 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -27,7 +27,7 @@ extern int setgroups __P ((size_t n, __const gid_t * groups));
extern int initgroups __P ((__const char * user, gid_t gid));
-#ifdef __LIBC__
+#ifdef _LIBC
extern struct group * __getgrent __P ((int grp_fd));
#endif
diff --git a/include/pwd.h b/include/pwd.h
index 6cadcf38a..64d8bc6ef 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -47,7 +47,7 @@ extern int fgetpwent_r __P ((FILE *__restrict __stream,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result));
-#ifdef __LIBC__
+#ifdef _LIBC
/* This is used internally to uClibc */
extern int __getpwent_r(struct passwd * passwd, char * line_buff,
size_t buflen, int pwd_fd);
diff --git a/include/utmp.h b/include/utmp.h
index 102af2f6c..c98caa5ce 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -45,7 +45,7 @@ extern struct utmp * getutline __P ((struct utmp *));
extern struct utmp * pututline __P ((struct utmp *));
extern void endutent __P ((void));
-#ifdef __LIBC__
+#ifdef _LIBC
struct utmp * __getutent __P ((int));
#endif