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:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
** Copyright 2003-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
** Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Provides user space storage for "errno", located in TLS
|
/* Provides user space storage for "errno", located in TLS
|
||||||
@@ -18,3 +18,11 @@ _errnop(void)
|
|||||||
return (int *)tls_address(TLS_ERRNO_SLOT);
|
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user