bzr branch
http://bzr.ed.am/elec/propeller-clock
57
by edam
added ulibc |
1 |
/* Copyright (C) 2004 Garrett A. Kajmowicz |
2 |
||
3 |
This file is part of the uClibc++ Library. |
|
4 |
||
5 |
This library is free software; you can redistribute it and/or |
|
6 |
modify it under the terms of the GNU Lesser General Public |
|
7 |
License as published by the Free Software Foundation; either |
|
8 |
version 2.1 of the License, or (at your option) any later version. |
|
9 |
||
10 |
This library is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 |
Lesser General Public License for more details. |
|
14 |
||
15 |
You should have received a copy of the GNU Lesser General Public |
|
16 |
License along with this library; if not, write to the Free Software |
|
17 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 |
*/ |
|
19 |
||
20 |
#include <basic_definitions> |
|
21 |
||
22 |
#ifndef __HEADER_STD_IOSTREAM |
|
23 |
#define __HEADER_STD_IOSTREAM 1 |
|
24 |
||
25 |
#include <iosfwd> |
|
26 |
#include <ios> |
|
27 |
#include <istream> |
|
28 |
#include <ostream> |
|
29 |
#ifdef ARDUINO |
|
30 |
#include <serstream> |
|
31 |
#else |
|
32 |
#include <fstream> |
|
33 |
#endif |
|
34 |
#include <string_iostream> |
|
35 |
||
36 |
#pragma GCC visibility push(default) |
|
37 |
||
38 |
namespace std{ |
|
39 |
#ifdef ARDUINO |
|
40 |
||
41 |
#ifdef __UCLIBCXX_SUPPORT_COUT__ |
|
42 |
extern ohserialstream cout; |
|
43 |
#endif |
|
44 |
#ifdef __UCLIBCXX_SUPPORT_CIN__ |
|
45 |
extern ihserialstream cin; |
|
46 |
#endif |
|
47 |
#ifdef __UCLIBCXX_SUPPORT_CERR__ |
|
48 |
extern ohserialstream cerr; |
|
49 |
#endif |
|
50 |
#ifdef __UCLIBCXX_SUPPORT_CLOG__ |
|
51 |
extern ohserialstream clog; |
|
52 |
#endif |
|
53 |
||
54 |
#else // ARDUINO |
|
55 |
||
56 |
#ifdef __UCLIBCXX_SUPPORT_CIN__ |
|
57 |
extern istream cin; |
|
58 |
#endif |
|
59 |
#ifdef __UCLIBCXX_SUPPORT_COUT__ |
|
60 |
extern ostream cout; |
|
61 |
#endif |
|
62 |
#ifdef __UCLIBCXX_SUPPORT_CERR__ |
|
63 |
extern ostream cerr; |
|
64 |
#endif |
|
65 |
#ifdef __UCLIBCXX_SUPPORT_CLOG__ |
|
66 |
extern ostream clog; |
|
67 |
#endif |
|
68 |
#ifdef __UCLIBCXX_SUPPORT_WCIN__ |
|
69 |
extern wistream wcin; |
|
70 |
#endif |
|
71 |
#ifdef __UCLIBCXX_SUPPORT_WCOUT__ |
|
72 |
extern wostream wcout; |
|
73 |
#endif |
|
74 |
#ifdef __UCLIBCXX_SUPPORT_WCERR__ |
|
75 |
extern wostream wcerr; |
|
76 |
#endif |
|
77 |
#ifdef __UCLIBCXX_SUPPORT_WCLOG__ |
|
78 |
extern wostream wclog; |
|
79 |
#endif |
|
80 |
||
81 |
#endif // not ARDUINO |
|
82 |
||
83 |
template <class charT, class traits> class _UCXXEXPORT basic_iostream : |
|
84 |
public basic_istream<charT,traits>, public basic_ostream<charT,traits> |
|
85 |
{ |
|
86 |
public: |
|
87 |
// constructor/destructor |
|
88 |
explicit _UCXXEXPORT basic_iostream(basic_streambuf<charT,traits>* sb); |
|
89 |
virtual _UCXXEXPORT ~basic_iostream(); //Below |
|
90 |
}; |
|
91 |
||
92 |
template <class charT, class traits> _UCXXEXPORT |
|
93 |
basic_iostream<charT, traits>:: basic_iostream(basic_streambuf<charT,traits>* sb) |
|
94 |
: basic_ios<charT, traits>(sb), basic_istream<charT,traits>(sb), basic_ostream<charT,traits>(sb) |
|
95 |
{ |
|
96 |
return; |
|
97 |
} |
|
98 |
||
99 |
||
100 |
template <class charT, class traits> _UCXXEXPORT basic_iostream<charT, traits>::~basic_iostream(){ |
|
101 |
return; |
|
102 |
} |
|
103 |
||
104 |
||
105 |
#ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ |
|
106 |
#ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ |
|
107 |
#ifndef __UCLIBCXX_COMPILE_IOSTREAM__ |
|
108 |
||
109 |
template <> _UCXXEXPORT basic_iostream<char, char_traits<char> >:: |
|
110 |
basic_iostream(basic_streambuf<char, char_traits<char> >* sb); |
|
111 |
template <> _UCXXEXPORT basic_iostream<char, char_traits<char> >::~basic_iostream(); |
|
112 |
||
113 |
#endif |
|
114 |
#endif |
|
115 |
#endif |
|
116 |
||
117 |
||
118 |
||
119 |
} |
|
120 |
||
121 |
#pragma GCC visibility pop |
|
122 |
||
123 |
#endif |