diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index a78397c5f..086fc67d0 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -5,6 +5,7 @@ ARDUINO 1.0.6 - not yet released * avr: Improved USB-CDC write speed (Justin Rajewski) * avr: Improved USB-CDC read code (Paul Brook) * avr: Fixed race condition in USB-CDC transmit (Paul Brook) +* avr: Added replacement stub for cstdlib atexit() funciton (Christopher Andrews) * Fixed wrong NULL pointer handling in Stream class (Amulya Kumar Sahoo) * Backported String class from IDE 1.5.x (Matt Jenkins) * Backported Print class from IDE 1.5.x diff --git a/hardware/arduino/cores/arduino/Arduino.h b/hardware/arduino/cores/arduino/Arduino.h index 425dfcb8d..8673ab8ab 100755 --- a/hardware/arduino/cores/arduino/Arduino.h +++ b/hardware/arduino/cores/arduino/Arduino.h @@ -115,6 +115,8 @@ typedef uint8_t byte; void init(void); void initVariant(void); +int atexit(void (*func)()) __attribute__((weak)); + void pinMode(uint8_t, uint8_t); void digitalWrite(uint8_t, uint8_t); int digitalRead(uint8_t); diff --git a/hardware/arduino/cores/arduino/main.cpp b/hardware/arduino/cores/arduino/main.cpp index 091c365fc..a60980da5 100644 --- a/hardware/arduino/cores/arduino/main.cpp +++ b/hardware/arduino/cores/arduino/main.cpp @@ -19,6 +19,9 @@ #include +//Declared weak in Arduino.h to allow user redefinitions. +int atexit(void (*func)()) { return 0; } + // Weak empty variant initialization function. // May be redefined by variant files. void initVariant() __attribute__((weak));