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
21 #ifndef _STLP_OUTERMOST_HEADER_ID
22 # define _STLP_OUTERMOST_HEADER_ID 0x1037
23 # include <stl/_prolog.h>
24 # define _STLP_IOSTREAM
27 #if (_STLP_OUTERMOST_HEADER_ID == 0x1037) && \
28 !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
29 # include <stl/_ioserr.h>
31 # ifdef _STLP_REDIRECT_STDSTREAMS
32 // for ofstream redirection
33 # ifndef _STLP_INTERNAL_FSTREAM_H
34 # include <stl/_fstream.h>
38 # ifndef _STLP_INTERNAL_IOSFWD
39 # include <stl/_iosfwd.h>
42 # ifndef _STLP_INTERNAL_ISTREAM
43 # include <stl/_istream.h>
48 # ifndef _STLP_USE_NAMESPACES
49 // in case of SGI iostreams, we have to rename our streams not to clash with those
50 // provided in native lib
51 # define cin _STLP_cin
52 # define cout _STLP_cout
53 # define cerr _STLP_cerr
54 # define clog _STLP_clog
57 // Note: cin and wcin are both associated with stdio. The C standard
58 // (Amendment 1, section 4.6.2.1) says that it is an error to mix
59 // wide- and narrow-oriented I/O on the same stream. This implies
60 // that it is an error to use both cin and wcin in the same C++
61 // program; the same applies to cout and wcout, and cerr/clog and
64 extern _STLP_DECLSPEC istream cin;
66 # ifdef _STLP_REDIRECT_STDSTREAMS
67 extern _STLP_DECLSPEC ofstream cout;
68 extern _STLP_DECLSPEC ofstream cerr;
69 extern _STLP_DECLSPEC ofstream clog;
71 extern _STLP_DECLSPEC ostream cout;
72 extern _STLP_DECLSPEC ostream cerr;
73 extern _STLP_DECLSPEC ostream clog;
76 # ifndef _STLP_NO_WCHAR_T
77 extern _STLP_DECLSPEC wistream wcin;
78 extern _STLP_DECLSPEC wostream wcout;
79 extern _STLP_DECLSPEC wostream wcerr;
80 extern _STLP_DECLSPEC wostream wclog;
87 #if (_STLP_OUTERMOST_HEADER_ID != 0x1037) || defined (_STLP_IMPORT_VENDOR_STD)
88 # if defined (_STLP_HAS_INCLUDE_NEXT)
89 # include_next <iostream>
91 # include _STLP_NATIVE_HEADER(iostream)
95 #if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
96 # include <stl/_epilog.h>
97 # undef _STLP_OUTERMOST_HEADER_ID
100 #endif /* _STLP_IOSTREAM */