summaryrefslogtreecommitdiff
path: root/ace/stdcpp.h
blob: 3b50df216548b0b9646b9f1f5d5622757a46bbc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* -*- C++ -*- */
// $Id: stdcpp.h

// ============================================================================
//
// = LIBRARY
//    ace
// 
// = FILENAME
//    stdcpp.h
//
// = AUTHOR
//    Irfan and Tim and Darrell
//
// = DESCRIPTION
//    This file contains the portability ugliness for the Standard C++
//    Library.  As implementations of the "standard" emerge, this file
//    will need to be updated.
// 
// ============================================================================

#if !defined (ACE_STDCPP_H)
#define ACE_STDCPP_H

#include "ace/config.h"

#if !defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)

#   if defined (_MSC_VER)
#     pragma warning(disable: 4018 4114 4146 4245)
#     pragma warning(disable: 4663 4664 4665 4511 4512)
#   endif

    // For some reason, The Standard C++ Library has decided to save space
    // and ommit the file extensions.
#   include /**/ <iomanip>
#   include /**/ <ios>
#   include /**/ <iostream>
#   include /**/ <istream>
#   include /**/ <ostream>
#   include /**/ <fstream>
#   include /**/ <streambuf>


/*  As more compilers conform to Draft 2, ACE should be modified to use the 
    namespace instead of promoting names to the global namespace.  For those
    compilers that don't support it yet, there could be  a global struct that
    looks like:

    struct std
    {
      typedef ostream ::ostream;
      
      // ...
    }
*/

// In case iostream.h is not #included before this header . . .
#   if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) &&		\
	    (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
      using std::istream; 
      using std::ostream;
      using std::ofstream;
      using std::endl;
      using std::flush;
      using std::iostream;
      using std::cerr; 
      using std::cout; 
      using std::cin;
      using std::streambuf;
      using std::ios;
#   endif // ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 

#   if defined (_MSC_VER)
#     pragma warning(4: 4018 4114 4146 4245)
#     pragma warning(4: 4663 4664 4665 4512 4511)
#   endif

# else /* ACE_HAS_STANDARD_CPP_LIBRARY */
#   include /**/ <fstream.h>
#   include /**/ <iostream.h>

#   if defined (ACE_WIN32)
#     include /**/ <ios.h>
#     include /**/ <streamb.h>
#     include /**/ <strstrea.h>
#     include /**/ <istream.h>
#     include /**/ <ostream.h>
#     include /**/ <iomanip.h>
#   endif /* ACE_WIN32 */

# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */

// Now include the new standard headers (like cstdio) if using the
// new standard.

#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
# if defined (_MSC_VER)
#   pragma warning(disable: 4018 4114 4146 4245)
#   pragma warning(disable: 4663 4664 4665 4511 4512)
# endif /* _MSC_VER */

# include /**/ <cassert>
# include /**/ <climits>
# include /**/ <cstdio>
# include /**/ <new>
# include /**/ <cctype>
# include /**/ <csignal>
# include /**/ <cstring>
# include /**/ <cstdarg>
# include /**/ <cerrno>
# include /**/ <cstdlib>

# if defined (_MSC_VER)
#   pragma warning(4: 4018 4114 4146 4245)
#   pragma warning(4: 4663 4664 4665 4512 4511)
# endif

#else /* ACE_HAS_STANDARD_CPP_LIBRARY && ACE_HAS_STANDARD_CPP_LIBRARY */

# include /**/ <assert.h>
# include /**/ <limits.h>
# include /**/ <stdio.h>
# include /**/ <new.h>
# include /**/ <ctype.h>
# include /**/ <signal.h>
# include /**/ <string.h>
# include /**/ <stdarg.h>
# include /**/ <errno.h>
# include /**/ <stdlib.h>

#endif /* ACE_HAS_STANDARD_CPP_LIBRARY && ACE_HAS_STANDARD_CPP_LIBRARY */

#endif // ACE_STDCPP_H