From fe63430cb7d9534411c766cc0c624790e4abde93 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 2 May 2012 19:21:52 +0200 Subject: [PATCH] [sam] removed unuseful new.cpp module --- hardware/arduino/sam/cores/sam/Printable.h | 2 -- hardware/arduino/sam/cores/sam/new.cpp | 18 ------------------ hardware/arduino/sam/cores/sam/new.h | 22 ---------------------- 3 files changed, 42 deletions(-) delete mode 100644 hardware/arduino/sam/cores/sam/new.cpp delete mode 100644 hardware/arduino/sam/cores/sam/new.h diff --git a/hardware/arduino/sam/cores/sam/Printable.h b/hardware/arduino/sam/cores/sam/Printable.h index d03c9af62..54f7d717c 100644 --- a/hardware/arduino/sam/cores/sam/Printable.h +++ b/hardware/arduino/sam/cores/sam/Printable.h @@ -20,8 +20,6 @@ #ifndef Printable_h #define Printable_h -#include - class Print; /** The Printable class provides a way for new classes to allow themselves to be printed. diff --git a/hardware/arduino/sam/cores/sam/new.cpp b/hardware/arduino/sam/cores/sam/new.cpp deleted file mode 100644 index 0f6d4220e..000000000 --- a/hardware/arduino/sam/cores/sam/new.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include - -void * operator new(size_t size) -{ - return malloc(size); -} - -void operator delete(void * ptr) -{ - free(ptr); -} - -int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; -void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; -void __cxa_guard_abort (__guard *) {}; - -void __cxa_pure_virtual(void) {}; - diff --git a/hardware/arduino/sam/cores/sam/new.h b/hardware/arduino/sam/cores/sam/new.h deleted file mode 100644 index cd940ce8b..000000000 --- a/hardware/arduino/sam/cores/sam/new.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Header to define new/delete operators as they aren't provided by avr-gcc by default - Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453 - */ - -#ifndef NEW_H -#define NEW_H - -#include - -void * operator new(size_t size); -void operator delete(void * ptr); - -__extension__ typedef int __guard __attribute__((mode (__DI__))); - -extern "C" int __cxa_guard_acquire(__guard *); -extern "C" void __cxa_guard_release (__guard *); -extern "C" void __cxa_guard_abort (__guard *); - -extern "C" void __cxa_pure_virtual(void); - -#endif -