__cxa_pure_virtual changes

- rename stdio.cpp to retarget.cpp, since it doesn't contain only stdio-related
  code
- move __cxa_pure_virtual from exit.c to retarget.cpp where it belongs.
pull/17/merge
Bogdan Marinescu 2013-07-29 18:54:22 +03:00
parent 0c5d3548d1
commit df5a993197
2 changed files with 6 additions and 7 deletions

View File

@ -15,7 +15,6 @@
*/
#include "semihost_api.h"
#include "mbed_interface.h"
#include "toolchain.h"
#ifdef TOOLCHAIN_GCC_CW
// TODO: Ideally, we would like to define directly "_ExitProcess"
@ -35,9 +34,3 @@ void exit(int return_code) {
while (1);
}
WEAK void __cxa_pure_virtual(void);
WEAK void __cxa_pure_virtual(void) {
exit(1);
}

View File

@ -18,6 +18,7 @@
#include "FileSystemLike.h"
#include "FilePath.h"
#include "serial_api.h"
#include "toolchain.h"
#include <errno.h>
#if defined(__ARMCC_VERSION)
@ -386,4 +387,9 @@ namespace __gnu_cxx {
error("Exception");
}
}
extern "C" WEAK void __cxa_pure_virtual(void);
extern "C" WEAK void __cxa_pure_virtual(void) {
exit(1);
}
#endif