More runtime magic; this time support required for static class objects at function scope.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@855 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
DrZiplok 2010-11-18 17:52:41 +00:00
parent 71076dad27
commit d2a2ee0fd8
1 changed files with 14 additions and 0 deletions

View File

@ -19,3 +19,17 @@ void operator delete(void *p)
if (p)
free(p);
}
__extension__ typedef int __guard __attribute__((mode (__DI__)));
int __cxa_guard_acquire(__guard *g)
{
return !*(char *)(g);
};
void __cxa_guard_release (__guard *g)
{
*(char *)g = 1;
};
void __cxa_guard_abort (__guard *) {};