Added __errno_location() when building under Linux - we might adopt this
as standard, though (and keep errnop() for BeOS compatibility only). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10914 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6f9587ddeb
commit
5195a9a892
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
** Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
/* Provides user space storage for "errno", located in TLS
|
||||
|
@ -18,3 +18,11 @@ _errnop(void)
|
|||
return (int *)tls_address(TLS_ERRNO_SLOT);
|
||||
}
|
||||
|
||||
|
||||
// This is part of the Linuxbase binary specification
|
||||
// and is referenced by some code in libgcc.a.
|
||||
// ToDo: maybe we even want to include this always
|
||||
#ifdef __linux__
|
||||
extern int *(*__errno_location)(void) __attribute__ ((weak, alias("_errnop")));
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue