(file) Return to Config.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2