xref: /reactos/sdk/include/c++/stlport/iostream (revision 8a978a17)
1/*
2 * Copyright (c) 1999
3 * Silicon Graphics Computer Systems, Inc.
4 *
5 * Copyright (c) 1999
6 * Boris Fomitchev
7 *
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
10 *
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.
16 *
17 */
18
19#ifndef _STLP_IOSTREAM
20
21#ifndef _STLP_OUTERMOST_HEADER_ID
22#  define _STLP_OUTERMOST_HEADER_ID 0x1037
23#  include <stl/_prolog.h>
24#  define _STLP_IOSTREAM
25#endif
26
27#if (_STLP_OUTERMOST_HEADER_ID == 0x1037) && \
28   !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
29#  include <stl/_ioserr.h>
30
31#  ifdef _STLP_REDIRECT_STDSTREAMS
32// for ofstream redirection
33#    ifndef _STLP_INTERNAL_FSTREAM_H
34#      include <stl/_fstream.h>
35#    endif
36#  endif
37
38#  ifndef _STLP_INTERNAL_IOSFWD
39#    include <stl/_iosfwd.h>
40#  endif
41
42#  ifndef _STLP_INTERNAL_ISTREAM
43#    include <stl/_istream.h>
44#  endif
45
46_STLP_BEGIN_NAMESPACE
47
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
55#  endif
56
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
62// wcerr/wclog.
63
64extern _STLP_DECLSPEC istream cin;
65
66#  ifdef _STLP_REDIRECT_STDSTREAMS
67extern _STLP_DECLSPEC ofstream cout;
68extern _STLP_DECLSPEC ofstream cerr;
69extern _STLP_DECLSPEC ofstream clog;
70#  else
71extern _STLP_DECLSPEC ostream cout;
72extern _STLP_DECLSPEC ostream cerr;
73extern _STLP_DECLSPEC ostream clog;
74#  endif
75
76#  ifndef _STLP_NO_WCHAR_T
77extern _STLP_DECLSPEC wistream wcin;
78extern _STLP_DECLSPEC wostream wcout;
79extern _STLP_DECLSPEC wostream wcerr;
80extern _STLP_DECLSPEC wostream wclog;
81#  endif
82
83_STLP_END_NAMESPACE
84
85#endif
86
87#if (_STLP_OUTERMOST_HEADER_ID != 0x1037) || defined (_STLP_IMPORT_VENDOR_STD)
88#  if defined (_STLP_HAS_INCLUDE_NEXT)
89#    include_next <iostream>
90#  else
91#    include _STLP_NATIVE_HEADER(iostream)
92#  endif
93#endif
94
95#if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
96#  include <stl/_epilog.h>
97#  undef _STLP_OUTERMOST_HEADER_ID
98#endif
99
100#endif /* _STLP_IOSTREAM */
101
102// Local Variables:
103// mode:C++
104// End:
105