summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2004-07-13 21:03:40 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2004-07-13 21:03:40 +0000
commit79acdfbd39f0127e25ba7aad63839b6455171e08 (patch)
tree62825670c1162f70105c724d279ff92420ba893c /lib/libc/gen
parent4d292eec5452f2145e7e2e8155ad77db73a23a7d (diff)
errno changes, lib major version bumps, and general flag day
To build you must: cd /usr/src && make obj && make includes cd lib/libc && make depend && make && NOMAN=1 sudo make install cd /usr/src && make build
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/errno.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libc/gen/errno.c b/lib/libc/gen/errno.c
index e6560942c1a..3c14afbe3c3 100644
--- a/lib/libc/gen/errno.c
+++ b/lib/libc/gen/errno.c
@@ -1,5 +1,22 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: errno.c,v 1.2 1996/08/19 08:22:34 tholo Exp $";
+static char rcsid[] = "$OpenBSD: errno.c,v 1.3 2004/07/13 21:03:35 marc Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <errno.h>
+#undef errno
+
+/*
+ * global errno for unthreaded programs.
+ */
int errno;
+
+/*
+ * weak version of function used by unthreaded programs.
+ */
+int *
+___errno(void)
+{
+ return &errno;
+}
+
+__weak_alias(__errno, ___errno);