summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__errno_location.c
blob: 5a2af36fde7fd8a884f9cfb4806d1a500a0a8af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <errno.h>
#undef errno
extern int errno;
libc_hidden_proto(errno)

/* psm: moved to bits/errno.h: libc_hidden_proto(__errno_location) */
libc_hidden_proto(__errno_location)
int * weak_const_function __errno_location (void)
{
    return &errno;
}
#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
libc_hidden_weak(__errno_location)
#endif