mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 08:53:56 -04:00
Don't actually implement __cxa_pure_virtual, we'd prefer to have link-time errors rather than classes with pure virtual functions.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1341 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
5faadf4cd1
commit
632d0f574a
@ -11,20 +11,24 @@
|
|||||||
#include "c++.h"
|
#include "c++.h"
|
||||||
#include "WProgram.h"
|
#include "WProgram.h"
|
||||||
|
|
||||||
void * operator new(size_t size)
|
void * operator new(size_t size)
|
||||||
{
|
{
|
||||||
return(calloc(size, 1));
|
return(calloc(size, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void *p)
|
void operator delete(void *p)
|
||||||
{
|
{
|
||||||
if (p) free(p);
|
if (p) free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void __cxa_pure_virtual()
|
#if 0
|
||||||
|
// We should never need this, as classes should never be defined
|
||||||
|
// with pure virtual member functions
|
||||||
|
extern "C" void __cxa_pure_virtual()
|
||||||
{
|
{
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void * operator new[](size_t size)
|
void * operator new[](size_t size)
|
||||||
{
|
{
|
||||||
@ -38,17 +42,17 @@ void operator delete[](void * ptr)
|
|||||||
|
|
||||||
__extension__ typedef int __guard __attribute__((mode (__DI__)));
|
__extension__ typedef int __guard __attribute__((mode (__DI__)));
|
||||||
|
|
||||||
int __cxa_guard_acquire(__guard *g)
|
int __cxa_guard_acquire(__guard *g)
|
||||||
{
|
{
|
||||||
return !*(char *)(g);
|
return !*(char *)(g);
|
||||||
};
|
};
|
||||||
|
|
||||||
void __cxa_guard_release (__guard *g)
|
void __cxa_guard_release (__guard *g)
|
||||||
{
|
{
|
||||||
*(char *)g = 1;
|
*(char *)g = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
void __cxa_guard_abort (__guard *) {};
|
void __cxa_guard_abort (__guard *) {};
|
||||||
|
|
||||||
// free memory
|
// free memory
|
||||||
extern unsigned int __bss_end;
|
extern unsigned int __bss_end;
|
||||||
|
Loading…
Reference in New Issue
Block a user