1 karl 1.61 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.18 //
|
3 karl 1.51 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.45 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.51 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.53 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.61 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.18 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 karl 1.26 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
18 mike 1.18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 kumpf 1.29 //
|
21 karl 1.26 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
24 karl 1.26 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
27 mike 1.18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_Config_h
35 #define Pegasus_Config_h
36
37 #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
38 # include <Pegasus/Common/Platform_WIN32_IX86_MSVC.h>
39 #elif defined (PEGASUS_PLATFORM_LINUX_IX86_GNU)
40 # include <Pegasus/Common/Platform_LINUX_IX86_GNU.h>
|
41 jim.wunderlich 1.59 #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
42 # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
|
43 mike 1.18 #elif defined (PEGASUS_PLATFORM_AIX_RS_IBMCXX)
44 # include <Pegasus/Common/Platform_AIX_RS_IBMCXX.h>
45 #elif defined (PEGASUS_PLATFORM_HPUX_PARISC_ACC)
46 # include <Pegasus/Common/Platform_HPUX_PARISC_ACC.h>
|
47 kumpf 1.36 #elif defined (PEGASUS_PLATFORM_HPUX_IA64_ACC)
48 # include <Pegasus/Common/Platform_HPUX_IA64_ACC.h>
|
49 mike 1.19 #elif defined (PEGASUS_PLATFORM_TRU64_ALPHA_DECCXX)
50 # include <Pegasus/Common/Platform_TRU64_ALPHA_DECCXX.h>
|
51 mike 1.21 #elif defined (PEGASUS_PLATFORM_SOLARIS_SPARC_GNU)
52 # include <Pegasus/Common/Platform_SOLARIS_SPARC_GNU.h>
|
53 keith.petley 1.43 #elif defined (PEGASUS_PLATFORM_SOLARIS_SPARC_CC)
54 # include <Pegasus/Common/Platform_SOLARIS_SPARC_CC.h>
|
55 mike 1.22 #elif defined (PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
56 # include <Pegasus/Common/Platform_ZOS_ZSERIES_IBM.h>
|
57 kumpf 1.27 #elif defined (PEGASUS_PLATFORM_LINUX_IA64_GNU)
58 # include <Pegasus/Common/Platform_LINUX_IA64_GNU.h>
|
59 w.otsuka 1.58 #elif defined (PEGASUS_PLATFORM_LINUX_X86_64_GNU)
60 # include <Pegasus/Common/Platform_LINUX_X86_64_GNU.h>
|
61 david.eger 1.41 #elif defined (PEGASUS_PLATFORM_LINUX_PPC_GNU)
62 # include <Pegasus/Common/Platform_LINUX_PPC_GNU.h>
|
63 jenny.yu 1.55 #elif defined (PEGASUS_PLATFORM_LINUX_PPC64_GNU)
64 # include <Pegasus/Common/Platform_LINUX_PPC64_GNU.h>
|
65 david.eger 1.42 #elif defined (PEGASUS_PLATFORM_LINUX_ZSERIES_GNU)
66 # include <Pegasus/Common/Platform_LINUX_ZSERIES_GNU.h>
|
67 jenny.yu 1.55 #elif defined (PEGASUS_PLATFORM_LINUX_ZSERIES64_GNU)
68 # include <Pegasus/Common/Platform_LINUX_ZSERIES64_GNU.h>
|
69 chuck 1.33 #elif defined (__OS400__)
70 # if !defined (PEGASUS_PLATFORM_OS400_ISERIES_IBM)
71 # define PEGASUS_PLATFORM_OS400_ISERIES_IBM
72 # endif
73 # include <Pegasus/Common/Platform_OS400_ISERIES_IBM.h>
|
74 dudhe.girish 1.47 #elif defined (PEGASUS_PLATFORM_DARWIN_PPC_GNU)
75 # include <Pegasus/Common/Platform_DARWIN_PPC_GNU.h>
|
76 gs.keenan 1.54 #elif defined (PEGASUS_PLATFORM_VMS_ALPHA_DECCXX)
77 # include <Pegasus/Common/Platform_VMS_ALPHA_DECCXX.h>
78 #elif defined (PEGASUS_PLATFORM_VMS_IA64_DECCXX)
79 # include <Pegasus/Common/Platform_VMS_IA64_DECCXX.h>
|
80 jim.wunderlich 1.59 #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
81 # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
|
82 mike 1.18 #else
83 # error "<Pegasus/Common/Config.h>: Unsupported Platform"
84 #endif
85
|
86 mday 1.39
87
88
89 //<<< Sun Apr 6 19:28:00 2003 mdd >>>
90 //
91 // COMPILER Checks
92 //
93 // This is to allow a check for GCC > 3.2
94 // It needs to be the first thing we check because the next lines load
95 // further source files
96
97 #if defined(__GNUC__)
98 #define GCC_VERSION (__GNUC__ * 10000 \
99 + __GNUC_MINOR__ * 100 \
100 + __GNUC_PATCHLEVEL__)
101
102 // To test for GCC > 3.2.0:
103 // #if GCC_VERSION > 30200
104
105 #endif
106
107 mday 1.39
|
108 david.dillard 1.56 #ifdef __cplusplus
|
109 mike 1.22 #include <cstdlib>
|
110 david.dillard 1.56 #endif
|
111 mike 1.22
|
112 mike 1.62 #ifndef PEGASUS_IMPORT
113 # define PEGASUS_IMPORT /* empty */
114 #endif
115
|
116 kumpf 1.32 #ifndef PEGASUS_EXPORT
|
117 mike 1.62 # define PEGASUS_EXPORT /* empty */
118 #endif
119
120 /*
121 **==============================================================================
122 **
123 ** PEGASUS_HIDDEN_LINKAGE
124 **
125 ** This macro suppresses the export of a symbol in contexts in which the
126 ** default linkage would have otherwise exported the symbol. Consider the
127 ** following example:
128 **
129 ** class PEGASUS_COMMON_LINKAGE MyClass
130 ** {
131 ** public:
132 **
133 ** // Is exported (due to PEGASUS_COMMON_LINKAGE macro).
134 ** void f();
135 **
136 ** // Is not exported (despite the PEGASUS_COMMON_LINKAGE macro).
137 ** PEGASUS_HIDDEN_LINKAGE void g(); // not-exported.
138 mike 1.62 ** };
139 **
140 ** Notes: this macro has an empty expansion on many platforms since this
141 ** feature is compiler specific.
142 **
143 **==============================================================================
144 */
145 #ifndef PEGASUS_HIDDEN_LINKAGE
146 # define PEGASUS_HIDDEN_LINKAGE /* empty */
|
147 kumpf 1.32 #endif
|
148 mike 1.22
|
149 mike 1.18 #ifdef PEGASUS_HAVE_NAMESPACES
150 # define PEGASUS_NAMESPACE_BEGIN namespace Pegasus {
151 # define PEGASUS_NAMESPACE_END }
|
152 vijay.eli 1.57 # define PEGASUS_NAMESPACE(X) Pegasus::X
|
153 mike 1.22
154 #ifndef PEGASUS_HAVE_NO_STD
|
155 mike 1.18 # define PEGASUS_STD(X) std::X
156 # define PEGASUS_USING_STD using namespace std
|
157 mike 1.22 #else
158 # define PEGASUS_STD(X) X
159 # define PEGASUS_USING_STD
160 #endif
|
161 mike 1.18 # define PEGASUS_USING_PEGASUS using namespace Pegasus
162 #else
163 # define PEGASUS_NAMESPACE_BEGIN /* empty */
164 # define PEGASUS_NAMESPACE_END /* empty */
|
165 vijay.eli 1.57 # define PEGASUS_NAMESPACE(X) X
|
166 mike 1.18 # define PEGASUS_STD(X) X
167 # define PEGASUS_USING_STD
168 # define PEGASUS_USING_PEGASUS
169 #endif
170
171 #ifdef PEGASUS_HAVE_EXPLICIT
172 # define PEGASUS_EXPLICIT explicit
173 #else
174 # define PEGASUS_EXPLICIT /* empty */
175 #endif
176
177 #ifdef PEGASUS_HAVE_MUTABLE
178 # define PEGASUS_MUTABLE mutable
179 #else
180 # define PEGASUS_MUTABLE /* empty */
181 #endif
182
183 #ifndef PEGASUS_HAVE_FOR_SCOPE
184 # define for if (0) ; else for
185 #endif
186
187 mike 1.18 #ifdef PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
188 # define PEGASUS_TEMPLATE_SPECIALIZATION template <>
189 #else
190 # define PEGASUS_TEMPLATE_SPECIALIZATION
|
191 karl 1.24 #endif
192
|
193 kumpf 1.32 #ifdef PEGASUS_HAVE_IOS_BINARY
|
194 david 1.44 #if defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM)
195 #define PEGASUS_IOS_BINARY ,std::ios::binary,PEGASUS_STD(_CCSID_T(1208))
196 #else
|
197 kumpf 1.32 #define PEGASUS_IOS_BINARY ,std::ios::binary
|
198 david 1.44 #endif
|
199 kumpf 1.32 #define PEGASUS_OR_IOS_BINARY | std::ios::binary
200 #else
201 #define PEGASUS_IOS_BINARY /* empty */
202 #define PEGASUS_OR_IOS_BINARY /* empty */
203 #endif
204
|
205 kumpf 1.34 #ifndef PEGASUS_SINT64_LITERAL
|
206 kumpf 1.37 #define PEGASUS_SINT64_LITERAL(X) (Sint64 (X##LL))
|
207 kumpf 1.34 #endif
208 #ifndef PEGASUS_UINT64_LITERAL
|
209 kumpf 1.37 #define PEGASUS_UINT64_LITERAL(X) (Uint64 (X##ULL))
|
210 kumpf 1.34 #endif
|
211 mike 1.18
|
212 kumpf 1.40 // Used in printf and scanf conversion strings for Uint64 and Sint64 arguments
213 #ifndef PEGASUS_64BIT_CONVERSION_WIDTH
214 #define PEGASUS_64BIT_CONVERSION_WIDTH "ll"
215 #endif
|
216 kumpf 1.46
217 #ifndef PEGASUS_MAXHOSTNAMELEN
218 #define PEGASUS_MAXHOSTNAMELEN MAXHOSTNAMELEN
219 #endif
220
|
221 kumpf 1.40
|
222 david.dillard 1.56 #ifdef __cplusplus
|
223 mike 1.18 PEGASUS_NAMESPACE_BEGIN
224
|
225 kumpf 1.35 typedef bool Boolean; // If platform w/o bool, add flag and include Boolean.h
|
226 mike 1.18 typedef unsigned char Uint8;
|
227 david.dillard 1.52 typedef signed char Sint8;
|
228 mike 1.18 typedef unsigned short Uint16;
|
229 david.dillard 1.52 typedef signed short Sint16;
|
230 mike 1.18 typedef unsigned int Uint32;
|
231 david.dillard 1.52 typedef signed int Sint32;
|
232 mike 1.18 typedef float Real32;
233 typedef double Real64;
234 typedef PEGASUS_UINT64 Uint64;
235 typedef PEGASUS_SINT64 Sint64;
236
237 #define PEG_NOT_FOUND Uint32(-1)
238
239 PEGASUS_NAMESPACE_END
|
240 david.dillard 1.56 #endif
|
241 mike 1.18
|
242 mike 1.20 #ifdef PEGASUS_SUPPRESS_UNREACHABLE_STATEMENTS
243 # define PEGASUS_UNREACHABLE(CODE)
244 #else
245 # define PEGASUS_UNREACHABLE(CODE) CODE
246 #endif
247
|
248 kumpf 1.30 #ifdef PEGASUS_HAVE_EBCDIC
249 # define PEGASUS_MAX_PRINTABLE_CHAR 255
250 #else
251 # define PEGASUS_MAX_PRINTABLE_CHAR 127
252 #endif
253
|
254 mike 1.18 #endif /* Pegasus_Config_h */
|