Qualia  0.2
new.h
Go to the documentation of this file.
1 /* Header to define new/delete operators as they aren't provided by avr-gcc by default
2  Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453
3  */
4 
5 #ifndef NEW_COMPAT_H
6 #define NEW_COMPAT_H
7 
8 #include <qualia/core/common.h>
9 
10 #if is_avr() && !is_arduino()
11 
12  #include <stdlib.h>
13 
14  void * operator new(size_t size);
15  void operator delete(void * ptr);
16  void * operator new[](size_t size);
17  void operator delete[](void * ptr);
18 
19  __extension__ typedef int __guard __attribute__((mode (__DI__)));
20 
21  extern "C" int __cxa_guard_acquire(__guard *);
22  extern "C" void __cxa_guard_release (__guard *);
23  extern "C" void __cxa_guard_abort (__guard *);
24 
25  extern "C" void __cxa_pure_virtual(void);
26 
27 #endif
28 
29 #endif
30