File tree Expand file tree Collapse file tree 8 files changed +18
-13
lines changed Expand file tree Collapse file tree 8 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 1+ #undef abs
Original file line number Diff line number Diff line change 11# (1) Project Information
22
3- PROJECT_LIBS = uclibcpp ;
3+ PROJECT_LIBS = StandardCplusplus ;
44
55# (2) Board Information
66
Original file line number Diff line number Diff line change 44
55using namespace std ;
66
7- ohserialstream cout (Serial);
7+ // <iostream> declares cout/cerr, but the application must define them
8+ // because it's up to you what to do with them.
9+ namespace std
10+ {
11+ ohserialstream cout (Serial);
12+ }
813
914void setup (void )
1015{
Original file line number Diff line number Diff line change 11# (1) Project Information
22
3- PROJECT_LIBS = uclibcpp ;
3+ PROJECT_LIBS = StandardCplusplus ;
44
55# (2) Board Information
66
Original file line number Diff line number Diff line change 66
77using namespace std ;
88
9- ohserialstream cout (Serial);
9+ // <iostream> declares cout/cerr, but the application must define them
10+ // because it's up to you what to do with them.
11+ namespace std
12+ {
13+ ohserialstream cout (Serial);
14+ }
1015
1116vector<string> strings;
1217
Original file line number Diff line number Diff line change 3333namespace std {
3434
3535#ifdef __UCLIBCXX_SUPPORT_CDIR__
36- #ifndef ARDUINO
3736 _UCXXLOCAL int ios_base::Init::init_cnt = 0 ; // Needed to ensure the static value is created
3837
3938// Create buffers first
@@ -90,9 +89,6 @@ namespace std{
9089 _UCXXEXPORT wostream wclog (&_wclog_filebuf);
9190#endif
9291
93- #endif // not ARDUINO
94-
95- #ifdef ARDUINO
9692
9793#ifdef __UCLIBCXX_SUPPORT_COUT__
9894 _UCXXEXPORT ohserialstream cout (Serial);
@@ -107,9 +103,6 @@ namespace std{
107103 _UCXXEXPORT ohserialstream clog (Serial);
108104#endif
109105
110- #endif // ARDUINO
111-
112-
113106 _UCXXEXPORT ios_base::Init::Init (){
114107 if (init_cnt == 0 ){ // Need to construct cout et al
115108
@@ -201,7 +194,6 @@ namespace std{
201194 mprecision = prec;
202195 return temp;
203196 }
204-
205197 _UCXXEXPORT streamsize ios_base::width (streamsize wide){
206198 streamsize temp = mwidth;
207199 mwidth = wide;
Original file line number Diff line number Diff line change 2727#include <istream>
2828#include <ostream>
2929#ifdef ARDUINO
30+ #include <serstream>
3031#else
3132#include <fstream>
3233#endif
Original file line number Diff line number Diff line change 2424#define __UCLIBCXX_IOSTREAM_BUFSIZE__ 32
2525#undef __UCLIBCXX_HAS_LFS__
2626#undef __UCLIBCXX_SUPPORT_CDIR__
27-
27+ #define __UCLIBCXX_SUPPORT_COUT__
28+ #define __UCLIBCXX_SUPPORT_CERR__
2829/*
2930 * STL and Code Expansion
3031 */
You can’t perform that action at this time.
0 commit comments