summaryrefslogtreecommitdiff
path: root/lib/libc/gen/errno.c
blob: 3c14afbe3c37595550c8cf2fd85cc335484e4063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#if defined(LIBC_SCCS) && !defined(lint)
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);