123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- /******************************************************************************/
- /* This file was taken from STLport <www.stlport.org> and modified by */
- /* Texas Instruments. */
- /******************************************************************************/
- /*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999
- * Boris Fomitchev
- *
- * Copyright (c) 2014-2014 Texas Instruments Incorporated
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
- #ifndef _STLP_IOSTREAM
- #ifndef _STLP_OUTERMOST_HEADER_ID
- # define _STLP_OUTERMOST_HEADER_ID 0x1037
- # include <s__prolog.h>
- # define _STLP_IOSTREAM
- #endif
- #if (_STLP_OUTERMOST_HEADER_ID == 0x1037) && \
- !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
- # include <s__ioserr.h>
- # ifdef _STLP_REDIRECT_STDSTREAMS
- // for ofstream redirection
- # ifndef _STLP_INTERNAL_FSTREAM_H
- # include <s__fstream.h>
- # endif
- # endif
- # ifndef _STLP_INTERNAL_IOSFWD
- # include <s__iosfwd.h>
- # endif
- # ifndef _STLP_INTERNAL_ISTREAM
- # include <s__istream.h>
- # endif
- _STLP_BEGIN_NAMESPACE
- /* Workaround since we don't support ensuring library globals are initialized first.
- * This declaration ensures that any inclusion of this header will force cout/cin/cerr
- * to initialize. */
- static ios_base::Init _ios_initer;
- # ifndef _STLP_USE_NAMESPACES
- // in case of SGI iostreams, we have to rename our streams not to clash with those
- // provided in native lib
- # define cin _STLP_cin
- # define cout _STLP_cout
- # define cerr _STLP_cerr
- # define clog _STLP_clog
- # endif
- // Note: cin and wcin are both associated with stdio. The C standard
- // (Amendment 1, section 4.6.2.1) says that it is an error to mix
- // wide- and narrow-oriented I/O on the same stream. This implies
- // that it is an error to use both cin and wcin in the same C++
- // program; the same applies to cout and wcout, and cerr/clog and
- // wcerr/wclog.
- _DATA_ACCESS extern _STLP_DECLSPEC istream cin;
- # ifdef _STLP_REDIRECT_STDSTREAMS
- _DATA_ACCESS extern _STLP_DECLSPEC ofstream cout;
- _DATA_ACCESS extern _STLP_DECLSPEC ofstream cerr;
- _DATA_ACCESS extern _STLP_DECLSPEC ofstream clog;
- # else
- _DATA_ACCESS extern _STLP_DECLSPEC ostream cout;
- _DATA_ACCESS extern _STLP_DECLSPEC ostream cerr;
- _DATA_ACCESS extern _STLP_DECLSPEC ostream clog;
- # endif
- # ifndef _STLP_NO_WCHAR_T
- _DATA_ACCESS extern _STLP_DECLSPEC wistream wcin;
- _DATA_ACCESS extern _STLP_DECLSPEC wostream wcout;
- _DATA_ACCESS extern _STLP_DECLSPEC wostream wcerr;
- _DATA_ACCESS extern _STLP_DECLSPEC wostream wclog;
- # endif
- _STLP_END_NAMESPACE
- #endif
- #if (_STLP_OUTERMOST_HEADER_ID != 0x1037) || defined (_STLP_IMPORT_VENDOR_STD)
- # if defined (_STLP_HAS_INCLUDE_NEXT)
- # include_next <iostream>
- # else
- # include _STLP_NATIVE_HEADER(iostream)
- # endif
- #endif
- #if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
- # include <s__epilog.h>
- # undef _STLP_OUTERMOST_HEADER_ID
- #endif
- #endif /* _STLP_IOSTREAM */
- // Local Variables:
- // mode:C++
- // End:
|