3 * Silicon Graphics Computer Systems, Inc.
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
11 * Permission to use or copy this software for any purpose is hereby granted
12 * without fee, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
19 #ifndef _STLP_IOSTREAM
20 #define _STLP_IOSTREAM
22 # ifndef _STLP_OUTERMOST_HEADER_ID
23 # define _STLP_OUTERMOST_HEADER_ID 0x1037
24 # include <stl/_prolog.h>
27 # ifdef _STLP_PRAGMA_ONCE
31 #include <stl/_ioserr.h>
33 #ifdef _STLP_REDIRECT_STDSTREAMS
34 // for ofstream redirection
38 #include <stl/_iosfwd.h>
39 #include <stl/_istream.h>
43 #ifndef _STLP_USE_NAMESPACES
44 // in case of SGI iostreams, we have to rename our streams not to clash with those
45 // provided in native lib
46 # define cin _STLP_cin
47 # define cout _STLP_cout
48 # define cerr _STLP_cerr
49 # define clog _STLP_clog
52 // Note: cin and wcin are both associated with stdio. The C standard
53 // (Amendment 1, section 4.6.2.1) says that it is an error to mix
54 // wide- and narrow-oriented I/O on the same stream. This implies
55 // that it is an error to use both cin and wcin in the same C++
56 // program; the same applies to cout and wcout, and cerr/clog and
59 # ifdef _STLP_REDIRECT_STDSTREAMS
60 extern _STLP_DECLSPEC istream cin;
61 extern _STLP_DECLSPEC ofstream cout;
62 extern _STLP_DECLSPEC ofstream cerr;
63 extern _STLP_DECLSPEC ofstream clog;
65 extern _STLP_DECLSPEC istream cin;
66 extern _STLP_DECLSPEC ostream cout;
67 extern _STLP_DECLSPEC ostream cerr;
68 extern _STLP_DECLSPEC ostream clog;
71 # ifndef _STLP_NO_WCHAR_T
72 extern _STLP_DECLSPEC wistream wcin;
73 extern _STLP_DECLSPEC wostream wcout;
74 extern _STLP_DECLSPEC wostream wcerr;
75 extern _STLP_DECLSPEC wostream wclog;
80 //# elif defined ( _STLP_USE_NO_IOSTREAMS )
81 //# include <stl/_null_stream.h>
83 # if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
84 # include <stl/_epilog.h>
85 # undef _STLP_OUTERMOST_HEADER_ID
88 #endif /* _STLP_IOSTREAM */