1 /*	$OpenBSD: errno.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */
2 /* PUBLIC DOMAIN: No Rights Reserved.   Marco S Hyman <marc@snafu.org> */
3 
4 #include <sys/cdefs.h>
5 __RCSID("$MirOS: src/lib/libc/gen/errno.c,v 1.3 2005/09/22 20:39:59 tg Exp $");
6 
7 #include <errno.h>
8 #undef errno
9 
10 /*
11  * global errno for unthreaded programs.
12  */
13 int errno;
14 
15 /*
16  * weak version of function used by unthreaded programs.
17  */
18 int *
___errno(void)19 ___errno(void)
20 {
21 	return &errno;
22 }
23 
24 __weak_alias(__errno, ___errno);
25