williamr@4: /* williamr@4: * Copyright (c) 1999 williamr@4: * Silicon Graphics Computer Systems, Inc. williamr@4: * williamr@4: * Copyright (c) 1999 williamr@4: * Boris Fomitchev williamr@4: * williamr@4: * This material is provided "as is", with absolutely no warranty expressed williamr@4: * or implied. Any use is at your own risk. williamr@4: * williamr@4: * Permission to use or copy this software for any purpose is hereby granted williamr@4: * without fee, provided the above notices are retained on all copies. williamr@4: * Permission to modify the code and to distribute modified code is granted, williamr@4: * provided the above notices are retained, and a notice that the code was williamr@4: * modified is included with the above copyright notice. williamr@4: * williamr@4: */ williamr@4: williamr@4: #ifndef _STLP_IOSTREAM williamr@4: #define _STLP_IOSTREAM williamr@4: williamr@4: # ifndef _STLP_OUTERMOST_HEADER_ID williamr@4: # define _STLP_OUTERMOST_HEADER_ID 0x1037 williamr@4: # include williamr@4: # endif williamr@4: williamr@4: # ifdef _STLP_PRAGMA_ONCE williamr@4: # pragma once williamr@4: # endif williamr@4: williamr@4: #include williamr@4: williamr@4: #ifdef _STLP_REDIRECT_STDSTREAMS williamr@4: // for ofstream redirection williamr@4: # include williamr@4: #endif williamr@4: williamr@4: #include williamr@4: #include williamr@4: williamr@4: _STLP_BEGIN_NAMESPACE williamr@4: williamr@4: #ifndef _STLP_USE_NAMESPACES williamr@4: // in case of SGI iostreams, we have to rename our streams not to clash with those williamr@4: // provided in native lib williamr@4: # define cin _STLP_cin williamr@4: # define cout _STLP_cout williamr@4: # define cerr _STLP_cerr williamr@4: # define clog _STLP_clog williamr@4: #endif williamr@4: williamr@4: // Note: cin and wcin are both associated with stdio. The C standard williamr@4: // (Amendment 1, section 4.6.2.1) says that it is an error to mix williamr@4: // wide- and narrow-oriented I/O on the same stream. This implies williamr@4: // that it is an error to use both cin and wcin in the same C++ williamr@4: // program; the same applies to cout and wcout, and cerr/clog and williamr@4: // wcerr/wclog. williamr@4: williamr@4: # ifdef _STLP_REDIRECT_STDSTREAMS williamr@4: extern _STLP_DECLSPEC istream cin; williamr@4: extern _STLP_DECLSPEC ofstream cout; williamr@4: extern _STLP_DECLSPEC ofstream cerr; williamr@4: extern _STLP_DECLSPEC ofstream clog; williamr@4: # else williamr@4: extern _STLP_DECLSPEC istream cin; williamr@4: extern _STLP_DECLSPEC ostream cout; williamr@4: extern _STLP_DECLSPEC ostream cerr; williamr@4: extern _STLP_DECLSPEC ostream clog; williamr@4: # endif williamr@4: williamr@4: # ifndef _STLP_NO_WCHAR_T williamr@4: extern _STLP_DECLSPEC wistream wcin; williamr@4: extern _STLP_DECLSPEC wostream wcout; williamr@4: extern _STLP_DECLSPEC wostream wcerr; williamr@4: extern _STLP_DECLSPEC wostream wclog; williamr@4: # endif williamr@4: williamr@4: _STLP_END_NAMESPACE williamr@4: williamr@4: //# elif defined ( _STLP_USE_NO_IOSTREAMS ) williamr@4: //# include williamr@4: williamr@4: # if (_STLP_OUTERMOST_HEADER_ID == 0x1037) williamr@4: # include williamr@4: # undef _STLP_OUTERMOST_HEADER_ID williamr@4: # endif williamr@4: williamr@4: #endif /* _STLP_IOSTREAM */ williamr@4: williamr@4: // Local Variables: williamr@4: // mode:C++ williamr@4: // End: