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 <errno.h> 5 #undef errno 6 7 /* 8 * global errno for unthreaded programs. 9 */ 10 int errno; 11 12 /* 13 * weak version of function used by unthreaded programs. 14 */ 15 int * 16 ___errno(void) 17 { 18 return &errno; 19 } 20 21 __weak_alias(__errno, ___errno); 22