1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: kwsys_ios_iostream.h.in,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #ifndef @KWSYS_NAMESPACE@_ios_iostream
15 #define @KWSYS_NAMESPACE@_ios_iostream
17 #include <@KWSYS_NAMESPACE@/Configure.hxx>
20 # pragma warning (push, 1)
21 # pragma warning (disable: 4702)
22 # pragma warning (disable: 4995) /* Old streams are deprecated. */
25 #if @KWSYS_NAMESPACE@_IOS_USE_ANSI
28 # include <iostream.h>
31 // The HP implementation of iostream defines cin, cout, cerr, and clog
32 // as macros in order to do thread-private streams.
33 // See /opt/aCC/include/iostream/iostream.h for details.
34 // This block redefines the macros in a safe way that is also compatible
35 // with the HP definitions and the using declarations below.
37 #if !@KWSYS_NAMESPACE@_IOS_USE_SSTREAM
38 # if defined(__HP_aCC) && (defined(HP_THREAD_SAFE) || defined(_THREAD_SAFE))
39 # if defined(cin) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CIN)
40 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CIN
42 # define cin __tcin.ref()
44 # if defined(cout) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_COUT)
45 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_COUT
47 # define cout __tcout.ref()
49 # if defined(cerr) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CERR)
50 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CERR
52 # define cerr __tcerr.ref()
54 # if defined(clog) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG)
55 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG
57 # define clog __tclog.ref()
62 // If using our own sstream emulation code, put the standard
63 // streams in the same namespace.
64 #if !@KWSYS_NAMESPACE@_IOS_USE_SSTREAM
65 namespace @KWSYS_NAMESPACE@_ios
67 typedef int streamsize
;
68 typedef int streamoff
;
69 using @KWSYS_NAMESPACE@
_ios_namespace::ostream
;
70 using @KWSYS_NAMESPACE@
_ios_namespace::istream
;
71 using @KWSYS_NAMESPACE@
_ios_namespace::ios
;
72 using @KWSYS_NAMESPACE@
_ios_namespace::endl
;
73 using @KWSYS_NAMESPACE@
_ios_namespace::flush
;
74 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CIN)
75 using @KWSYS_NAMESPACE@
_ios_namespace::__tcin
;
77 using @KWSYS_NAMESPACE@
_ios_namespace::cin
;
79 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_COUT)
80 using @KWSYS_NAMESPACE@
_ios_namespace::__tcout
;
82 using @KWSYS_NAMESPACE@
_ios_namespace::cout
;
84 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CERR)
85 using @KWSYS_NAMESPACE@
_ios_namespace::__tcerr
;
87 using @KWSYS_NAMESPACE@
_ios_namespace::cerr
;
89 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG)
90 using @KWSYS_NAMESPACE@
_ios_namespace::__tclog
;
92 using @KWSYS_NAMESPACE@
_ios_namespace::clog
;