Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

54 lines
1.9KB

  1. /* Teensyduino Core Library
  2. * http://www.pjrc.com/teensy/
  3. * Copyright (c) 2017 PJRC.COM, LLC.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the
  7. * "Software"), to deal in the Software without restriction, including
  8. * without limitation the rights to use, copy, modify, merge, publish,
  9. * distribute, sublicense, and/or sell copies of the Software, and to
  10. * permit persons to whom the Software is furnished to do so, subject to
  11. * the following conditions:
  12. *
  13. * 1. The above copyright notice and this permission notice shall be
  14. * included in all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  20. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  21. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. * SOFTWARE.
  24. */
  25. /* Header to define new/delete operators as they aren't provided by avr-gcc by default
  26. Adapted from from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453
  27. */
  28. #ifndef NEW_H
  29. #define NEW_H
  30. #ifdef __cplusplus
  31. #include <stdlib.h>
  32. void * operator new(size_t size);
  33. void * operator new[](size_t size);
  34. void operator delete(void * ptr);
  35. void operator delete[](void * ptr);
  36. void operator delete(void * ptr, size_t size);
  37. void operator delete[](void * ptr, size_t size);
  38. __extension__ typedef int __guard __attribute__((mode (__DI__)));
  39. extern "C" int __cxa_guard_acquire(__guard *);
  40. extern "C" void __cxa_guard_release (__guard *);
  41. extern "C" void __cxa_guard_abort (__guard *);
  42. extern "C" void __cxa_pure_virtual(void);
  43. #endif // __cplusplus
  44. #endif